Comments (9)
Do you see the notification being delivered to the device or simulator? Check with adb logcat
and grep for GCM
from gcmpush.
I'm testing on device but I don't see anything when I try the broadcast.
When I use just the registrationID its working and I get:
[TRACE] GCMBroadcastReceiver: onReceive: com.google.android.c2dm.intent.RECEIVE
[TRACE] GCMBroadcastReceiver: GCM IntentService class: nl.vanvianen.android.gcm.GCMIntentService
[TRACE] GCMBaseIntentService: Intent service name: GCMIntentService--3
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--3]) [2342648,2343767] Push notification received
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--3]) [1,2343768] Message key: from value: xxx
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--3]) [0,2343768] Message key: collapse_key value: do_not_collapse
[ERROR] GCMIntentService: (IntentService[GCMIntentService--3]) [23,2343791] drawable.notification_icon not found; make sure it's in platform/android/res/drawable
[ERROR] GCMIntentService: (IntentService[GCMIntentService--3]) [0,2343791] Invalid setting priority, should be int, between PRIORITY_MIN (-2) and PRIORITY_MAX (2)
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--3]) [5,2343796] Message received but no message so will make this silent
[INFO] Push callback = {"data":{"from":"xxx","collapse_key":"do_not_collapse"}}
[INFO] AppCompatDelegate: The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
[TRACE] GCMBroadcastReceiver: onReceive: com.google.android.c2dm.intent.RECEIVE
[TRACE] GCMBroadcastReceiver: GCM IntentService class: nl.vanvianen.android.gcm.GCMIntentService
[TRACE] GCMBaseIntentService: Intent service name: GCMIntentService--4
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [68213,2412009] Push notification received
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: from value: xxx
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: title value: The title to send
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: message value: The message to send
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: collapse_key value: do_not_collapse
[ERROR] GCMIntentService: (IntentService[GCMIntentService--4]) [63,2412072] Invalid setting priority, should be int, between PRIORITY_MIN (-2) and PRIORITY_MAX (2)
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [8,2412080] Creating notification...
[INFO] GCMIntentService: (IntentService[GCMIntentService--4]) [10,2412090] Group: MyNotificationGroup
[INFO] GCMIntentService: (IntentService[GCMIntentService--4]) [1,2412091] LocalOnly: false
[INFO] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412091] Priority: 0
[INFO] GCMIntentService: (IntentService[GCMIntentService--4]) [6,2412097] Vibrate: true
[INFO] GCMIntentService: (IntentService[GCMIntentService--4]) [1,2412098] Insistent: true
[INFO] Push callback = {"data":{"message":"The message to send","from":"xxx","collapse_key":"do_not_collapse","title":"The title to send"}}
it won't stop vibrating until I click the message, if I set vibrate to false it won't vibrate once.
So I guess the problem is the php script, not your module
from gcmpush.
Set insistent: false
(the default), that will stop the vibrating
from gcmpush.
The last line of your log file shows the code that will be triggered when the notification is delivered while the app is in the foreground. Please add e.g. an AlertDialog to show something on the screen.
from gcmpush.
Oh, and also note the line:
Message received but no message so will make this silent
Add a message to your server-sent notification data (instead of title)
from gcmpush.
I have a title:
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: title value: The title to send
[DEBUG] GCMIntentService: (IntentService[GCMIntentService--4]) [0,2412009] Message key: message value: The message to send
and it was displayed in the notification. Dialog is working, too.
But only when I send it to the ID directly. But as I said, that might be the problem of the php script since this is working now
from gcmpush.
my bad!
I thought the "group" was the gcm subscriber (https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmPubSub). That is the group the php script uses but it's not implemented in your plugin. Would be a nice feature!
from gcmpush.
#8
need to make some adjustments but it will subscribe to a group and you can send push messages to a group now
from gcmpush.
Thanks, I've incorporated your changes, edited them and changed some of the callbacks slightly. I also trimmed down the Google Play JAR file to prevent incompatibilities with e.g. ti.maps.
Version 1.2 has been released.
from gcmpush.
Related Issues (20)
- Can't install the module HOT 2
- google.sent_time expected String -> crash HOT 8
- Error: Alloy is not defined HOT 1
- Module not compatible with SDK 5.4.0 ?? HOT 4
- FCM compatibility HOT 15
- registerPush called twice HOT 3
- compiled module HOT 2
- Titanium sdk 6.0.0 support? HOT 46
- Exception en Google Play Store
- Notification Push when app is closed and I want launch a specific function. HOT 1
- library "libstlport_shared.so" not found with 6.0.x sdks HOT 6
- Remove USE_CREDENTIALS from timodule.xml
- no compile sdK 6.1.1 HOT 10
- Click listener on notifications in android HOT 10
- Not support for Titanium sdk 6.3.0 ? HOT 2
- Failed to package application running version 1.6 and with titanium sdk 6.1.3
- Using Titanium SDK 7.0.0 GA and module version 2.0
- Support for Android O
- Android O crash
- Android notification does not appear in the android device notification center if the android:targetSdkVersion="26" 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 gcmpush.