Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android issue when close app #51

Closed
quocbao1087 opened this issue May 8, 2017 · 12 comments
Closed

Android issue when close app #51

quocbao1087 opened this issue May 8, 2017 · 12 comments

Comments

@quocbao1087
Copy link

Hi, I have an issue.
When I press Home button to view phone's home screen. Click on notification > app open detail page.
But when I close app > click notification > only open app, not open detail page.
Can you please help on this?

@hannta
Copy link

hannta commented May 11, 2017

I have similar issue.

When the app is in foreground, I receive the notification, callback is executed correctly with the data.

If the app is closed or in background, I click the notification, callback not get called.

Using TiSDK 6.0.4.GA & ti.goosh 2.0.6, FCM (node-pushnotifications / node-gcm) for sending notifications.

@progress44
Copy link
Contributor

As discussed in previous issues, if you are using FCM, make sure to not use notification.

The notification object behaves like (quote): "FCM automatically displays the message to end-user devices on behalf of the client app. Notification messages have a predefined set of user-visible keys and an optional data payload of custom key-value pairs."

Use only data. Check out the documentation on how to send the payload correctly.

@quocbao1087
Copy link
Author

quocbao1087 commented May 11, 2017

HI, I am using GCM and push notification data same as document page: https://github.com/caffeinalab/ti.goosh - A PHP/Shell Example

@progress44
Copy link
Contributor

@quocbao1087 which version of ti.goosh are you using and what device are you testing it on?

@quocbao1087
Copy link
Author

quocbao1087 commented May 11, 2017

I am using TiSDK 6.0.4.GA & ti.goosh 2.0.6
I am testing on Samsung Galaxy A5 2016. Android 6.0.1

When the app is in foreground, I receive the notification, callback is executed correctly with the data.
If the app is closed, I click the notification, callback not get called.

@progress44
Copy link
Contributor

Some devices require particular permissions from the user. What device are you using?

@hannta
Copy link

hannta commented May 11, 2017

@progress44 im setting the data as data object. Im able to get data correctly when the app is in foreground, so I quess the issue is not in data it self?

My device Nexus 5.

@progress44
Copy link
Contributor

@hannta whether data is correct or not is irrelevant if you include notification because FCM will only consider notification

@quocbao1087
Copy link
Author

I am using TiSDK 6.0.4.GA & ti.goosh 2.0.6
I am testing on Samsung Galaxy A5 2016. Android 6.0.1

When the app is in foreground, I receive the notification, callback is executed correctly with the data.
If the app is closed, I click the notification, callback not get called.

@progress44
Copy link
Contributor

I'll check this out but it has been tested before.

@hannta
Copy link

hannta commented May 12, 2017

Thanks @progress44, my issue was because incorrect data (im using FCM).

@mitulbhalia
Copy link

Hi @hannta
Can you please provide your solution for this issue?

My issue is that callback is not called when app is completely closed. In all other aspects, it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants