arleyandrada / PushClient

FREE and Open Source - Titanium PushClient Module
Other
44 stars 17 forks source link

Android Notification doesn't show up #106

Closed vasilestefirta closed 8 years ago

vasilestefirta commented 8 years ago

Hello,

I'm trying to use your module and I can not get the notifications to work on Android (didn't try the iOS yet). I can register the device just fine, but when I send a push notification it doesn't show up. I'm not using parse.com. I have a custom server side code which sends notifications and I'm pretty sure it works, because I tried it with different modules.

Can you please tell me what's the line of code from here: https://github.com/arleyandrada/PushClient/blob/master/app/controllers/index.js which creates an android notification?

For example other modules use something like "Ti.Android.createNotification()".

Any help will be much appreciated!

arleyandrada commented 8 years ago

Hi,

This repository contains a simple Titanium Mobile project with an usage sample of the PushClient module.

You can buy and download the PushClient module through the Appcelerator Marketplace. https://marketplace.appcelerator.com/listing?q=pushclient

I'm sorry for the late reply. I've been missing in recent months because of health problems and unable to work on my projects. I am currently checking and solving all pending issues. Please check back me if I can help in something else. Thank you!

Regards,

Arley

vasilestefirta commented 8 years ago

I already bought the module from the Appcelerator Marketplace. My question is: which line of code from your example makes an Android Notification to show up?

arleyandrada commented 8 years ago

None of them. The Android Notification is created by some of the native module code.

All you need is to install my module and call the registerPush method at every app startup, regardless the device is already registered.

From your push notification provider or from your own server, you need to send a JSON formatted payload to the registered device. Something like that:

{
"alert" : "Hello world!"
}

You can control the other push notification options using one of the documented available attributes. Something like that:

{
"title" : "Hello world!",
"ticker" : "123456...",
"vibrate" : true,
"largeIcon" : "http://rocketdock.com/images/screenshots/supermario.png"
}

Have you changed the GCMSenderId from my sample to your own GCM ID?

arleyandrada commented 8 years ago

Hi vasilestefirta,

I was unable to identify your email and also your PushClient license, only by your github username, to be able to send a new version of PushClient module to you.

I released a new version of my module, but the Appcelerator Marketplace is very lazy.

Regards,

Arley

vasilestefirta commented 8 years ago

Hi Arley

My GitHub username and Appcelerator Marketplace username are different so that's why you couldn't find my email address ;)

I finally got the push notifications to work on Android.

Thanks for your help, Vasile