Comments (25)
What's the status of the app when this happens? Is it in the background, closed or open? Are you using the latest version of ti.goosh?
from ti.goosh.
Hi... the app is open, and yes, i am using 1.6.1 version of the module.
from ti.goosh.
Does this happen always?
from ti.goosh.
Yeap... i am trying right now, cleaning the project, and rebuilding it again.. and is the same..
from ti.goosh.
Confirmed one more time.
and for the record, the notification arrives. but i want to do something when that happend.
i want to insert the notification in a table to create a "notification counter".
But with no "callback" event, there is no way to doit.
Thanks for the help
from ti.goosh.
Yeah I understand. The callback is supposed to work. That's why we put it there. We're going to investigate the issue and see why this is happening.
from ti.goosh.
hi again, i dont know if this can help you to help me, but i tried the old module caffeine.gcm and i got the same error message.
maybe is some bad android configuration ?
thanks in advance.
from ti.goosh.
Are you calling you iniciarApp
on boot?
from ti.goosh.
hi kopiro, yeap, iniciarapp() is a function, and i called just after some vars set.
The code you see, is the app.js
thanks.
from ti.goosh.
Hi @jcsomac, maybe is not related, but you should never use the Ti.App.[VAR]
form to store global objects.
From Titanium SDK starter tutorial:
Many users attempt to add to the Ti namespace as a means to persist data across contexts, extend / override native methods, etc. This can sometimes work but is very unreliable for the following reasons:
The Titanium end objects are really not true JavaScript objects. They are proxy representations of native operating system components. As such, they are constructed to pass through properties and method invocations. Your extensions could conflict with native functionality or interfere with proper operation of the proxy objects.
Sometimes you might be able to store things on the namespace but it's not changeable (i.e. an array stored on the namespace might not be able to be modified - mutable, etc.). Other-times your stored objects will be completely null.
Since this isn't an approved way of storing anything, there's no guarantee it will work in future releases of Titanium.
As a rule do not add to, or extend via the prototype, any object or module in the Titanium namespace. If you want to extend a core part of the Titanium API you should build a native module to accomplish this. If you're just looking for an extendible JS namespace, create your own (i.e. {{var MyApp={} }}).
Could you just try to write:
require('ti.goosh').registerForPushNotifications
from ti.goosh.
Thanks Kopiro, and yes, this is old code and i am changing all that bad practices...
The problem persist when i try:
require('ti.goosh').registerForPushNotifications
but thanks anyhow..
from ti.goosh.
hi guys... any news ? sugestions ?
from ti.goosh.
Could you post an entire log of adb logcat | grep goosh
with boot + notification?
from ti.goosh.
Sorry @kopiro how can i do that ?
from ti.goosh.
@jcsomac just open a terminal window and run the code adb logcat | grep goosh
from ti.goosh.
BEM $ adb logcat | grep goosh
bash: adb: command not found
it was executed in the root folder of the project.
from ti.goosh.
run it as android_sdk/platform-tools/adb logcat | grep goosh
where android_sdk is the path to your sdk
from ti.goosh.
@jcsomac ?
from ti.goosh.
Sorry i was on vacations...
here is the output:
platform-tools $ ./adb logcat | grep goosh
D/PMS ( 849): acquireWL(21a1b2de): PARTIAL_WAKE_LOCK wake:com.bebesetmamans.forum/ti.goosh.IntentService 0x1 21357 10160 null
D/ti.goosh.IntentService(21357): Push notification received from: 713904143143
D/ti.goosh.IntentService(21357): Notification key : google.sent_time => 1476888270165 (java.lang.Long)
D/ti.goosh.IntentService(21357): Notification key : data => {"badge":1,"data":{"parent":"9565","child":"9621"},"alert":"Une maman vient de répondre à votre question al reves !","sound":"default","force_show_in_foreground":true,"vibrate":true,"tag":"APP","id":76763,"only_alert_once":false,"title":"Réponse du Forum BébésetMamans"} (java.lang.String)
D/ti.goosh.IntentService(21357): Notification key : google.message_id => 0:1476888270182359%54275acff9fd7ecd (java.lang.String)
D/ti.goosh.IntentService(21357): Notification key : collapse_key => do_not_collapse (java.lang.String)
E/ti.goosh.TiGooshModule(21357): sendMessage invoked but no messageCallback defined
D/PMS ( 849): releaseWL(21a1b2de): PARTIAL_WAKE_LOCK wake:com.bebesetmamans.forum/ti.goosh.IntentService 0x1 null
from ti.goosh.
Could you try to do a full reinstall of app?
from ti.goosh.
hi @kopiro, you
mean the titanium studio? or the android app?
from ti.goosh.
The android app.
from ti.goosh.
And that's it !!!
Worked like magic....
Is there any explanaition about this ?
from ti.goosh.
Magic! :)
Anyway, I think something related to Android cache, but I don't really know.
from ti.goosh.
A full re-install of my app also fixed: Sending event: exception on thread: AsyncTask #1 msg:java.lang.NullPointerException.
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.