... | ... | @@ -95,10 +95,13 @@ If you use the push messaging feature of the B4S SDK, also add the push services |
|
|
```xml
|
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
|
|
<permission android:name="com.ezeeworld.b4s.android.sdk.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
|
|
<permission
|
|
|
android:name="<YOUR-PACKAGE-NAME>.permission.C2D_MESSAGE"
|
|
|
android:protectionLevel="signature" />
|
|
|
<uses-permission android:name="<YOUR-PACKAGE-NAME>.permission.C2D_MESSAGE" />
|
|
|
```
|
|
|
|
|
|
and in the `<application>` tag the push services registration:
|
|
|
Note that you have to explicitly use your app's package name in the permission name, so replace `<YOUR-PACKAGE-NAME>`. Next, in the `<application>` tag the push services registration:
|
|
|
|
|
|
```xml
|
|
|
<!-- Push messaging -->
|
... | ... | @@ -108,7 +111,7 @@ and in the `<application>` tag the push services registration: |
|
|
android:permission="com.google.android.c2dm.permission.SEND">
|
|
|
<intent-filter>
|
|
|
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
|
|
<category android:name="com.ezeeworld.b4s.android.sdk.gcm" />
|
|
|
<category android:name="<YOUR-PACKAGE-NAME>" />
|
|
|
</intent-filter>
|
|
|
</receiver>
|
|
|
|
... | ... | @@ -128,6 +131,8 @@ and in the `<application>` tag the push services registration: |
|
|
</service>
|
|
|
```
|
|
|
|
|
|
Again, note the `<YOUR-PACKAGE-NAME>` in the `GcmReceiver` intent filter category, which you have to replace with your app's package name.
|
|
|
|
|
|
## Example
|
|
|
|
|
|
For a fully defined example, please see [the `sample-eclipse` project's `AndroidManifest.xml`](https://github.com/ezeeworld/B4S-Android-SDK/blob/master/sample-eclipse/AndroidManifest.xml).
|
... | ... | |