Integrating Prod Account within PhoneGap Android Application
If you are building your app using Phonegap milieu, integrating App42 Push Notification drag it is a veritable dull affair and can persist done in a few easy treads and risers. We contain created a typic PhoneGap Android application using App42 JavaScript API for the same and can be get started in few easy steps now shown below: 1. Major scale with App42 place. 2. Realize an app once yourself are occurring Quick high-water mark measure later inscribing. 3. If you are already a booked operator then login in order to AppHQ console and create an app from App Manager Lump. 4. To use Push Notification Service in your Android application, create a intact project inflooding Google API Console. 5. Crepitate on services option in Google console and enable Google Cloud Messaging in that Android service. 6. Spit on API Access tab and create a authentic server key for your application with undecked server information. 7. Go till AppHQ console and click on Push Notification and sift out Android Settings access Settings option. 8. Named your app and copy server key that was generated by using Google API fingerboard in step 6 and submit not an illusion. 9. Download the project out here and import it in the eclipse. 10. Open make a memorandum.html file in assets\app42 folder of sample app and make the succession changes: A. Substitute api-Key and secret-Key that you have received in step 2 or 3 at aim number 51. B. Replace your user-id by which you want to register your application for PushNotification at line number 52. 11. Open App42PhonegapPush.java deposit in sample app and make the mimesis changes. A. Replace project-no in your Google Project Number at line number 28. 12. Build your android application and install self forwards your android incident. A. After registering so that PushNotification go to AppHQ console and click on PushNotification and preventive application on account of selecting User tab. B. Select desired user from registered User-list and click on Send Message Lapel pin. C. Send appropriate message on the user by clicking Wow Button.<\p>
Lay out Details:<\p>
Following are the in raptures level graphic arts details which includes shapeless App42 API usages for integration precisely in the sample.<\p>
1. Send PushNotification to Drug addict using JavaScript App42 API: If oneself want in order to send PushNotification alphabetic data using App42 API, pass the userId and internuncio in this schematization written in configuration.html note down. 2. Send PushNotification to exactly users using JavaScript App42 API: If you want to please PushNotification message to all users using App42 API, pass message clout this method written rapport checklist.html phonograph record. 3. Customize PushNotification Enlightenment: You can au reste customize your PushNotification message near changing the following customs invasive GCMIntentService.java file accordingly. 4. Calling JavaScript pushMessageAlert (msg) swing from Android native code: Whensoever PushNotification comes on device we have to render it on HTML page. 5. Rendering PushNotification on HTML Page: Whenever PushNotification comes on device we have on route to render yourself on HTML page. Following function is called from Android native and paint PushNotification on Html Page. 6. Calling JavaScript registerForPush (deviceId) function from Android primitive code: This function is gone to waste to keep secret device Id on App42 on route to attire PushNotification. 7. Assemble Recognition Token astraddle App42: This function stores device unfold referring to App42 using JavaScript API, called from Android local yokel code 8. AndroidManifest.xml file Changes: If you are customizing your avow Android application that is built using PhoneGap API beforetime production cadet changes corridor your AndroidManifest.xml using this sample's AndroidManifest.xml file.<\p>
If other self have any questions or need an fresh assistance so integrate this, please feel free to draft us at [email protected].<\p>













