Comments (5)
Can you show a relevant adb logcat
output when your app receives a notification?
from gcmpush.
I've stripped out the many AwesomePlayer and other media-related entries (which I assume are related to the sound being played with the notification). I hope I've captured the details you're looking for. These events start from when the notification is received.
The app is running and open on my screen a moment before the I/TiAPI (30236) receivePush
entry appears in the logcat output. That's code from the function that is supposed to be run when the user taps the notification.
V/MediaPlayerService( 304): [173] setParameter(1400)
V/MediaPlayerService( 304): setAudioAttributes_l() usage=5 content=4 flags=0x0 tags=
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [65,164901] Push notification received
V/MediaPlayerService( 304): [173] prepareAsync
V/AwesomePlayer( 304): prepareAsync
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [1,164902] Message key: seller_id value: 79
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [1,164903] Message key: status value: active
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164903] Message key: from value: my_gcm_key
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [1,164904] Message key: sound value: caralarm.wav
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164904] Message key: title value: A New Auction Has Begun: 2006 Infiniti G35
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [1,164905] Message key: auction_id value: 1631
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164905] Message key: message value: 2006 Infiniti G35 Base
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164905] Message key: collapse_key value: do_not_collapse
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [5,164910] Title: A New Auction Has Begun: 2006 Infiniti G35
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164910] Message: 2006 Infiniti G35 Base
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164910] Ticker: null
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164910] Creating notification...
I/MediaFocusControl( 938): AudioFocus requestAudioFocus() from android.media.AudioManager$f23810f hint:3
V/MediaPlayer-JNI( 1197): start
V/MediaPlayer( 1197): start
V/MotionRecognitionManager( 938): .registerListenerEvent : success. listener count = 0->1, motion_events=1,
I/NotificationService( 938): Reg. OverTurn
V/Vibrator( 938): Called vibrateNotification() API - PUID: 1000, PackageName: android, type: 13
D/NotificationService( 938): Noti Alert - doVibrate true convertStoV=false
V/Vibrator( 938): Called vibrateImmVibe(int, MagnitudeType) API - PUID: 1000, PackageName: android
D/VibratorService( 938): Turning vibrator off - ImmVibe.
V/MediaPlayerService( 304): [173] setLooping(0)
V/StagefrightPlayer( 304): setLooping
V/AwesomePlayer( 304): setLooping (0)
V/VibratorService( 938): vibrateImmVibe - package: android, type: 13, magnitude: 10000
V/Vibrator( 938): vibrateImmVibe - PUID: 1000, PackageName: android, type: 13, mag: 10000
V/MediaPlayerService( 304): [173] setVolume(1.000000, 1.000000)
V/AudioSink( 304): setVolume(1.000000, 1.000000)
V/MediaPlayerService( 304): [173] setAuxEffectSendLevel(0.000000)
V/AudioSink( 304): setAuxEffectSendLevel(0.000000)
V/MediaPlayerService( 304): [173] start
V/StagefrightPlayer( 304): setLooping
V/AwesomePlayer( 304): setLooping (0)
V/AudioSink( 304): start
W/NotificationService( 938): Pray mode not found android.content.pm.PackageManager$NameNotFoundException: Application package com.sec.android.settings.praymodewidget not found
V/AudioPolicyManager( 304): startOutput() output 2, stream 5, session 623
V/AudioPolicyManager( 304): changeRefCount() stream 5, count 1
V/AudioPolicyManager( 304): getNewOutputDevice() selected device 2
V/AudioPolicyManager( 304): setOutputDevice() output 2 device 0002 delayMs 0
V/AudioPolicyManager( 304): setOutputDevice() prevDevice 0002
V/AudioPolicyManager( 304): setOutputDevice() setting same device 0002 or null device for output 2
I/AudioPlayer( 304): First fillBuffer call!!
V/AwesomePlayer( 304): notifyListner_l() msg (6-MEDIA_STARTED), ext1 (0), ext2 (0)
V/MediaPlayerService( 304): [173] notify (0xb06102c0, 6, 0, 0)
D/EnterpriseController( 291): mIsMarkChainAdded is 0 mIsBlockChainAdded is 0 netId is 0
D/Netd ( 291): getNetworkForDns: using netid 519 for uid 10487
D/ACDB-LOADER( 304): ACDB -> send_audio_cal, acdb_id = 15, path = 0
D/ACDB-LOADER( 304): ACDB -> send_adm_topology
D/ACDB-LOADER( 304): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
D/ACDB-LOADER( 304): ACDB -> send_asm_topology
D/ACDB-LOADER( 304): ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
D/ACDB-LOADER( 304): ACDB -> send_audtable
D/ACDB-LOADER( 304): ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
D/ ( 304): ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
D/ACDB-LOADER( 304): ACDB -> AUDIO_SET_AUDPROC_CAL
D/ACDB-LOADER( 304): ACDB -> send_audvoltable
D/ACDB-LOADER( 304): ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
D/ ( 304): ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
D/ACDB-LOADER( 304): ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
D/ACDB-LOADER( 304): ACDB -> send_afe_cal
D/ACDB-LOADER( 304): ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
D/ ( 304): ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
D/ACDB-LOADER( 304): ACDB -> AUDIO_SET_AFE_CAL
D/StatusBar( 1197): ----- contentsUnchanged : true, bigContentsUnchanged - true, headsUpContentsUnchanged - true , publicUnchanged true
D/PersonaManager( 1197): isKioskContainerExistOnDevice
V/MediaPlayer-JNI( 1197): getCurrentPosition: 0 (msec)
D/PersonaManager( 1197): isKioskContainerExistOnDevice
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [18,164928] Group: ACVNotificationGroup
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [1,164929] LocalOnly: false
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164929] Priority: 2
V/MediaPlayer-JNI( 1197): isPlaying: 1
D/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [5,164934] Sound specified in notification
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164934] Sound caralarm.wav
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164934] Vibrate: true
I/GCMIntentService(30236): (IntentService[GCMIntentService--3]) [0,164934] Insistent: false
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PanelView( 1197): kidsfalse mQsExpansionEnabled:true
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/ConnectivityService( 938): returning getNetworkInfo(networkType - 1) :[type: WIFI[] - WIFI, state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false]
D/ConnectivityService( 938): returning getNetworkInfo(networkType - 1) :[type: WIFI[] - WIFI, state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false]
D/KnoxNotification( 1197): ----- inflateViews : modified publicViewLocal -----
E/AudioSink( 304): received unknown event type: 1 inside CallbackWrapper !
I/AudioPlayer( 304): >>> setAudioEffect Read mAudioFormat : 1, event : 4456511, value : 4227225
E/AudioPlayer( 304): >>> setAudioEffect Error mAudioFormat : 1, event : 4456511, value : 4227225
D/KnoxNotification( 1197): ----- inflateViews : modified KnoxViewLocal -----
D/ConnectivityService( 938): returning getNetworkInfo(networkType - 1) :[type: WIFI[] - WIFI, state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false]
D/PersonaManager( 1197): PersonaID is invalid or persona doesn't exists. : 0
D/MotionEngine( 938): [EXEC CAMERA] INIT..........
I/System.out(30236): KnoxVpnUidStorageknoxVpnSupported API value returned is false
E/Watchdog( 938): !@Sync 1670
I/art ( 938): Explicit concurrent mark sweep GC freed 73224(4MB) AllocSpace objects, 28(4MB) LOS objects, 21% free, 58MB/74MB, paused 1.815ms total 173.827ms
D/SecContentProvider2( 938): uri = 14 selection = getSealedState
D/SecContentProvider2( 938): mCursor = null
D/SecContentProvider2( 938): KnoxCustomManagerService offline: service is not available
D/ApplicationPolicy( 938): isStatusBarNotificationAllowedAsUser: packageName = com.myapp.demo,userId = 0
V/ApplicationPolicy( 938): isApplicationStateBlocked userId 0 pkgname com.myapp.demo
W/NotificationService( 938): Pray mode not found android.content.pm.PackageManager$NameNotFoundException: Application package com.sec.android.settings.praymodewidget not found
V/AudioPolicyManager( 304): getOutputsForDevice device 0002 -> 0002
I/AudioService( 938): getStreamVolume 5 index 120
D/NotificationService( 938): Noti Alert - doVibrate true convertStoV=false
V/Vibrator( 938): Called vibrateNotification() API - PUID: 1000, PackageName: android, type: 13
V/Vibrator( 938): Called vibrateImmVibe(int, MagnitudeType) API - PUID: 1000, PackageName: android
V/Vibrator( 938): vibrateImmVibe - PUID: 1000, PackageName: android, type: 13, mag: 10000
D/VibratorService( 938): Turning vibrator off - ImmVibe.
V/VibratorService( 938): vibrateImmVibe - package: android, type: 13, magnitude: 10000
W/NotificationService( 938): Pray mode not found android.content.pm.PackageManager$NameNotFoundException: Application package com.sec.android.settings.praymodewidget not found
D/PersonaManager( 1197): isKioskContainerExistOnDevice
D/PersonaManager( 1197): isKioskContainerExistOnDevice
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PanelView( 1197): kidsfalse mQsExpansionEnabled:true
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PersonaManager( 1197): isKioskContainerExistOnDevice
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PanelView( 1197): kidsfalse mQsExpansionEnabled:true
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): mClearAll.setVisibility - mIsFullyOpened : false isShade : true mHasNotification : true mIsUpwardFling : false mQsFullyExpanded : true isShadeLocked : false mClearAllVisible : true
V/MediaPlayerService( 304): Create new client(174) from pid 1197, uid 10024,
D/StatusBar( 1197): ----- contentsUnchanged : true, bigContentsUnchanged - true, headsUpContentsUnchanged - true , publicUnchanged true
D/PersonaManager( 1197): isKioskContainerExistOnDevice
E/tmiMPEG2TSExtractor( 304): SnifftmiMPEG2TS @LINE=1387
D/PersonaManager( 1197): isKioskContainerExistOnDevice
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PanelView( 1197): kidsfalse mQsExpansionEnabled:true
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PersonaManager( 1197): isKioskContainerExistOnDevice
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
D/PanelView( 1197): There is/are notification(s)
D/PanelView( 1197): kidsfalse mQsExpansionEnabled:true
D/WVMDrmPlugIn( 301): WVMDrmPlugin::onInitialize : 5965
D/WVMDrmPlugIn( 301): WVMDrmPlugin::onSetOnInfoListener : add 5965
D/KeyguardUpdateMonitor( 1197): updateCMASText( show = false )
E/SEC_DRM_PLUGIN_Omafl( 301): OmaPlugin::onOpenDecryptSession(fd)::Drm2IsDrmFileByExt::file is NOT DRM by extension
W/SEC_DRM_PLUGIN_Playready( 301): PlayreadyPlugIn: Function[DRM_ASFVerify_Context_Initialize]; Line[4453]; File type[0]
W/SEC_DRM_PLUGIN_Playready( 301): PlayReadyPlugIn: Function[onOpenDecryptSession]; Line[2571]; DRM Result[0x80004005]
I/PrGenericPlugin( 301): onOpenDecryptSession with Fd enter
E/PrGenericPlugin( 301): PrGenericPlugin::onOpenDecryptSession() onCanHandle error
D/WVMDrmPlugIn( 301): WVMDrmPlugin::onTerminate : 5965
V/MediaExtractor( 304): Autodetected media content as 'audio/x-wav' with confidence 0.30
E/MediaExtractor( 304): Ram=> MIME is 'audio/x-wav'
I/TiAPI (30236): receivePush
I/TiAPI (30236): {"data":{"seller_id":"79","title":"A New Auction Has Begun: 2006 Infiniti G35","status":"active","collapse_key":"do_not_collapse","sound":"caralarm.wav","message":"2006 Infiniti G35 Base","from":"my_gcm_key","auction_id":"1631"}}
D/MotionEngine( 938): [MotionEngine] -> PR_MOVE -> Move Recognition Lv(3)
I/TiAPI (30236): >>> Alloy.Globals.openedForPush: true
I/TiAPI (30236): >>> Alloy.Globals.openedForPushIsSelling: false
I/TiAPI (30236): >>> Alloy.Globals.ViewingAuction: false
I/TiAPI (30236): >>> auctionId: 1631
I/TiAPI (30236): >>> status: active
I/TiAPI (30236): >>> isSellingAlert: false
I/TiAPI (30236): ** firing app:goHome **
I/SurfaceFlinger( 260): id=1245 createSurf (1080x750),1 flag=4, Heads Up
V/AudioPolicyManager( 304): isOffloadSupported: SR=44100, CM=0x3, Format=0x1c000001, StreamType=5, BitRate=4294967295, duration=1814580 us, has_video=0
V/AudioPolicyManager( 304): isOffloadSupported: stream_type != MUSIC, returning false
V/AwesomePlayer( 304): createAudioPlayer: bypass OMX (raw)
from gcmpush.
Is it perhaps the issue that you're setting the wrong intent flag type on GCMIntentService.java, line 196. Maybe you need to use a different flag. I'm not sure which type that would be. Maybe the info at http://stackoverflow.com/a/29376250/292947 would help you figure that out? Or, maybe it's the launcherIntent.addCategory(Intent.CATEGORY_LAUNCHER);
statement on the next line?
from gcmpush.
What's the ** firing app:goHome **
line in your log? Does that open your app one way or the other?
from gcmpush.
That log message is from our app, where we fire a Titanium app event to open a specific window. We've worked around this auto-opening-the-app issue by moving code to a resume listener on the app's main activity.
function appresume() {
if (OS_ANDROID) {
// If the user resumed from a push notification we want to redirect them to the correct view.
var lastData = gcm.getLastData();
if (lastData) {
console.log('** firing app:goHome **');
// rest of logic to grab the notification payload data
// and show the desired window
...
Perhaps this was the right way to do it all along. In which case, maybe you could cover that in a bit more detail in the docs?
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.