Comments (13)
@progress44 thnx for your reply. for now i used the PushClient module @malhajj suggested. It works great in all cases. Hope you can solve the problems in ti.goosh.
from ti.goosh.
Hey guys, issue solved :)
22924ee
from ti.goosh.
Make sure not to use the notification attribute when sending a notification through FCM. Always use data.
from ti.goosh.
@hannta
Provide your app flow because i got same error and solved it.
I have the app with login window so when i install the app first time and after logged in, i closed the login window and open next window that time when i clicked on notification i got same error and even callback function is not being called too.
So what i did is, instead of closing the login window, i hide it. That solves my issue.
from ti.goosh.
@progress44
I still have one issue.
Notification is not received when app is closed. All other aspects work well.
from ti.goosh.
Hello There,
First of all thanks for this great module, I really depend on it for several projects.
I have only one concern, is this issue, where the app is totally closed and notification is received, the user will click on that notification, but this module doesn't fire the callback.
If you want you can benefit from this module, https://github.com/arleyandrada/PushClient, which works fine with these scenarios.
The following is the snippet of code that I used in index.js in Alloy Project:
(function(){ var TiGoosh=require('ti.goosh'); TiGoosh.registerForPushNotifications({ callback: function (e) { alert('{message}'); var data = JSON.parse(e.data || ''); if (data.recipeId != -1 && e.inBackground) { Alloy.createController('/recipeDetails', { id: data.recipeId }).getView().open(); } }, success: function (e) { console.log('Notifications: device token is ' + e.deviceToken); Titanium.App.Properties.setString("token", e.deviceToken); }, error: function (err) { console.log(err); } }); })();
Kindly, I'm waiting for your replay to check if this can be resolved soon, or I should work on another solution until this is fixed.
Thanks again.
from ti.goosh.
While we're working on a solution for this issue, one possible way to avoid this is to check with the server for unopened notifications.
- When sending a notification to a device, save it in the database with status unopened
- When opening the app, make a call to your API checking for unopened notifications for that device
- Treat the notification as if it has just arrived
This should provide a temporary fix
from ti.goosh.
@progress44 any status update yet?
from ti.goosh.
The issue is still open. Try the solution above
from ti.goosh.
Any fix yet? i'm getting the same error using ti.goosh 4.0.0 with TiSDK 7.0.1
from ti.goosh.
I've just tested it (4.1.0) and everything works like a charm wether the app is opened, in background, closed or killed, thanks a lot @kopiro
But I did find the bug where if click the notification i get the popup "Restart Required" infinite times,
luckily i already encountered this bug back in 2015 the solution is to add the following to tiapp.xml
<property name="ti.android.bug2373.finishfalseroot" type="bool">true</property>
And everything is in order :)
from ti.goosh.
HI @Sofianio, did you get this error on every device and every time your clicked on the tray?
from ti.goosh.
@kopiro Here are my test results:
-
Galaxy S5 (Android6): it happens every time i click on the tray, and i get the popup infinite times
-
Wiko U Feel Lite (Android6): it happens every time i click on the tray, but i get the popup once and the app never opens
-
Galaxy S6 (Android7): the bug didn't happen, everything works fine
I hope this helps.
from ti.goosh.
Related Issues (20)
- How can we use both ios? HOT 3
- Failed to get GCM Registration Token:TIMEOUT HOT 1
- Cannot build with 7.1.0 SDK. HOT 10
- Crash Report HOT 2
- Crash report from Google Play HOT 1
- Crash report HOT 2
- Recent crash report HOT 10
- java.lang.ClassCastException receiving foregrounded FCM ttl and sent_time HOT 2
- Silent notification not receiving payload? HOT 2
- Getting invalid sender error
- Compilation Error HOT 10
- targetSdkVersion="26" Notifications not received on some android device HOT 24
- Android Oreo Issue --Notification is not receiving in background HOT 3
- Not getting callback when the app is in background or killed HOT 27
- [WARN] : W/ti.goosh.IntentService: Show Notification: FALSE HOT 5
- ti.goosh and ti.admob together
- Use Android notification channels HOT 1
- Firebase support - internal dependencies HOT 8
- Remove app from background, No notification get
- Need to bump version for TiSDK 9.x version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ti.goosh.