{"action":"created","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/235","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/235/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/235/events","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/235","id":39462274,"number":235,"title":"build.phonegap `singleInstance` android app spawns new instance when notification is tapped...","user":{"login":"AubreyHewes","id":2069584,"avatar_url":"https://avatars.githubusercontent.com/u/2069584?v=3","gravatar_id":"","url":"https://api.github.com/users/AubreyHewes","html_url":"https://github.com/AubreyHewes","followers_url":"https://api.github.com/users/AubreyHewes/followers","following_url":"https://api.github.com/users/AubreyHewes/following{/other_user}","gists_url":"https://api.github.com/users/AubreyHewes/gists{/gist_id}","starred_url":"https://api.github.com/users/AubreyHewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AubreyHewes/subscriptions","organizations_url":"https://api.github.com/users/AubreyHewes/orgs","repos_url":"https://api.github.com/users/AubreyHewes/repos","events_url":"https://api.github.com/users/AubreyHewes/events{/privacy}","received_events_url":"https://api.github.com/users/AubreyHewes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-08-04T21:19:36Z","updated_at":"2015-03-11T12:31:20Z","closed_at":"2015-03-11T12:31:20Z","body":"This seems to have been a solved problem.. but it \"seems\" to still be failing (for me); An android  `singleInstance` build.phonegap application will spawn a new instance when opened via the katzer-notification...\r\n\r\n**build platform:** build.phonegap.com (via API)\r\n**config.xml katzer-notification version:** latest/*\r\n````\r\n\t<gap:plugin name=\"de.appplant.cordova.plugin.local-notification\" />\r\n````\r\n**config.xml `singleInstance` config:**\r\n````\r\n\t<gap:config-file platform=\"android\" parent=\"/manifest/application\">\r\n\t\t<activity android:launchMode=\"singleInstance\" />\r\n\t</gap:config-file>\r\n````\r\n\r\nApplication does the following:\r\n* Opens audio to play\r\n* Sets non-closable/ongoing notification of playing audio title (the idea is that the user can listen to audio and do other stuff and then tap the notification to get back to the app).\r\n\r\nUser does the following:\r\n* opens app\r\n* plays audio (which opens non-closable/ongoing notification; android)\r\n* closes app (ongoing notification stays alive; single-instance?)\r\n* clicks ongoing notification\r\n\r\nResult:\r\n * click on ongoing notification spawns **new** application instance.\r\n\r\nExpected:\r\n* click on ongoing notification (re)spawns **running** application instance.\r\n\r\nGenerated android manifest:\r\n\r\nThe BPG generated android manifest contains two (2) `singleInstance` activities. One for the application and one for the katzer-notification (could this be the problem, should the plugin activity define itself as a `singleInstance` activity?). \r\n(Removing the application's config.xml own `singleInstance` definition results in the same behaviour.)\r\n\r\n````\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<manifest android:versionCode=\"X\" android:versionName=\"X\" android:windowSoftInputMode=\"adjustPan\" android:installLocation=\"auto\" package=\"X\"\r\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\r\n    <supports-screens android:anyDensity=\"true\" android:smallScreens=\"true\" android:normalScreens=\"true\" android:largeScreens=\"true\" android:resizeable=\"true\" android:xlargeScreens=\"true\" />\r\n    <uses-permission android:name=\"android.permission.INTERNET\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\r\n    <application android:label=\"@string/app_name\" android:icon=\"@drawable/icon\" android:debuggable=\"true\" android:hardwareAccelerated=\"true\">\r\n        <activity android:label=\"@string/app_name\" android:name=\".X\" android:launchMode=\"singleInstance\" android:screenOrientation=\"unspecified\" android:configChanges=\"locale|keyboard|keyboardHidden|orientation|screenSize\" android:windowSoftInputMode=\"stateUnspecified|adjustUnspecified\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n                <category android:name=\"android.intent.category.LAUNCHER\" />\r\n            </intent-filter>\r\n        </activity>\r\n        <activity android:label=\"@string/app_name\" android:name=\"com.phonegap.DroidGap\">\r\n            <intent-filter />\r\n        </activity>\r\n        <receiver android:name=\"de.appplant.cordova.plugin.localnotification.Receiver\" />\r\n        <receiver android:name=\"de.appplant.cordova.plugin.localnotification.Restore\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\r\n            </intent-filter>\r\n        </receiver>\r\n        <activity android:name=\"de.appplant.cordova.plugin.localnotification.ReceiverActivity\" android:launchMode=\"singleInstance\" />\r\n    </application>\r\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\r\n</manifest>\r\n````\r\n\r\nI am a little stumped... :-S \r\n\r\nThanks, Aubrey\r\n\r\n_p.s. I do not want to unpack/custom-edit/repackage/resign the generated package; defies the use of a build service._\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/comments/78253893","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/235#issuecomment-78253893","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/235","id":78253893,"user":{"login":"katzer","id":2039384,"avatar_url":"https://avatars.githubusercontent.com/u/2039384?v=3","gravatar_id":"","url":"https://api.github.com/users/katzer","html_url":"https://github.com/katzer","followers_url":"https://api.github.com/users/katzer/followers","following_url":"https://api.github.com/users/katzer/following{/other_user}","gists_url":"https://api.github.com/users/katzer/gists{/gist_id}","starred_url":"https://api.github.com/users/katzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katzer/subscriptions","organizations_url":"https://api.github.com/users/katzer/orgs","repos_url":"https://api.github.com/users/katzer/repos","events_url":"https://api.github.com/users/katzer/events{/privacy}","received_events_url":"https://api.github.com/users/katzer/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T12:31:20Z","updated_at":"2015-03-11T12:31:20Z","body":"The new 0.8.x release is a complete rewrite. If the issue still exists please reopen it.\r\n\r\nYou may also take a look into the new [wiki](https://github.com/katzer/cordova-plugin-local-notifications/wiki).\r\n\r\nThanks!"}}