Skip to content

Commit

Permalink
Refactor SENDER_ID preference's use.
Browse files Browse the repository at this point in the history
- Move the preference to just Android Platform.It is not used for iOS. I suspect this resolves phonegap#693
- Add SENDER_ID to AndroidManifest. This exposes the value to the Android code. While 6 years old, http://blog.iangclifton.com/2010/10/08/using-meta-data-in-an-androidmanifest/ describes the exact use case we are trying accomplish.
  • Loading branch information
Christopher Prescott committed Mar 16, 2016
1 parent 5cbff7c commit b75977e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<engine name="cordova-ios" version=">=4.0.0" />
</engines>

<preference name="SENDER_ID" />

<!-- android -->
<platform name="android">

<preference name="SENDER_ID" />

<config-file target="res/xml/config.xml" parent="/*">
<feature name="PushNotification" >
<param name="android-package" value="com.adobe.phonegap.push.PushPlugin"/>
Expand All @@ -52,9 +52,9 @@
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:name="com.adobe.phonegap.push.PushHandlerActivity" android:exported="true"/>
<meta-data android:name="google_app_id" android:value="$SENDER_ID" />
<activity android:name="com.adobe.phonegap.push.PushHandlerActivity" android:exported="true"/>
<receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler"/>

<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
Expand Down

0 comments on commit b75977e

Please sign in to comment.