I have number of apps that uses GCM and I used same piece of code in every app. So I created on project witch gets gcm Notification. Now I mark that project as library project and using that project in my other project as android reference library project. and Inheriting the mainActivity of library project that do all the initialization of GCM. I also added the receiver and service entry and all Permissions in my Android manifest again.
but I am unable to register, I am getting this error as
Resetting backoff for 'Package Name'
when i set permission for my App package
<permission
android:name="com.example.testapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
If i set permission for library package
<permission
android:name="com.abc.notifylib.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
then runtime exception as
IllegalStateException: Application does not define permission com.example.helloworld.permission.C2D_MESSAGE
So my question is Do we able to create library project for GCM, Or I should use same method as previously copy paste my code in all my project which use push notification.
Thanks,