I'm creating a "push" library with the service (i.e. callback) in it. How can you include the required manifest additions? I ended up adding the "permissions" to a test project and it removed the security error unfortunately it doesn't look like the service in the library is being called back. I also tried to include the full manifest additions in the test project and it seems to give me an error "Module: pushservice_br not found" note my service name is "PushService"
here's the test project's manifest additions:
SOLVED:
Don't need/can't use manifest in Library (at least for permissions and Recievers).
Need to include library package name in front of service in final apps manifest, i.e.
here's the test project's manifest additions:
B4X:
AddManifestText(<permission android:name="$PACKAGE$.permission.C2D_MESSAGE" android:protectionLevel="signature" />)
AddPermission($PACKAGE$.permission.C2D_MESSAGE)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
' Push Service Receiver Attribute
SetReceiverAttribute(PushService, android:permission, "com.google.android.c2dm.permission.SEND")
' Service Receiver Text
AddReceiverText(PushService,
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="$PACKAGE$" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="$PACKAGE$" />
</intent-filter>)
SOLVED:
Don't need/can't use manifest in Library (at least for permissions and Recievers).
Need to include library package name in front of service in final apps manifest, i.e.
B4X:
SetReceiverAttribute(library.package.PushService, android:permission, "com.google.android.c2dm.permission.SEND")
Last edited: