Unity Push Notification integration problem

0 votes
Hi All

I want to integrate your push notification system to my unity project. I can make your sample project works well. But when I try to intagrate it to existing project, some problems occur. Because I have already have androidmanifest.xml inside plugins/Android folder. While I try to merge them, somehow I cannot do it. Second problem may be that I have already google-play-services.jar in my game folders. It may generate problem as well. Can you please help me? I can send my project to you if needed.

Thanks
asked Sep 19, 2016 in Unity by gokhan (20 points)
Hi Again
It seems that my app saves user device token to apphq "Users" section. Then I send push notification from apphq. It prints message send successfully. But When I look logs, it says: "Message Sent to  device: APA91bFL30MJHXoDkXgpUwWhFyTk4TcymBn16G1KZGV2_n35PWJrC6K7TtRPeDctUyTydP0Tii1snuMo8rh_ZRkaVLYNXk0X3yoRmCxwY2ZtJ1kzr9H54INcTCvmqubyf9XdIOH2mmtU : [ errorCode=NotRegistered ]". Another thing is that as I said above I managed to make it work in shephertz's sample push project. Although, I try with same phone, device tokens are different from each other(between successfull project device token and nonsuccess project device token). Is it normal?

1 Answer

0 votes

Hi Gokhan,

Greetings!!!!!!!

As you are integrating Push Notification in your project. Here are the necessary steps you can follow.

  1. Add Configuration details in your AndroidManifest.xml file with the help of sample Manifest.
  2. As your project already have google play service, in this case don't add google play service available in sample project.

Yes, you will be able to see registered users in Users section of Unified Notification Panel. You will be getting errorCode=NotRegistered, when application is Uninstalled on the device.

As you managed to work with the Sample then the Token can belongs o that sample.

Yes, Device token can be different from same device.

Have you able to register on App42 with your existing project. If not, then might be AndroidManifest.xml is not properly configured.

Let me know the details.

Thanks

Vishnu Garg

 

answered Sep 20, 2016 by Vishnu Garg (674 points)
Hi Vishnu
I am trying to make it work with my existing project for at least 1 week. I am really bored:) Now, every thing is same with sample project(I deleted old manifest file,google play services,androidsupportv4 etc, and copied files from sample project). Still does not work. I do not know where to look. Yes I have been already using app42. If you want, I can zip my project and send you over wetransfer.
don't worry, I will check it out what is wrong. Share the zip file. Are you able to register the device on App42 or not.
I can able to register device to app42. Can you please give me a email address that I will send the project zip. I will send you my project before I entegrated push notf.
If you are able to register device then only issue in AndroidManifest.xml file. Let me share that only. If there is any error in unity console then share the same as well.You can share the same at support@shephertz.com
AndroidManifest.xml is same as sample project. Only I changed package name. So I am sending full project. First screen is called splashscreen. In main camera, there is a scripth attached. I initialize app42 there. You can maybe disable it make your own script. I will add comment here when sending is done my friend.
My friend, I have send you the project. You should have an download link in email. As I said above, this project folder does not include anything about push notf. After you entagrate it, I will be happy if you send me required scripts(manifest etc) or files.I already have an manifest file inside Android/Plugins folder.
My friend, I have changed the configuration in AndroidManifest.xml file.Download it. And add app42service.jar file and plugin script in your project with the help of steps mentioned in ReadMe file.
 http://cdn.shephertz.com/repository/files/1236b99b5930a6d469c4a1dd426d380e3875b8a9b1947177ab0cf813225ee234/0f301b5ef58897f0ddf6828248dc0080b33b8d2c/AndroidManifest.xml.
Share the console logs if you face any problem.
Bro, I cannot download it. It says access denied...
No way again. Can you please send me email. E-mail: gokhan@simgesimulasyon.com
Ok I did it bro. I will let you know what will happen. Thanks
My friend, still same:( It register device to users in apphq, even it can send push to all users but it does not receive push. When I press send push from apphq console, sometimes it says message send succesfully but it does not receive and sometimes it says User has unsubscribed to receive push notification.
My question: did you build my project to android phone? Did you receive push?
I didn't build the application on Android. Please let me know issues your are facing while integrating the plugin we provide. All the steps mentioned in ReadMe.md file.
My friend, I read and did all steps mentioned inside ReadMe. After you send me new AndroidManifest, I deleted and put new one. I put all necessary files(android-support-v4,app42pushservices,scripts), then I build. It registers devices but does not receive. I do not know what is wrong which I can tell you. I use same apikey,secretkey,googleprojectno in a project file it works, on another it does not.
Hi Gokhan,

Can you please add "demo@shephertz.com" as a collaborator to your app and share the app name to us? It will help us to identify the exact problem.

Regards,
Rajeev
Hi Rajeev
I added you as collabrator. My app name is WoodBall. I created a new unity project. Did all steps in readme file and it works. I guess something goes wrong since there are many plugins and manifest files in my existing project. I sent my project to you. I guess u will have to try and build the project
Is your Android project has app42pushservice.jar file that is responsible for Push Receiver at device end.
Yess, It is inside Plugins/Android.
Why someone from shephertz team take my project and built it to a phone? Because we have tried every way and still I am waiting. Isn't this way is more easy?
Hi Gokhan,

First of all, apologies for the delay in response. I would suggest, that we can have a call to close this on ASAP. Please drop an email to Aidityo for your time availability, so that we can schedule a call.

Regards,
Himanshu Sharma
Hi Himanshu
I guess I managed to solve this problem. I have new questions I have asked. I will be happy if you speed up the processes about those questions. Topics are: http://forum.shephertz.com/?qa=9610/app42-2207-problem-acl-enabled-app and http://forum.shephertz.com/?qa=9663/prevent-users-to-login-at-the-same-time-with-same-username
Push notification entegration problem is solved. Thanks
Hi There ..
 can you please tell me how you solved it ( because I have the same problem here ) :'(  ....
Will you please let  me know the exact problem you are facing from :
1.Unable to register device on AppHQ.
2. Able to register but device not receiving PushNotification.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...