Git Product home page Git Product logo

ti.goosh's People

Contributors

dfoxinator avatar ianko avatar jei avatar kopiro avatar m1ga avatar netoramalho avatar progress44 avatar robbe92 avatar slash-84 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ti.goosh's Issues

"No notification in Intent" when app is completely closed

See image:
schermafbeelding 2017-05-23 om 17 19 44

I'm using the exact syntax from the PHP sample in the readme, for test purposes. The callback is not triggered within the Titanium JS.

The above issue only happens when the app is completely closed. Having it in background results in correct behaviour.

Not working on Android 4.4.2

[DEBUG] : D/ti.goosh.TiGooshModule: No notification in Intent
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Google Play services out of date. Requires 8487000 but found 7895032
[WARN] : W/System.err: java.lang.NoClassDefFoundError: com.google.android.gms.R$string
[WARN] : W/System.err: at com.google.android.gms.common.internal.zzg.zzc(Unknown Source)
[WARN] : W/System.err: at com.google.android.gms.common.GooglePlayServicesUtil.zza(Unknown Source)
[WARN] : W/System.err: at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source)
[WARN] : W/System.err: at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source)
[WARN] : W/System.err: at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
[WARN] : W/System.err: at ti.goosh.TiGooshModule.checkPlayServices(TiGooshModule.java:89)
[WARN] : W/System.err: at ti.goosh.TiGooshModule.registerForPushNotifications(TiGooshModule.java:114)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:319)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203)

NullPointer after recieving Push

Hi
When i send a push with firebase console, i get an nullpointer exception:

[INFO] :   I/ti.goosh.IntentService: Not showing notification cause missing data.alert
[ERROR] :  TiApplication: (AsyncTask #1) [15040,15040] Sending event: exception on thread: AsyncTask #1 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference; Titanium 6.0.1,2016/12/19 16:51,undefined
[ERROR] :  TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference
[ERROR] :  TiApplication: 	at ti.goosh.IntentService.parseNotification(IntentService.java:122)
[ERROR] :  TiApplication: 	at ti.goosh.IntentService.onMessageReceived(IntentService.java:54)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
[ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
[ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
[ERROR] :  TiApplication: 	at java.lang.Thread.run(Thread.java:761)

any idea how i could work it out?
In firebase console I tried using the basic message as well as the advanced options adding key/value but with same outcome.

I'm using v.2.0 of the module.

Implement additional keys and features

In the payload, you can specify additionally:

Key Type Description Example
vibrate Array Set the vibration pattern to use. [100,200,0,100,200...]
lights String Set the argb value that you would like the LED on the device to blnk, as well as the rate [ "#FF00FF", 200, 100 ]
ongoing Boolean Set whether this is an ongoing notification. true
group String Set this notification to be part of a group of notifications sharing the same key. 'groupA'
when Number Set the time that the event occurred. Notifications in the panel are sorted by this time. 1470058413
only_alert_once Boolean Set this flag if you would only like the sound, vibrate and ticker to be played if the notification is not already showing. true

Docs: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html

Be careful that:

  • vibrate is already a param Boolean. We should check its implicit type.

unregisterForPushNotifications causes crash with suplied Google Play Services JARs

I try to unregister push notifications, when I call TiGoosh.unregisterForPushNotifications() I get the following crash:

 FATAL EXCEPTION: AsyncTask #2
 Process: com.xxx.yyy, PID: 8258
 java.lang.RuntimeException: An error occurred while executing doInBackground()
 	at android.os.AsyncTask$3.done(AsyncTask.java:309)
 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
 	at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 	at java.lang.Thread.run(Thread.java:818)
 Caused by: java.lang.NoSuchMethodError: No virtual method deleteToken(Ljava/lang/String;Ljava/lang/String;)V in class Lcom/google/android/gms/iid/InstanceID; or its super classes (declaration of 'com.google.android.gms.iid.InstanceID' appears in /data/app/com.xxx.yyy-1/base.apk)
	at ti.goosh.TiGooshModule$1.doInBackground(TiGooshModule.java:148)
 	at ti.goosh.TiGooshModule$1.doInBackground(TiGooshModule.java:144)
 	at android.os.AsyncTask$2.call(AsyncTask.java:295)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 	... 4 more

Im using supplied Google Play Services JARs (gps-jars/google-play-services-gcm+maps.jar)

I tink the root of the issue is in proguard confs (eg. gps-jars/gcm+maps.conf), they should also keep com.google.android.gms.iid.InstanceID calss?

Cancel a notification

How can I cancel a notification?
I need because the user can not click on the notification and open the application to see the contents.

When app is closed: No valid root or current activity found for application instance

When my app is completely closed and I click the notification, I get the "No valid root or current activity found for application instance"

Im using ti.goosh 2.0.6 and TiSDK 6.0.4. I have also tried to compile my app using TiSDK 6.0.1, but still getting the same error.

There is similar (closed) issue #47 but with no actual solution, other than using TiSDK 6.0.4?

Titanium Javascript Runtime Error

Hello,

I got this error :

[ERROR] : TiExceptionHandler: (main) [718,718] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,718] - In app.js:14,9
[ERROR] : TiExceptionHandler: (main) [0,718] - Message: Uncaught Error: Failed resolution of: Lcom/google/android/gms/R$string;
[ERROR] : TiExceptionHandler: (main) [0,718] - Source: TiGoosh.registerForPushNotifications({
[ERROR] : V8Exception: Exception occurred at app.js:14: Uncaught Error: Failed resolution of: Lcom/google/android/gms/R$string;

Titanium 5.3.0 GA

I installed module from help/install mobile module with ti.goosh-android-1.0.1.zip file.

I used the code sample in example folder in module, What I did wrong please ?

Thanks in advance.

MissingRegistration

Today... with no changes in my code i am receiving this every time i want to send a push:

stdClass Object ( [multicast_id] => 5448133919056867326 [success] => 0 [failure] => 1 [canonical_ids] => 0 [results] => Array ( [0] => stdClass Object ( [error] => MissingRegistration ) ) )

The code i use to send the push is:

screen shot 2017-05-03 at 1 46 50 pm

You can check the line 57 and 58, i've try those lines too with no success.
Is there something new i have to change in my app ?
i am using TiGoosh 2.0.5 and Titanium SDK 6.0.3

Thanks in advance..

Integration with Pushbots

Hello,

I am currently using as Push Notifications service to service Pushbots, where unfortunately there is no support for Appcelerator.

Create a function that makes the record via its API on my device when using TiGoosh for Token generation.

However, the listener at least TIGoosh using this service (Pushbots) does not work.

I'm combining bad services? Or something is wrong? Any support will be very useful.

Greetings from Mexico

Inconsistent behaviour

02-21 10:57:19.413: E/AndroidRuntime(28868): FATAL EXCEPTION: AsyncTask #4
02-21 10:57:19.413: E/AndroidRuntime(28868): Process: com.mytitaniumapp, PID: 28868
02-21 10:57:19.413: E/AndroidRuntime(28868): java.lang.NullPointerException: Attempt to invoke virtual method 'void ti.goosh.TiGooshModule.sendMessage(java.lang.String, java.lang.Boolean)' on a null object reference
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at ti.goosh.IntentService.parseNotification(IntentService.java:130)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at ti.goosh.IntentService.onMessageReceived(IntentService.java:54)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
02-21 10:57:19.413: E/AndroidRuntime(28868): 	at java.lang.Thread.run(Thread.java:818)

Any clue on why the above error happens? This module seems quite unstable at times. Am I missing some manifest rules? I'm testing a few situations here:

  • App in background (push notification is received, but opening it will not trigger a TiGoosh callback function)
  • App is in foreground (push notification is not visible in menu, but callback triggers as its supposed to)
  • App is inactive (push notification is received, but opening it will not trigger a callback. It will just open the app)

Platform: Sony Xperia Z3 Compact, Android 6.0.1

firebase notifications when app is closed

I know there where reports before, but are marked as closed and I'm still experiencing the same issue

when my app is in the background and receives a notification it shows properly and i get this log

[DEBUG] D/ti.goosh.IntentService: Push notification received from: 545132955493
[DEBUG] D/ti.goosh.IntentService: Notification key : google.sent_time => 1490879315641 (java.lang.Long)
[DEBUG] D/ti.goosh.IntentService: Notification key : data => {"alert":"Qwer","sound":"default","chatRoomId":"db08cfbe-ec47-4d31-8bd4-f4e308180a6b","force_show_in_foreground":true,"vibrate":true,"chatRoomName":"Ivan Sarpi","title":"Ivan Sarpi"} (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : title => Ivan Sarpi (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : google.message_id => 0:1490879315646921%%bbb352d4f9fd7ecd (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : message => Qwer (java.lang.String)

when i click that notification i get this

[DEBUG] D/ti.goosh.TiGooshPushHandlerActivity: started
[DEBUG] [TiPush]: {"inBackground":true,"data":"{\"alert\":\"Qwer\",\"sound\":\"default\",\"chatRoomId\":\"db08cfbe-ec47-4d31-8bd4-f4e308180a6b\",\"force_show_in_foreground\":true,\"vibrate\":true,\"chatRoomName\":\"Ivan Sarpi\",\"title\":\"Ivan Sarpi\"}"}
[INFO] {"alert":"Qwer","sound":"default","chatRoomId":"db08cfbe-ec47-4d31-8bd4-f4e308180a6b","force_show_in_foreground":true,"vibrate":true,"chatRoomName":"Ivan Sarpi","title":"Ivan Sarpi"}

and it does what it's suppose to do (open a new window)

now, when the app is closed, i get this log when the notification arrives (it shows properly)

[DEBUG] D/ti.goosh.IntentService: Push notification received from: 545132955493
[DEBUG] D/ti.goosh.IntentService: Notification key : google.sent_time => 1490879747307 (java.lang.Long)
[DEBUG] D/ti.goosh.IntentService: Notification key : data => {"alert":"Sfdac","sound":"default","chatRoomId":"db08cfbe-ec47-4d31-8bd4-f4e308180a6b","force_show_in_foreground":true,"vibrate":true,"chatRoomName":"Ivan Sarpi","title":"Ivan Sarpi"} (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : title => Ivan Sarpi (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : google.message_id => 0:1490879747312886%%bbb352d4f9fd7ecd (java.lang.String)
[DEBUG] D/ti.goosh.IntentService: Notification key : message => Sfdac (java.lang.String)

but when i click it, it only opens the app and doesn't open the new window, it says this in the logs

[DEBUG] D/ti.goosh.TiGooshPushHandlerActivity: started
[ERROR] TiApplication: (main) [45015,45015] No valid root or current activity found for application instance
[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
[INFO] TiApplication: (main) [1,1] Analytics have been disabled
[WARN] V8Object: (KrollRuntimeThread) [235,236] Runtime disposed, cannot set property 'userAgent'
[WARN] TiApplication: (KrollRuntimeThread) [5,241] Registering module with name already in use.
[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.ubqti.mega.UbqtiMegaActivity@7aeb756
[DEBUG] Window: Checkpoint: postWindowCreated()
[WARN] TiApplication: (KrollRuntimeThread) [115,115] Registering module with name already in use.
[DEBUG] D/ti.goosh.TiGooshModule: No notification in Intent

I'm using titanium 6.0.3.GA
and ti.goosh 2.0.5

thanks!

edit:

also, could it be related to this i have in my manifest?

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest android:versionCode="1" android:versionName="1.00">
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
        <uses-permission android:name="android.permission.READ_CONTACTS"/>
        <application android:hardwareAccelerated="true" android:theme="@style/Light">
            <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
            <activity
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:label="@string/app_name"
                android:name=".UbqtiMegaActivity"
                android:theme="@style/Theme.Titanium">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
                <intent-filter>
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT"/>
                    <category android:name="android.intent.category.BROWSABLE"/>
                    <data android:scheme="ubqtimega"/>
                </intent-filter>
            </activity>
        </application>
    </manifest>
</android>

sendMessage invoked but no messageCallback defined

Hi.

When sending a notification from the server console appcelerator answer me this: [ERROR]: E / ti.goosh.TiGooshModule: sendMessage Invoked messageCallback but not defined

A This message is?

Thank you

Unable to set custom notificationicon.png

I try to set custom notificationicon.png, as described on readme. My icon file is in app\platform\android\res\drawable-*\notificationicon.png folders (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi).

When my app receives notifications, devices displays app icon as notification icon (which is default/fallback icon).

I have also tried to use the icon provided by ti.goosh (removed my own icon, so the icons comes from module), but with same result.

When I build my app, titanium packs notificationicon.png to drawable-*-v4 folder, which should not be the issue?

Im using TiSDK 6.0.4.GA

NullpointerExceptions reported on Play Store

We've gotten support tickets on crashes related to push notifications but the only one we've seen ourselves is on Android 4.x devices where the app is completely shut down and then crashes when opening an push notification.

From the log on Play Store I get these two errors regarding goosh:

This one comes from Android 5.x - 7.x

java.lang.NullPointerException: Attempt to invoke virtual method 'void ti.goosh.TiGooshModule.sendMessage(java.lang.String, java.lang.Boolean)' on a null object reference
	at ti.goosh.IntentService.parseNotification(IntentService.java:130)
	at ti.goosh.IntentService.onMessageReceived(IntentService.java:54)
	at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
	at java.lang.Thread.run(Thread.java:818)

This one comes from Android 4.4

java.lang.NullPointerException
	at ti.goosh.IntentService.parseNotification(IntentService.java:130)
	at ti.goosh.IntentService.onMessageReceived(IntentService.java:54)
	at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
	at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:841)

Are these known bugs?

We're using ti.goosh 1.6.2 with Titanium SDK 5.5.1

Notification icon is not showing correctly in notification bar

I am seeing this circle icon instead of my icon i have set in the payload

img_20170301_103258

But when i pull down the notification bar, i can see the correct icon that I have set

img_20170301_103306_01

How do I change it so that I can see my icon even when the notification bar is not pulled down?

Multiple notifications in the notification drawer not opening app

I have some issues with the usage pattern described below:

  1. App receives >1 notifications, which is placed in the notification drawer.
  2. From the drawer the most recent notification is tapped, and opens the app.
  3. If the app is backgrounded and the other remaining notifications is tapped, the app is not opened, but the tapped notification is removed from the drawer.
  4. If a new notification is received, the new notification opens the app.

Have tested on several devices, with the same result.

Is this normal behaviour or am I missing something?

GET_ACCOUNTS permission requires privacy policy

Play Store wants me to provide a privacy policy for my apps, because this module is requesting "android.permission.GET_ACCOUNTS".

Is that permission required, or could it be removed?

This is the exact message I get: "Your app has an apk with version code 21 that requests the following permission(s): android.permission.GET_ACCOUNTS. Apps using these permissions in an APK are required to have a privacy policy set". I also got an email telling me to comply within March, 15, or else.

Error: Alloy is not defined

I am facing the same issue as described here on JIRA:

  1. App is closed manually in background
  2. There is a notification in notification bar for the app
  3. App is opened by tapping on the notification.
  4. An error with "Alloy is not defined" is displayed.

Have you experienced the same issue, but somehow managed to find a solution?

Conflict with ti.map module

Hello,
First of all I would like to thank you for great job you do!
Unfortunately I cannot compile app if I use ti.map (2.3.10) and ti.goosh (1.3.0) modules at the same time. If I compile application without ti.map OR ti.goosh no error occurs.
Please provide update or some information how I can fix this problem (I need to use both maps and notifications) in my app.

Here is the error:

Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd$zza$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzg$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzd$zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zzg;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/zze;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/playlog/internal/zza;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/playlog/internal/zzb;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/playlog/internal/zzd;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] : at com.android.dx.command.Main.main(Main.java:106)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] : ... 4 more

Regards

Uncaught Failed resolution of: Lcom/google/android/gms/R$string;

Finally got the module to run after a few hoops then when I tried to registerforpushnotifications I now get this error. Any ideas?

Ti.Goosh 2.0.6
Titanium 6.0.4

[ERROR] : TiExceptionHandler: (main) [204,206] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [0,206] - In /app.js:341,11
[ERROR] : TiExceptionHandler: (main) [0,206] - Message: Uncaught Failed resolution of: Lcom/google/android/gms/R$string;
[ERROR] : TiExceptionHandler: (main) [0,206] - Source: TiGoosh.registerForPushNotifications({
[ERROR] : V8Exception: Exception occurred at /app.js:341: Uncaught Failed resolution of: Lcom/google/android/gms/R$string;
[ERROR] : V8Exception: Failed resolution of: Lcom/google/android/gms/R$string;

Not sure if its relevant or related but incase it is, I also use Ti.GA and used the gps-jars folder fix which works and allows me to atleast launch the app with both modules enabled. But as soon as I try to registerforpush then this error pops up

Notification not received when app is closed.

Hello to all! First I want to thank you for this awesome module. It works better than ACS API and ArrowDB!

Second, I have a problem with a Android 6.0.0 device (Huawei P9) and:
Titanium SDK : 5.5.1
ti.goosh : 1.6.2

I send a push notification through FCM api:

$url = 'https://fcm.googleapis.com/fcm/send';

When the app is opened or in background, the notification are received as expected, but when I close the app (killed from multitasking window) and send a notification again, FCM return success: 1 (as expected) but the notification banner never appears in the phone.

Am I doing anything wrong? My app code is really easy, is the same as your example in the module :)

var TiGoosh = require('ti.goosh');
TiGoosh.registerForPushNotifications({

// The callback to invoke when a notification arrives.
callback: function(e) {
    //var data = JSON.parse(e.data || '');
    Ti.API.error(e);
},

// The callback invoked when you have the device token.
success: function(e) {
    // Send the e.deviceToken variable to your PUSH server
    Ti.API.error('Notifications: device token is ' + e.deviceToken);
},

// The callback invoked on some errors.
error: function(err) {
    Ti.API.error('Notifications: Retrieve device token failed', err);
}

});

Thanks again for your awesome job!

Pau.

Receiving notification while in background calls callback immediately

First off, outstanding job on this module. It seems to work really well for the most part, and I'm really excited to replace the old push notif module in my app with this.

I'm having one issue, as described in the title. In the documentation, the expected behavior for when the app is in the background is, "if the app is in background, the standard OS view for incoming notifications is shown. If you click on that banner, the callback is invoked with the notification payload + the property inBackground = true" That's exactly the behavior I would like, but it doesn't seem to be working.

If my app is in the background and a notification is received, callback is called right away rather than when the notification is tapped. However, if you completely close the app, then it works as expected (callback gets called with expected data right when the app starts).

Any help is greatly appreciated, thanks!

Failed to run dexer

Well.. this is happening when i try to build the app in the device.
i just add the module in the titanium project with other code, just adding, compiling and bum!

[ERROR] :  Failed to run dexer:
[ERROR] :  
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added:     Lcom/google/android/gms/common/AccountPicker;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added:     Lcom/google/android/gms/common/ConnectionResult;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added:     Lcom/google/android/gms/common/ErrorDialogFragment;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GoogleApiAvailability;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesRepairableException;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil$zza;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/Scopes;
[ERROR] :  
[ERROR] :  UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] :  java.lang.RuntimeException: Translation has been interrupted
[ERROR] :  	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] :  	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] :  	at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] :  	at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] :  	at com.android.dx.command.Main.main(Main.java:106)
[ERROR] :  Caused by: java.lang.InterruptedException: Too many errors
[ERROR] :  	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] :  	... 4 more

if i remove the module, the app is created with no problem.
I am using classic development with SDK 5.5.1 GA, TiGoosh 1.6.2
Thanks in advance.

error register notifications

Hi I have this new error , compiling an app to a version of j5 samsung android 5.1.1

[ERROR] : E/ti.goosh.RegistrationIntentService: Failed to get GCM Registration Token:SERVICE_NOT_AVAILABLE
[ERROR] : Notifications: Retrieve device token failed [object Object]

failed: dlopen failed: could not load library "libstlport_shared.so"

As per title, when compiling my project with the appcelerator sdk 6.0.1 GA and 6.0.0 GA I encounter this error on the app startup
failed: dlopen failed: could not load library "libstlport_shared.so" needed by "libti.goosh.so"; caused by library "libstlport_shared.so" not found

ti.goosh Google Play Service library creation

Hello,
Due to Titanium + Android bug (or behaviour) regarding the multidex, if user would have an app using ti.goosh module with ti.map module then will have problems during compilation.
Solution suggested by @kopiro is to create stripped version of Google Play Services (https://medium.com/all-titanium/deal-with-titanium-modules-and-its-missing-support-for-android-multidex-546de5486d13).
Could you provide how is your proguard.conf file looking like (what are required classes), so any user could modify it to achieve simultaneously work of both modules?
Thanks in advance.

Valid Titanium Module

I´m not using additional modules and i get this error:

Could not find a valid Titanium module id=ti.goosh version=latest platform=android deploy-type=development.

[ERROR] :  Could not find all required Titanium Modules:
[ERROR] :     id: ti.goosh	 version: latest	 platform: android	 deploy-type: development
   <modules>
    <module platform="android">ti.goosh</module>
  </modules>

I installed the module using gittio and is located under modules/android/ti.goosh

Any ideas?

Thank you!

Android issue when close app

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?

Blank black screen when going to notif

Using the latest version (1.6.2), I've had an issue reported from some users. It doesn't happen a all the time, but it has been happening fairly frequently. Sometimes when the app is opened from a notif, it goes directly to a blank, all-black screen. But if you hit the system back button, it goes to the correct screen showing the correct content. Any idea why that black screen might be coming up?

inBackground is true while it should be false

Hello,

I've successfully implemented this module to my app and I stumbled upon something. I've made a request, while the app is in foreground, to Google to send me a notification. This works and the app correctly tells me that inBackground is false. Now that I've added the force_show_in_foreground: true node to the same request it tells me that inBackground is true whilst it's not.

  • Ti SDK 5.4.0
  • Android 6.0.0
  • HTC one M8

EDIT: I forgot to mention that this issue only appears when you click on the notification.

Set senderid at runtime

Any way to define the following line at runtime:

<property name="gcm.senderid">1118111711111</property>

The issue im having is that I want a separate environment for development devices vs production devices. Firebase doesnt seem to particularly support this, so the only way is to define 2 projects.

However, when registering APN tokens with FCM/GCM (see https://developers.google.com/instance-id/reference/server#create_registration_tokens_for_apns_tokens), i am able to pass sandbox:true/false which determines which Certificate (Apple developers config) GCM should use when sending to that Apple device.

So in my Firebase project I can seem to define a dev+prod environment for iOS, but for Android there is none.

Question on remoteNotificationsEnabled on second app load

Quick question on the remoteNotificationsEnabled method.

On first app load when I get the token initially everything works great. The remoteNotificationsEnabled code works and will return true if I accept it. Once I close the app, on initialization when I use that to check to see if I should request push or not I get:

[INFO] :   TiGoosh.remoteNotificationsEnabled false
[INFO] :   TiGoosh.remoteDeviceUUID dgpX***PJ22M

Because I'm getting the device token, shouldn't remoteNotificationsEnabled be true? Looking over the source code it seems like it's only being set in the registerForPushNotifications success and failure callbacks.

So the question is, is remoteNotificationsEnabled really only supposed to be used AFTER firing registerForPushNotifications during that specific app load, and not between app loads?

Is it possible to create a method that verifies that 1) There is a DeviceUUID AND they have enabled push notifications (something like https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat.html#areNotificationsEnabled()).

App crash when notification tapped

I'm trying to replace our existing GCM module (the morinel module) with yours. Your module looks good, but I get occasional app crashes after a user taps a notification. And, I'm seeing errors in the console that I suppose might be related.

Scenario where this just happened:

  1. I uninstalled my app to remove all registered services, etc.
  2. With ti.goosh now integrated, I build & install the app to my device
  3. I opened the app once to register the services, register for push & save the token, etc. Then I exited the app (with the back button)
  4. I send a test push.
  5. I tap the notification and my app comes to the foreground but the "Sorry, APPNAME has crashed" alert is shown. I tap OK and my app continues to load. I think what is happening is that the old app instance is being killed because I see that our app_destroy handler is being called. This is perhaps a case of you using the wrong launch intent type.

I also see the following in the console logs, which may be a separate issue:

[ERROR] TiApplication: (AsyncTask #2) [191744,195672] Sending event: exception on thread: AsyncTask #2 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonPrimitive com.google.gson.JsonObject.getAsJsonPrimitive(java.lang.String)' on a null object reference; Titanium 5.2.2,2016/03/28 14:12,b685ddb
[ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonPrimitive com.google.gson.JsonObject.getAsJsonPrimitive(java.lang.String)' on a null object reference
[ERROR] TiApplication:  at ti.goosh.IntentService.parseNotification(IntentService.java:130)
[ERROR] TiApplication:  at ti.goosh.IntentService.onMessageReceived(IntentService.java:47)
[ERROR] TiApplication:  at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
[ERROR] TiApplication:  at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
[ERROR] TiApplication:  at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
[ERROR] TiApplication:  at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
[ERROR] TiApplication:  at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
[ERROR] TiApplication:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
[ERROR] TiApplication:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
[ERROR] TiApplication:  at java.lang.Thread.run(Thread.java:818)
[ERROR] AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
[ERROR] AndroidRuntime: Process: com.acvauctions.demo, PID: 27557
[ERROR] AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonPrimitive com.google.gson.JsonObject.getAsJsonPrimitive(java.lang.String)' on a null object reference
[ERROR] AndroidRuntime:     at ti.goosh.IntentService.parseNotification(IntentService.java:130)
[ERROR] AndroidRuntime:     at ti.goosh.IntentService.onMessageReceived(IntentService.java:47)
[ERROR] AndroidRuntime:     at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
[ERROR] AndroidRuntime:     at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
[ERROR] AndroidRuntime:     at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
[ERROR] AndroidRuntime:     at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
[ERROR] AndroidRuntime:     at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
[ERROR] AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
[ERROR] AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
[ERROR] AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)
[INFO]  Process: Sending signal. PID: 27557 SIG: 9

App crashes when receiving Push (FCM)

Hi,

since FCM is "the future" I think we need a solution for this, so we can work with it :)

If i send a test notification over FCM my app crashes.

[ERROR] : TiApplication: (AsyncTask #3) [56387,57328] Sending event: exception on thread: AsyncTask #3 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference; Titanium 6.0.1,2016/12/19 16:51,undefined [ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference [ERROR] : TiApplication: at ti.goosh.IntentService.parseNotification(IntentService.java:122) [ERROR] : TiApplication: at ti.goosh.IntentService.onMessageReceived(IntentService.java:54) [ERROR] : TiApplication: at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source) [ERROR] : TiApplication: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] : TiApplication: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

Not sure how to set the "alert" object, since there is no such input on the fcm page. Just Keypairs. Any help would be great.

already added error during compile

Hi, i'm trying to use Ti.Map and Ti.Goosh together. I followed step by step your procedure (this is a screenshot: http://s11.postimg.org/bhvi7dg8j/tre.png ), but i get this error during compile:

[ERROR] Failed to run dexer: [ERROR] [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ConnectionResult; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ErrorDialogFragment; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GoogleApiAvailability; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesNotAvailableException; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesRepairableException; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil$zza; [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/Scopes; [ERROR] [ERROR] UNEXPECTED TOP-LEVEL EXCEPTION: [ERROR] java.lang.RuntimeException: Translation has been interrupted [ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608) [ERROR] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311) [ERROR] at com.android.dx.command.dexer.Main.run(Main.java:277) [ERROR] at com.android.dx.command.dexer.Main.main(Main.java:245) [ERROR] at com.android.dx.command.Main.main(Main.java:106) [ERROR] Caused by: java.lang.InterruptedException: Too many errors [ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600) [ERROR] ... 4 more

my version.xml files are both:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="google_play_services_version">8487000</integer>
</resources>

I'm using Genymotion as emulator.

What i wrong?

Luca

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.