Git Product home page Git Product logo

Comments (25)

progress44 avatar progress44 commented on May 25, 2024

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.

jcsomac avatar jcsomac commented on May 25, 2024

Hi... the app is open, and yes, i am using 1.6.1 version of the module.

from ti.goosh.

progress44 avatar progress44 commented on May 25, 2024

Does this happen always?

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

Yeap... i am trying right now, cleaning the project, and rebuilding it again.. and is the same..

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

Confirmed one more time.
and for the record, the notification arrives. but i want to do something when that happend.

d2491553-ad1d-45df-9bca-f6345ec45bc6

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.

progress44 avatar progress44 commented on May 25, 2024

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.

jcsomac avatar jcsomac commented on May 25, 2024

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.

screen shot 2016-10-09 at 2 59 23 pm

maybe is some bad android configuration ?
thanks in advance.

from ti.goosh.

kopiro avatar kopiro commented on May 25, 2024

Are you calling you iniciarApp on boot?

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

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.

kopiro avatar kopiro commented on May 25, 2024

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.

jcsomac avatar jcsomac commented on May 25, 2024

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.

jcsomac avatar jcsomac commented on May 25, 2024

hi guys... any news ? sugestions ?

from ti.goosh.

kopiro avatar kopiro commented on May 25, 2024

Could you post an entire log of adb logcat | grep goosh with boot + notification?

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

Sorry @kopiro how can i do that ?

from ti.goosh.

progress44 avatar progress44 commented on May 25, 2024

@jcsomac just open a terminal window and run the code adb logcat | grep goosh

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

BEM $ adb logcat | grep goosh
bash: adb: command not found

it was executed in the root folder of the project.

from ti.goosh.

progress44 avatar progress44 commented on May 25, 2024

run it as android_sdk/platform-tools/adb logcat | grep goosh where android_sdk is the path to your sdk

from ti.goosh.

kopiro avatar kopiro commented on May 25, 2024

@jcsomac ?

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

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.

kopiro avatar kopiro commented on May 25, 2024

Could you try to do a full reinstall of app?

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

hi @kopiro, you
mean the titanium studio? or the android app?

from ti.goosh.

kopiro avatar kopiro commented on May 25, 2024

The android app.

from ti.goosh.

jcsomac avatar jcsomac commented on May 25, 2024

And that's it !!!
Worked like magic....
Is there any explanaition about this ?

from ti.goosh.

kopiro avatar kopiro commented on May 25, 2024

Magic! :)
Anyway, I think something related to Android cache, but I don't really know.

from ti.goosh.

e-m-s-y avatar e-m-s-y commented on May 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.