Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 31    Views: 99

Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
07/14/14 06:17 AM (9 years ago)

How Do I Add Parse Push Services to Android?

I'm trying to add Parse push notification service to my Android app, but having problems as the tutorial I'm using is out of date and applies to the previous version of BT 2.0 and I need a guide on how to add push to Android apps using BT 3.0 I've added the Jar file and added build path, but then I'm lost as the old tutorial then tells you to add some code to the BT_activity_roots_tab.java but I cannot find this file, it doesn't appear to exist anymore in the Android source code. Does anyone have a more up to date tutorial on how to add Parse push to Android?
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/14/14 06:40 AM (9 years ago)
Follow the quickstart tutorials for android on parse.com. place the codes in appname_appDelegate.java file also place the necessary codes in the manifest files. There will be some error when you place the code in your appname--appDelegate.java file but I have a PDF documents that shows how to correct this. can I have your email so that I can send it to you. Hope this helps
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/14/14 07:44 AM (9 years ago)
I would appreciate a copy as well, if you could. smugwimp at smugwimp dot com Cheers! -- Smug
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/14/14 07:58 AM (9 years ago)
Thank you Rachelle, will send you a PM now.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/14/14 08:02 AM (9 years ago)
Rachelle for some reason, I cannot send you a PM, there is no option too. Can you send me a PM and I can reply?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/14/14 08:10 AM (9 years ago)
Still having issues as I'm not very good Android developer and not sure where to add certain code. Right now I have no idea where the onCreate method is to add the Parse code. Just lost basically as its totally different to previous implementations.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/14/14 08:20 AM (9 years ago)
Locate you appname_appDelegate.java file. You can find it in the src folder in your project file. open this file in Eclipse and carry out a search for //when the application is created... and place the code just after the super.onCreate(); line Don't forget to also place your import statements at top. And also place the necessary code in the AndriodManifest.xml file.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/14/14 08:44 AM (9 years ago)
Hi right, managed to add the code, I think in the right place, but I do now have 10 red errors, so I'm guessing this is what you were saying would happen, so how do I now fix these errors?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/14/14 08:48 AM (9 years ago)
sent you my email, please check your PM. Thanks!
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 03:55 AM (9 years ago)
Still struggling with the Android integration of Parse. Followed the Parse installation guide, but get about 10 errors, have no idea how to fix and all the BT integration guides are too old and are only relevant to BT 2.0. Pulling my hair.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 05:25 AM (9 years ago)
Can you send a screen shot of the errors
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 05:26 AM (9 years ago)
I have recently implemented it on my android app about two months ago and I used the same guide I sent
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 06:35 AM (9 years ago)
Hi Rachelle you mentioned early that I should follow the Parse guide and that I will get some errors, but these can be fixed using the PDF document you sent, but what part of the PDF doc will help me fix the issues? Or is it better to only follow the PDF from start to finish and ignore the Parse tutorial guide?
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 07:24 AM (9 years ago)
Please you can follow the PDF guide I sent to you. But use the codes from the parse quick guide.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 07:38 AM (9 years ago)
Ok
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 08:42 AM (9 years ago)
confused about the import, as the Parse states you need to import: import com.parse.Parse; import com.parse.ParseAnalytics; import com.parse.ParseInstallation; import com.parse.PushService; But the PDF says import: import com.parse.Parse; import com.parse.ParseObject; import com.parse.PushService; which one do I follow?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 08:57 AM (9 years ago)
Hi Rachelle I think I have done it, about to test now.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 09:08 AM (9 years ago)
Unfortunately, still didn't work for, as soon as I save the appDelegate file it created an error 'Cannot cast from Class<YourActivity> to Class<? extends Activity> mysoundtapesandroid_appDelegate.java /mysoundtapesandroid/src/com/mysoundtapesandroid line 106 Java Problem' I have no idea how to fix this.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 09:17 AM (9 years ago)
Did you implement the correction on the PDF guide?
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 09:20 AM (9 years ago)
Use all codes in the parse quick guide but place the codes in the exact spots stated in the PDF guide. And if you read the PDF well you will see how to correct the errors that will be generated. Let me look into the file and tell you the exact spot.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
07/15/14 09:23 AM (9 years ago)
I can do a quick tutorial for you. But I am at work now. Hope you won't mind if I can get it to you in like 3 hours.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/15/14 09:26 AM (9 years ago)
I did follow word for word, but as soon as I saved my appDelegate file then the error showed.
 
Mario @ Buzztouch
buzztouch Evangelist
Profile
Posts: 42
Reg: Nov 25, 2011
Frankfurt
10,920
like
08/11/14 03:57 AM (9 years ago)
Hi Dragon007, Do you have still this problem or is it fixed? Cheers Mario
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
08/11/14 04:02 AM (9 years ago)
Hi Mario couldn't get the Android going,however I did get the iOS working but only under the developers certificate, could seem to get it to work for Distribution. Problem I found was the tutorials are out of date and do not take into consideration the current version of BT3.0 that most of us are using. Will probably have another go, but not for now.
 
Mario @ Buzztouch
buzztouch Evangelist
Profile
Posts: 42
Reg: Nov 25, 2011
Frankfurt
10,920
like
08/11/14 04:12 AM (9 years ago)
I tried it a couple minutes before with the parse guide and it's working. 1. Did you change the AndroidManifest.xml and did you add the Google Cloud Messaging Project Number? 2. Did you add the Parse library to the libs folder? 3. Did you change the yourapp_appDelegate.java file and did you add the 3 import files? Also the parse app ID and Client Key? If you want you can send me your project and I will have a look. Cheers M.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
08/11/14 04:19 AM (9 years ago)
To be honest, not a coder, but I think I have. Because I don't have a Sim for my Android device, I don't think the push would work, because of the Google Cloud Service. But I'm pretty sure I got everything in, just not sure how to get past the Google service bit. Am I making any sense here?
 
Mario @ Buzztouch
buzztouch Evangelist
Profile
Posts: 42
Reg: Nov 25, 2011
Frankfurt
10,920
like
08/11/14 05:03 AM (9 years ago)
No, GCM is working in an emulator. You can test your PN without your Android device. If you need help with GCM and BT then let me know. Cheers M.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
08/11/14 05:09 AM (9 years ago)
@ Mario, hoe do I get a Google Cloud Messaging Project Number and hoe do I get GCM to work with BT. Thanks
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
08/11/14 05:17 AM (9 years ago)
Thank you Mario, I appreciate the help.
 
Mario @ Buzztouch
buzztouch Evangelist
Profile
Posts: 42
Reg: Nov 25, 2011
Frankfurt
10,920
like
08/11/14 05:18 AM (9 years ago)
Hi Rachelle-Joanne, First you need a DevAccount from Android! In the AndroidManifest.xml you will find a notice from David: <!-- Google Cloud Messaging Project Number Replace "YOUR_GOOGLE_GCM_PROJECT_NUMBER" with the Project Number provided by Google http://developer.android.com/google/gcm/gs.html --> - Download the Android SDK from parse. - Add the Parse library to the libs folder - Change the AndroidManifest.xml and add the Google Cloud Messaging Project Number - Cchange your yourapp_appDelegate.java file and add the 3 import files on the top Also add the parse app ID and Client Key after super.onCreate Cheers M.
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
08/11/14 05:26 AM (9 years ago)
@ Mario, hoe do I get a Google Cloud Messaging Project Number and hoe do I get GCM to work with BT. Thanks
 
Rachelle-Joanne
Aspiring developer
Profile
Posts: 65
Reg: Jan 15, 2013
Lagos
650
like
08/11/14 05:32 AM (9 years ago)
Thank you Mario
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.