Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. Make sure your application build.gradle file include the applicationId attribute for android defaultConfig. Alternately, you can replace ${applicationId} with you application package (e.g com.yourapppackage.app). Example:

    Code Block
    languagegroovy
    themeRDark
    titlebuild.gradle
    android {
    	...
    	defaulfConfig {
    		applicationId "com.yourapppackage.app"		
    		...
    	}
    }
    		
    Warning

    When using Google Play Services (as described here), please make sure GCMBroadcastReceiver and GCMIntentService declarations are not present in your manifest (or remove them, if present). Failing to do so will cause devices not to be registered in Appoxee's servers correctly, and push messages will not be sent to them.

  2. Add the following lines to your app's AndroidManifest.xml file :Add the following lines to your app's AndroidManifest.xml file (Replace "$APP_ID$" with your application id. e.g: com.appoxee.exampleapp) : 

     

    Code Block
    languagexml
    themeRDarkEclipse
    firstline1
    titleAndroidManifest.xml
    linenumberstrue
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<app package>">
    
        <!-- Custom GCM permissionsRequired for using internet (which is a must) -->
    	<uses-permission android:name="android.permission.INTERNET" />
    	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
    	<!-- Required for receiving GCM (push) messages -->
    	<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    	<!-- Custom GCM permissions -->
    	<permission android:name="${applicationId}$APP_ID$.permission.C2D_MESSAGE" android:protectionLevel="signature" />
        	<uses-permission android:name="${applicationId}$APP_ID$.permission.C2D_MESSAGE" />
    
    
    	<!-- Keeps the <applicationprocessor >from sleeping when        <!-- Customhandling received push receivermessages -->
    		<receiver
                <uses-permission android:name="android.permission.WAKE_LOCK" />
    
    	<!-- For vibrating when showing notification -->
    	<uses-permission android:name="comandroid.appoxeepermission.gcm.PlayBroadcastReceiverVIBRATE" />
    
    
    	<application >
          	<meta-data android:permissionname="com.google.android.c2dmgms.permission.SENDversion"
    >        android:value="@integer/google_play_services_version" />
    
        	<!-- Receive the actual messageMust have for Push Support by Appoxee -->
        	<service android:name="com.appoxee.push.PushOpenIntentService" />
    
        <intent	<!--filter> GCM push receiver, custom permission -->
       	 	<receiver
           <action	 	android:name="com.google.android.c2dmgms.intentgcm.RECEIVEGcmReceiver"
    />        		android:exported="true"
            <category 		android:namepermission="${applicationId}com.google.android.c2dm.permission.SEND" />
                </intent-filter>
    
                <!-- Receive the registration id -->
                		<intent-filter>
                    		<action android:name="com.google.android.c2dm.intent.REGISTRATIONRECEIVE" />
                    		<category android:name="${applicationId}$APP_ID$" />
                		</intent-filter>
            	</receiver>
    
        	</application>
    </manifest>
    
    

     

     

    When using eclipse (when manifest merging option is off), please add the following manifest:

    Code Block
    languagexml
    themeEclipse
    firstline1
    titleEclipse declarations
    linenumberstrue
    <manifest >
    
       <!-- Required for using internet (which is a must) -->
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /!-- Custom intent service to handle incoming messages -->
        	<service
            		android:name="com.appoxee.gcm.AppoxeeGcmListenerService"
            		android:exported="false" >
         <!-- Required for receiving GCM (push) messages -->
        <uses-permission   		<intent-filter>
             	   <action android:name="com.google.android.c2dm.permissionintent.RECEIVE" />
         <!-- Keeps the processor from sleeping when handling received push messages --> 		</intent-filter>
        <uses-permission android:name="android.permission.WAKE_LOCK" />	</service>
    
        	<!-- For vibrating when showing notification InstanceId -->
        <uses-permission android:name="android.permission.VIBRATE" />	<service
               <application >
    
            <meta-data 	 android:name="com.googleappoxee.androidgcm.gms.versionAppoxeeInstanceIDListenerService"
                		android:valueexported="@integer/google_play_services_version" />false">
            		<intent-filter>
       <!-- Must have for Push Support by Appoxee --> 		<service<action android:name="com.appoxee.gcm.PlayIntentService" google.android.gms.iid.InstanceID"/>
            <service android:name="com.appoxee.push.PushOpenIntentService" />		</intent-filter>
        	</service>
    
    
        	<!-- Additional Includecapabilities forsupport inbox/more-apps/feedback support(inbox, url deep-linking, feedback, more apps screen) -->
            	<activity android:name ="com.appoxee.activities.InboxMessage"/>
            	<activity android:name="com.appoxee.activities.Inbox" />
            	<activity android:name="com.appoxee.activities.MoreApps"/>
        	<activity android:name="com.appoxee.activities.Feedback"/>
        	<activity android:name="com.appoxee.activities.FeedbackLandingPage"/>
    
        		<!-- For geo-fencesNeeded for geofence support -->
            	<service android:name="com.appoxee.geo.GeofenceTransitionsIntentService"/>
            	<service android:name="com.appoxee.geo.AppoxeeGeofencingManager" />
             	<receiver android:enabled="true" android:name=".geo.BootCompleteReceiver">
                		<intent-filter>
                    		<action android:name="android.intent.action.BOOT_COMPLETED" />
                		</intent-filter>
            	</receiver>
    
        	</application>
    
    </manifest>

 

...

  1.