I am planning to implement Google Cloud Messaging in in my app which only runs with Android 2.2 and above.This includes modifying the Manifest file.
If my app is to run at Android 2.1, it immediately shows a force close dialog.
May I know how do stop this from happening?
Currently possible solutions:
I wish my App can support Android 2.1 onwards, and only show a warning message to user e.g "to use this feature you have get Android 2.2 and above" in particular Activity that runs GCM.
If your app can function without GCM as well, then you should register for GCM only if version is 2.2 or higher. I guess the following lines are throwing exception in "fail-fast" manner.
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
Disclaimer: I haven't tried it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With