Push Notifications not delivered to Fairphone 4 - push-notification

Can anyone help me please :) I send out cloud messages (push notifications) to iOs and Android phones, but Fairphone 4 doesn't seem to receive them. Is this a known issue or rather a problem the user needs to solve for him/herself? The person has apparently tried to solve it but couldn't. All looks normal from my end.
Thanks
From my end there is no visible problem, notifications are sen, no error message, opening% always more or less the same. Would like to help though

Related

Making HM-18 modules detect nearby BLE beacons

I am using the HM-18 modules by DSD tech, and I pushed the following code in:
https://github.com/dinosd/BLE_PROXIMITY
The HM-18 slaves are very similar to the HM-10s, so it should work theoretically. I went through all the code and libraries to see if there were any specs I'd need to change but there doesn't seem to be anything specific to the HM-10s in there that I'd need to adjust.
However, this is all my serial monitor outputs:
OK
OK+Set:1
OK+Set:1
OK+RESET
No device
There are a couple of active beacons near the slave, so it should be able to detect them - my phone can detect them no problem. Does anyone know what could be changed so I can read these beacons?
Any tips would be very appreciated!

How to record mic WHILE video calling with Daily.co on iOS Safari

Problem
With my iPad's iOS Safari, I can use Daily.co's video API to call other devices. But the moment I start recording my local microphone via the audio-recorder-polyfill library , everybody else will no longer be able to hear me, even though I can still hear them and share my camera. Even when the recording session ends, the audio call remains broken (though the audio-recorder works successfully).
It seems iOS specific, because I have no problems with my Surface's Windows Chrome.
How to reproduce
Takes around 2 minutes
Visit explain.mit.edu with iPad Safari and any other device. Press the green call button.
After confirming the video call works, press the record button on iPad
Note the other device can no longer hear anything
What I tried
First, I guessed the MediaRecorder invalidates the Daily video call's access to the mic, so I used setLocalDevice to re-designate access to Daily every 5 seconds to see what would happen. It made no difference during recording, but when the recording ended and it actually did restore the audio call.
So the remaining problem is that the audio call stream just doesn't work mid-recording: I read the MDN docs about the MediaCapture API, it mentioned that a stream has one input and one output, but I don't know what that really means, and whether a mic stream can be simultaneously accessed by two "things".
Relevant Code
I only use the basic minimum API that Daily and audio-recorder-polyfill provides
Video calling (full code here)
await this.CallObject.join({
url: conferenceRoom.url,
userName: this.sessionID
});
Audio recording (full code here)
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
this.recorder = new MediaRecorder(stream);
this.recorder.start();
I don't believe the issue is caused anywhere else, but here's the full repository code if needed
Real-world context
For context, I work on https://explain.mit.edu. You go there, request help, then someone else will arrive and use the realtime blackboard and voice chat to explain something to you - and a KhanAcademy-video is made as a by-product. But now if anyone presses "record", the voice chat will stop working.
We can work on a repro case for this, but I have a guess as to what's going on. iOS Safari in the past has stopped any current tracks coming from the local mic/cam any time getUserMedia() is called. So, unlike on desktop browsers and Android Chrome, on iOS you can't request or use multiple streams.
iOS Safari is a moving target, and I haven't looked at this specific issue lately. But if that is what's going on, probably you can work around it with a fairly small code change.
Instead of:
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
You can grab the local audio track from the Daily call object and make a stream from that:
const track = this.callObject.participants().local.tracks.audio.persistentTrack
if (!track) {
throw new Error("can't start recording right now ... no audio track");
}
this.recorder = new MediaRecorder(new MediaStream([track]));
this.recorder.start();

Last known value from Adafruit IO on Arduino

I'm working on a basic sketch for an Adafruit Huzzah which uses the Adafruit IO MQTT library. This is put together by copy/pasting from various sources and examples, and mostly works - but there's one thing I can't figure out.
Right now, I'm using a line of code which fires off a handler every time a new message is received via the feed I'm subscribed to:
group->onMessage("daniel", handleMessage);
This is fine, and does what I need it to do for values which are updated.
What I want to do, however, is grab the last known value on the feed during the setup() routine, rather than having to wait for a new value to come though.
In MQTT parlance, I believe this is known as retained messages, which I think Adafruit IO has on by default, but I don't know how to grab these values during the startup() process.
Can anyone help me out?
(If you're interested, here's my code so far: https://github.com/LimeBlast/family-box/blob/master/family-box.ino)
Short answer is you don't... do anything.
Retained messages are delivered just the same as normal messages (via the onMessage callback), they are just delivered as soon as you subscribe to the topic.
I also had this problem. Here is the full explination
The get() function wil ask the Adafruit servers to resend the last value of the feed to this client only. When the value is received, the handler will be executed.
exampleFeed->get();
Seeing as I've just found the answer to the question I was asking, I figured it only right I post it here.
The command I was looking for, after having setup the feed, was ->get(), as shown in this example.

SIM5216A phone functionality (CFUN) is not maintained

I'm quite new to working with Arduino/GSM and have had problems getting basic HTTP functionality working. I am currently facing multiple problems - one being that the 3G shield I am working with (SIMCOM SIM5216A) does not seem to want to connect to a carrier! :(
However, the problem I would like to focus on for this question is that Phone Functionality - designated through the AT+CFUN command - does not seem to be maintained through power cycles. Additionally, sometimes after modifying the CFUN, the modem will run a soft reset.
Here is the command I have been using to modify the phone functionality of the modem:
AT+CFUN=1,0
I am under the impression that the second parameter should stop it from running a soft reset.
I have attempted to save the AT configuration by following advice in this question's accepted answer - here is the output from power on:
START
+STIN: 25
+STIN: 25
+CPIN: READY
SMS DONE
PB DONE
AT+CFUN=1,0
OK
AT&W
OK
However, whenever I next reset, I will get the following:
AT+CFUN?
+CFUN: 4
OK
So, my question is how can I save the CFUN configuration to be consistent between power cycles? (If you happen to be able to offer advice on why I can see medium-strength signal but cannot connect to an operator network, any advice would be welcome there too, however that is not the focus of this question)
With thanks,
BadDevH.
Exactly what that is saved with AT&W is a rather muddled, see this answer for details. However, regardless of that, the AT+CFUN command is controlling such a dynamic behaviour that I cannot imagine any manufacturer ever that has saved this with &W. Think more of CFUN more like setting a fixed cruise control speed while driving a car. There is no way the car will continue with the speed from last time when started.
For normal phones the default behaviour is value 1 - full functionality - because that is the very core functionality of what they do1, but for a GSM module shield, I am guessing that the default behaviour is set to no radio in order to save power, so it stays off until you need it at which point you need to explicitly turn it on.
1
And even in the case of no sim card present, it shall still be able to make emergency calls.

Custom code on the updateHandler from HKWorkoutSession

My question is plain and simple. Can i run custom code in the updateHandler when I´ve executed a HKWorkoutSession and is listening for HeartRate samples? (Even when the Watch is locked from "wrist down" movement)
If this i possible what are my limitations?
I´m interested in processing the HeartRate data when my code receives them. I don´t have a device yet so I haven't been able to test it yet.
Would love your thoughts on this if anyone have experimented with an actual device.
Yes you can do this, I've had it append every HKSample that came back from my query onto an array, so when I resume the array is much larger. However UI won't update this way, on resume you need to update to the values you've received from the updateHandler.
Whether I should be doing this, or how far it can be pushed, I'm not sure.
Update
In the latest Xcode 7 beta you can get simulated workout data, so you won't need to install the Watch OS 2 beta on your device.

Resources