Firebase Cloud Messaging : behavior for unused smartphones - firebase-cloud-messaging

We are using Firebase to push notification to our users.
Here is the statistics when trying to send a notification to 1000 users that have stopped using our app since 2015 :
Android NotRegistered 566
Android success 181
IOS NotRegistered 253
It is obvious that almost 100% of such old users should not be not reachable. (That would mean they have our app still installed in their device without having opened it for 5 years).
Statistic for IOS look good.
But as for Android, there are >20% of tokens for which we receive a successful respons which is unrealistic
I suspect the following reason :
When someone has definitely stopped using their device without having removed the app (a new device was bought and the old one was thrown into a drawer), Google still believe it is alive.
Can you confirm, this is the case. If yes, do you know if Google will end up detecting the device is no more in use (with probability 99.9%), maybe if it fails to send our notification after some days ?
Actually, it is useful to have a relevant estimation of how many users I can reach with push notifications.

Related

React-Native: Get the same unique device ID after reinstalling the application

I’m writing an app in React-Native and need some help concerning identifying the device after reinstalling the application.
What I need:
Get a unique device ID for every device for both Android and iOS.
The same ID should be returned even if the user uninstalls the application and installs it again.
The closest to this I’ve come over is the getUniqueID() method in react-native-device-info. However, a different ID will be returned on iOS if the app is reinstalled since the returned value for this method is related to the vendor.
Have a great day!
Well, if you need it due security purposes (e.g. so nobody is abusing your API or premium content), you are looking for Device Check / App Attestation for iOS and Google Safety Net for Android. By using these libs, you will get a unique device token (on iOS) or attestation (on Android).
When using iOS, you can take this token, and set up two bits on a server hosted directly in Apple by using your own server as a middle-man (as you should not do it directly, from the mobile app).
According to Apple: Apple records the bits for you and reports the bits back to you, but
you’re responsible for keeping track of what the bits mean. You’re
also responsible for determining when to reset the bits for a given
device; for example, when a user sells the device to someone else
Similarly, with Android - you just send attestation from device to server where it will be validated.
To use mentioned libs in React Native, you can either install corresponding libs:
https://github.com/dayitv89/react-native-ios11-devicecheck
https://github.com/rajivshah3/react-native-google-safetynet
plus you will need to implement verification part on your server
or if you are using Firebase libs (e.g. from rnfirebase.io), you can use AppCheck that uses SafetyNet and DeviceCheck / App Attestation underhood and comes also with easy server-side verification (also for non-Firebase resources).
If you need a solution that is focused on pushing data from server to client, you are looking for a push notification token.
Libs:
https://rnfirebase.io/messaging/usage
https://github.com/zo0r/react-native-push-notification
As this token can change over time (by design), you should implement few services that support that / or potentially re-architect your app.
Typically, tokens are stored under the user profile in your backend (or they are linked in some other way to the user that is using the device in the given time).
If you are looking for something else, I think it's not possible.
Don't worry MisseMask,
uniqueID's are always unique for your app bundle ID. There are two uniqueID's for each app.
That is one unique ID for debug version, and another one for release version. So please check your app by install it again and again with debug mode. now you get the same uniqueID. and do this process again with release build
for example:
Debug version uniqueID:
1st install - 3279dhsbqd9yrbceqiqbcv
2nd uninstall and install - 3279dhsbqd9yrbceqiqbcv
3, 4, 5, 6, .... - are same uniqueID
Release version uniqueID:
1st install - dsvfhdfgdf454tdsgsghetuh7j5
2 nd uninstall and install - dsvfhdfgdf454tdsgsghetuh7j5
3, 4, 5, 6, .... - are same uniqueID

GDK retrieving account information

I am a Google Glass application developer. During developing one application, I encountered some problems.
My application have landed on MyGlass and it's on review process, so it's not publicly visible. It only can be seen by me.
The problem is:
When I turn on my Glassware in MyGlass, my glass device never receive my application. Should I receive it or not? And why didn't I receive it?
I have launched the method mirror.accounts.insert.execute() from https://developers.google.com/glass/develop/gdk/authentication, and it didn't raise an exception, but I didn't receive the account information and the authToken on my glass device. This is because I haven't received my application on my glass device, am I right?
This is indeed correct: the token will only be sync'ed and available once the APK from MyGlass has been downloaded to your device and installed. After this first installation, you can safely replace the APK with a development one using adb install -r as long as it's using the same certificate.
Make sure to check that your device is connected to the internet, especially through WIFI. If that doesn't work, ask the Glass review team to help you out and check if there are any internal issues that would prevent your APK from being downloaded.

Can an iBeacon notify a user's iphone without an app being installed?

I'm new to iBeacon's and am trying to understand one simple thing.
Can I use iBeacon to display a notification on a user's iphone without a custom app being installed?
For example, I'd like to build an app that sends out iBeacon messages to people that have an iPhone. When they get near an iPad running my app, it notifies them that they're near my "event", which of course is taking place at the location of my iPad.
Is this possible without the user having already installed another app that I've made to receive notifications of my event?
Note that I'm open to any other tech or ideas that would make this work. I know that Apple does this with their Apple Stores, but I'm guessing they can do this because they already have an app installed on the users device - probably the "AppStore" app.
You typically need an app for any iOS notifications on seeing an iBeacon. That is what Apple does for their stores.
The only exception is if you use Passbook to set up a notification trigger. But you still need the user to install your Passbook entry.

ios 7 MDM Server

We built our own MDM server using OSX Server and an apple mini to manage about 100 iPads. Everything worked great then ios 7 was released.
We have various pads that have different things happening to them.. some are getting the app push but the app never installs, some never recive the push at all, and some pad's have our apps disappearing...
Has anyone found what needs to be done to update the server so that it will function again? I've found 150+ page document on the apple developer site that walks you though setting up the entire process but most of it we have already, that document does not call out the changes so it's certianly not ideal at all to try to pick out what needs to be updated (I did also update the OSX Server software to the newest version)
The only real errors I have to run on right now are from the device logs.. here is what is happening.
Oct 2 11:51:14 iPad mdmd[477] <Notice>: (Note ) MDM: Transaction completed. Status: 200
Oct 2 11:51:14 iPad mdmd[477] <Notice>: (Note ) MDM: Attempting to perform MDM request: InstallApplication
Oct 2 11:51:14 iPad mdmd[477] <Notice>: (Note ) MDM: Handling request type: InstallApplication
Oct 2 11:51:15 iPad mdmd[477] <Notice>: (Error) MDM: Enterprise app installation failed.
Error: NSError:
Desc : The app “com.app.Damages” is already scheduled for management.
US Desc: The app “com.app.Damages” is already scheduled for management.
Domain : MCMDMErrorDomain
Code : 12026
Type : MCFatalError
Params : (
"com.app.Damages"
)
Oct 2 11:51:15 iPad mdmd[477] <Notice>: (Error) MDM: Command Status: Error
Error: NSError:
Desc : The app “com.app.Damages” is already scheduled for management.
US Desc: The app “com.app.Damages” is already scheduled for management.
Domain : MCMDMErrorDomain
Code : 12026
Type : MCFatalError
Params : (
"com.app.Damages"
)
Anyone know what needs to be changed? There can't be that much.. we are still pushing the apps just the device is not communicating with the server now
Let me break it down to couple of subquestions:
1) Has anyone found what needs to be done to update the server so that it will function again?
Generally speaking, nothing needs to be changed on the server. iOS 7 introduced couple of new features to MDM. However, the whole protocol is still backward compatible. So, if you have older server, it should (in the ideal world) work fine with your new iOS 7 device.
2) We have various pads that have different things happening to them.. some are getting the app push but the app never installs, some never recive the push at all, and some pad's have our apps disappearing...
Welcome to the post Steve Jobs era :) Golden iPhones, eyes popping color schemes and unbaked sofware.
I noticed serious degradation of MDM stability from iOS 6 to IOS 7, especially around app distribution. I posted about 3-4 bugs to Apple and I would recommend to do the same (hopefully, the sheer number of bug reports will force them to concentrate on it).
As you I saw apps not being installed, leaving placeholder icons behind and a lot of other crappy behavior.
3) "The app “com.app.Damages” is already scheduled for management."
This messages mean that you already tried to install it and it sits somewhere in iOS installation queue, but waits for something. I am not sure what is exactly the list of possible reasons why it waits.
One of the reason which I observer is that if a user is required to enter AppStore password for a first time, it can stuck on this for quite long time (not sure why).
We have been having this problems since iOS 7 was released. We have also been working directly with Apple and our MDM vendor since then and Apple has just recently confirmed to us that this is fixed in iOS 7.1, though Apple has not announced a release date for 7.1.
We have recently found one workaround. Using our MDM, we send a command to remove the app from the device (even though it's not even installed). Once the device processes the remove command, we are then able to push the app down to the device.
I just encountered the exact same problem as well and completely agree with instability in iOS7 MDM.
The ipad I was testing is on iOS7 and here is the result what I observed in iPCU.
Oct 25 11:41:44 Devs-iPad mdmd[312] <Notice>: (Error) MDM: Command Status: Error
Error: NSError:
Desc : The app com.custom.myapp is already scheduled for management.
US Desc: The app com.custom.myapp is already scheduled for management.
Domain : MCMDMErrorDomain
Code : 12026
Type : MCFatalError
Params : (
"com.custom.myapp"
)
Removing the MDM profile and re-installing to re-provision device didn't help as well.
In the end I wiped (factory reset) the device and the next time device pull application install command for that app name it works.
Hopefully Apple fixes this issue in next software update.
we have the same situation on 20/700 Devices managed by BES10. The only workaround for us is to install the app update outside the mdm world
I just encountered this issue on iOS 9.3.4.
ErrorChain: [ {
'ErrorCode'=>12026,
'ErrorDomain'=>'MCMDMErrorDomain',
My solution was:
Remove the app from the device in the MDM
Restart the device
After the iPad started, the app icon appeared on the home screen, but it was disabled, then i uninstalled the app on the device
Assigned the app in the MDM and pushed it onto the device
Don't know what caused the app to hang out in the install queue like that, but I worked it out after a while of troubleshooting.

Does GCM works for android 2.3 platform?

I have created a APP using GCM which works correctly on Android platform 4.1 and 4.03 (I.e. Gets a RegId and register itself in my server and can even recieve a GCM), but when I start the emulator for android 2.3 (API 10) then the app gets installed but never registered I.E never gets RegId. When I start (install) the application for the first time then it receives a GCM message which I do not understand where it comes from but I can see that the device is not registered in my server. I also used a HTC phone with 2.3.3 android software and stil same result. Can any one see what the problem might be?
On the emulator it should normally not work, because it will not have a google account tied to the device. It is requiered for a device to have a google account and Google Play installed to register for an id.
The phone on the other hand should work.
GCM will Work from Android 2.2.
Refer this tutorial it may help you,
http://androidv5.wordpress.com/2012/08/15/how-to-implement-google-cloud-messaging/
it works fine for me.