Every time I run to debug app on my Nexus 6P (Android Oreo), the app will get deployed, starts briefly and then exits and Visual Studio (2015) will stop debug process and show following message
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
Checking Logcat shows lots of errors, 2 of which are predominant
Time Device Name Type PID Tag Message
09-29 13:03:50.240 Huawei Nexus 6P Error 11451 o.mz java.lang.NoClassDefFoundError: o.ʖ
at o.ʷ.ˏ(:363)
at o.Г.ॱ(:247)
at o.Г.ˋ(:141)
at o.ץ.ˎ(:406)
at o.ץ.ˋ(:4352)
at o.ץ.ॱ(:244)
at o.ץ.ˊ(:142)
at o.ᴄ.ॱ(:476)
at o.Ḯ.ˋ(:3890)
at o.Ḯ.ॱ(:3784)
at o.mz$If.onMessage(:3899)
at okhttp3.internal.ws.RealWebSocket$1.onMessage(:62)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(:242)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(:108)
at okhttp3.internal.ws.RealWebSocket.readMessage(:97)
at okhttp3.ws.WebSocketCall.createWebSocket(:152)
at okhttp3.ws.WebSocketCall.access$000(:41)
at okhttp3.ws.WebSocketCall$1.onResponse(:97)
at okhttp3.RealCall$AsyncCall.execute(:126)
at okhttp3.internal.NamedRunnable.run(:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
and the 2nd and most dominant error is
Time Device Name Type PID Tag Message
09-29 13:04:34.666 Huawei Nexus 6P Error 3759 QC-QMI linux_qmi_qmux_io_wake_lock: Err in writing wakelock=qmuxd_port_wl_0, error [1:Operation not permitted]
I have a Nexus 4 with Android 6.0 and i have connected it in Developer Mode to my Android Studio to see what the Log-File output looks like. The LogCat sends many errors:
1. 02-25 09:15:46.787 548-623/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0,00 rxSuccessRate=0,00 targetRoamBSSID=any RSSI=-53
2. 02-25 09:15:46.787 548-623/? E/WifiStateMachine: WifiStateMachine L2Connected CMD_START_SCAN source -2 226, 227 -> obsolete
3. 02-25 09:15:36.955 3609-3609/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!
4. 02-25 09:15:28.154 195-218/? E/ANDR-PERF-LOCK: Failed to apply optimization for resource: 4 level: 0
5. 02-25 09:15:27.479 548-623/? E/WifiStateMachine: cancelDelayedScan -> 227
6. 02-25 09:15:27.483 548-623/? E/native: do suspend true
7. 02-25 09:14:42.632 188-31249/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -8
8. 02-25 09:16:36.436 1596-1596/? E/ctxmgr: [PowerConnectionProducer]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.85, status=Status{statusCode=unknown status code: 7503, resolution=null}
What are all these errors? They are appearing over and over again in different orders and are appearing independent from each other.
The Error:
02-25 09:18:36.981 3609-3609/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!
Appears each 10 seconds even when there is no app active and all background proceses of all apps are killed.
Many apps running the background log the actions being done. Some of them also raises errors. WifiStateMachine gives data about your Wifi connection, PowerConnectionProducer gives data about your battery and so on. You will get errors similar to these on all devices.
This is no reason to worry, unless you have an error associated with your own app.
These are system logs,which you see after connecting your device.
This Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress.
Please refer to TransactionTooLarge
I am trying to launch browser on Android M Emulator. It keeps on crashing on every launch.
10-14 13:34:12.934: I/ActivityManager(1294): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity bnds=[372,692][460,800] (has extras)} from uid 10007 on display 0
10-14 13:34:13.046: I/ActivityManager(1294): Start proc 5514:com.android.browser/u0a17 for activity com.android.browser/.BrowserActivity
10-14 13:34:13.131: W/System(5514): ClassLoader referenced unknown path: /system/app/Browser/lib/x86
10-14 13:34:13.451: E/chromium(5514): [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
10-14 13:34:13.591: D/WebViewTimersControl(5514): onBrowserActivityResume
10-14 13:34:13.591: D/WebViewTimersControl(5514): Resuming webview timers, view=com.android.browser.BrowserWebView{2900a61 VFEDHVC.. ......I. 0,0-0,0}
10-14 13:34:13.861: I/ActivityManager(1294): Displayed com.android.browser/.BrowserActivity: +833ms
10-14 13:34:14.377: A/DEBUG(962): pid: 5514, tid: 5559, name: GpuThread >>> com.android.browser <<<
10-14 13:34:14.500: I/WindowState(1294): WIN DEATH: Window{bd73c76 u0 com.android.browser/com.android.browser.BrowserActivity}
10-14 13:34:14.556: I/ActivityManager(1294): Process com.android.browser (pid 5514) has died
10-14 13:34:14.560: W/ActivityManager(1294): Force removing ActivityRecord{1b3e625 u0 com.android.browser/.BrowserActivity t25}: app died, no saved state
Settings -> Apps -> Browser. then goto permission and enable storage permission to be enabled.because the storage permission is closed default.Just open it!
Edit the Android Virtual Device settings inside you AVD manager that you are using and try starting your emulator with the "Use Host GPU" option enabled, this will help to fix your error with the browser.
For downloading files with the browser make sure you also add enough size to your SD Card option. After editing both settings, start Android and goto: Settings -> Apps -> Browser.
(If needed force to stop the browser) then goto permission and enable storage permission to be enabled. This will fix your error with the browser when downloading files.
We are trying to implement GPGS RTMP C++ and running into a strange issue. We are following the default example used in ButtonClicker and actually have it working just fine between iOS devices. However when we try the same code using two Android devices quick match never fully completes.
Using the Android build we can create a room but once the quick game matching starts to take place both devices get a room status change callback with the status of CONNECTING. They remain stuck that way and we receive no other notifications past that point in any callbacks. Again the same code is working when run on iOS and we assume everything has been set up correctly in the developer console since we have access to Google play and are able to achieve a successful room creation on both devices.
Also if I try to connect an Android to an iOS device I get the same behavior on the Android side, but the iOS device quickly shows the Android player's status change to disconnected in the OnConnectedSetChanged callback.
I have also rebuilt/reimported the android SDK projects (made sure we had latest SDK), made sure we are using 1.3 of the c++ project. Also using NDK 9d and Cocos2d-x v2.2.6
Just in case the following is a clue/red alert to someone who has got the answer. The other odd issue we are having with GPGS is achievements (in total or progress) they won't post/retain progress (no errors), but leaderboards do retain and progress... Maybe this is related.
We have also tried builds via alpha and beta distributions via google play (signed and zip aligned)
EDIT: Adding more information
Here is our logs from an Android to Android match:
02-19 18:24:44.252: D/cocos2d-x debug info(27707): jni:isConnected is defined.
02-19 18:24:44.262: D/DA2(27707): isConnected() called.
02-19 18:24:44.272: D/cocos2d-x debug info(27707): isConnected(true) JNI Done.
02-19 18:24:44.272: I/DA2_GPGStateManager(27707): Entering GPGSStateManager::IsAuthorized()
02-19 18:24:44.272: D/cocos2d-x debug info(27707): Checking if user is GPGS authorized: YES
02-19 18:24:46.492: D/cocos2d-x debug info(27707): created a room 1
02-19 18:24:46.492: D/cocos2d-x debug info(27707): MY PLAYER ID IS: p_CP2QiKTYldGO5wEQAQ : Player Y
02-19 18:24:46.812: D/cocos2d-x debug info(27707): OnRoomStatusChanged
02-19 18:24:46.812: D/cocos2d-x debug info(27707): GPG Room status changed to CONNECTING.
02-19 18:24:49.542: D/dalvikvm(27707): threadid=34: thread exiting, not yet detached (count=0)
02-19 18:24:49.542: V/GamesNativeSDK(27707): Detaching from JVM on thread main_dispatch
EDIT: Adding more information
Here is our logs from an Android to iOS match from the iOS log perspective:
Cocos2d: OnRoomStatusChanged
Cocos2d: GPG Room status changed to CONNECTING.
2015-02-19 01:41:08.790 dam[20540:2466970] INFO: OP: 1
2015-02-19 01:41:08.791 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 1
2015-02-19 01:41:08.792 dam[20540:2466970] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForConnectionData
2015-02-19 01:41:08.793 dam[20540:2466970] INFO: PeerStateMachine: WaitingForOutgoingRemoteConnectionNoSessionId-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo WaitingForConnectionData-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
2015-02-19 01:41:09.070 dam[20540:2466970] INFO: OP: 6
2015-02-19 01:41:09.071 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 6
2015-02-19 01:41:09.072 dam[20540:2466970] INFO: PeerStateMachine: Not handled -- invoking default handler for:7002
2015-02-19 01:41:09.072 dam[20540:2466970] ERROR: - unhandledMessage: message.type=7002
2015-02-19 01:41:09.073 dam[20540:2466970] INFO: OP: 14
2015-02-19 01:41:09.074 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 14
2015-02-19 01:41:09.075 dam[20540:2466970] INFO: PeerStateMachine: Not handled -- invoking default handler for:7002
2015-02-19 01:41:09.077 dam[20540:2466970] ERROR: - unhandledMessage: message.type=7002
2015-02-19 01:41:09.194 dam[20540:2466969] INFO: Connection status: CONNECTION_ESTABLISHED reporting ? 0
2015-02-19 01:41:09.195 dam[20540:2466970] INFO: PeerStateMachine: WaitingForConnectionData-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo ConnectedState-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
Cocos2d: OnRoomStatusChanged
Cocos2d: GPG Room status changed to ACTIVE.
Cocos2d: PLAYER: Player X STATUS:2 IN ROOM: Y
Cocos2d: PLAYER: Player 6459 STATUS:2 IN ROOM: Y ID:p_CIuY5fK73c-kKRAB
2015-02-19 01:41:18.936 dam[20540:2466970] INFO: OP: 13
2015-02-19 01:41:18.937 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 13
2015-02-19 01:41:18.938 dam[20540:2466969] INFO: Attempting to reconnect to: p_CIuY5fK73c-kKRAB
2015-02-19 01:41:18.938 dam[20540:2466970] INFO: PeerStateMachine: ConnectedState-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo EntryState-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
2015-02-19 01:41:18.940 dam[20540:2466969] INFO: Attempting to reconnect to: p_CIuY5fK73c-kKRAB
2015-02-19 01:41:18.941 dam[20540:2466969] INFO: Waiting for connection from p_CIuY5fK73c-kKRAB
2015-02-19 01:41:18.943 dam[20540:2466970] INFO: PeerStateMachine: Setting peer 1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 capabilities to 0
2015-02-19 01:41:18.944 dam[20540:2466970] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForOutgoingRemoteConnectionNoSessionId
2015-02-19 01:41:18.945 dam[20540:2466970] INFO: PeerStateMachine: EntryState-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo WaitingForOutgoingRemoteConnectionNoSessionId-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
2015-02-19 01:41:18.946 dam[20540:2466970] ERROR: No session mapped for 1211971051
2015-02-19 01:41:18.947 dam[20540:2466970] ERROR: - unhandledMessage: message.type=7008
2015-02-19 01:41:18.948 dam[20540:2466970] INFO: OP: 1
2015-02-19 01:41:18.949 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 1
2015-02-19 01:41:18.951 dam[20540:2466970] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForConnectionData
2015-02-19 01:41:18.953 dam[20540:2466970] INFO: PeerStateMachine: WaitingForOutgoingRemoteConnectionNoSessionId-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo WaitingForConnectionData-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
2015-02-19 01:41:19.262 dam[20540:2466970] INFO: PeerStateMachine: Not handled -- invoking default handler for:6010
Cocos2d: OnConnectedSetChanged
Cocos2d: PLAYER: Player X STATUS:2 IN ROOM: N
Cocos2d: PLAYER: Player 6459 STATUS:4 IN ROOM: N
Cocos2d: GPGSRealtimeMultiplayerManager::disconnect() called.
Cocos2d: REMOVE PLAYER: Player X ID:p_CIedtPyuzNqXkwEQAQ
Cocos2d: GPGSRealtimeMultiplayerManager::disconnect() called.
2015-02-19 01:41:19.262 dam[20540:2466970] ERROR: - unhandledMessage: message.type=6010
Cocos2d: REMOVE PLAYER: Player 6459 ID:p_CIuY5fK73c-kKRAB
Cocos2d: GPGSRealtimeMultiplayerManager::disconnect() called.
2015-02-19 01:41:19.268 dam[20540:2466970] INFO: PeerStateMachine: Not handled -- invoking default handler for:6004
2015-02-19 01:41:19.269 dam[20540:2466969] INFO: Disconnecting all peers
2015-02-19 01:41:19.270 dam[20540:2466969] ERROR: Transitioning to LeavingRoomState with invalid player id!
Cocos2d: GPG Multiplayer room left unsuccessfully! (now what?)
Cocos2d: GPG Multiplayer room left unsuccessfully! (now what?)
2015-02-19 01:41:19.337 dam[20540:2466970] INFO: PeerStateMachine: WaitingForConnectionData-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2 transitionTo EntryState-1j89l5beklypm389fttwl6uuy0#public.talk.google.com/games_andrB648F1B2
2015-02-19 01:41:19.339 dam[20540:2466970] INFO: OP: 12
2015-02-19 01:41:19.340 dam[20540:2466970] INFO: CALL_STATE_CHANGED_OP: New state: 12
2015-02-19 01:41:19.341 dam[20540:2466970] ERROR: No session mapped for 3259690520
2015-02-19 01:41:19.341 dam[20540:2466970] ERROR: - unhandledMessage: message.type=7008
Cocos2d: LOBBY ROW DEALLOC
2015-02-19 01:41:19.556 dam[20540:2467034] VERBOSE: Request had Apiary Status Code: 0
Cocos2d: GPG Multiplayer room left successfully (Quick Game/Invite)
2015-02-19 01:41:19.585 dam[20540:2466970] INFO: PeerStateMachine: Not handled -- invoking default handler for:6010
2015-02-19 01:41:29.271 dam[20540:2466415] ERROR: - unhandledMessage: message.type=48
2015-02-19 01:41:29.587 dam[20540:2466415] ERROR: - unhandledMessage: message.type=48
I will post Android perspective logs as soon as I collect some. We are using the zip aligned and all the log prints are stripped.
On Android the room state change was not announced like it was on iOS.
specifically the callback for:
IRealTimeEventListener::OnRoomStatusChanged
The solution was to examine any callback and check for a state change. To be completely sure we were keeping track of last known room state whenever a room participant change occurs.
In our case OnParticipantStatusChanged was the most critical.
Luckily it is a simple system and only a handful of callbacks with a room reference exist... O.o
We are able to play games between Android to Android and Android to iOS this way... Seems like a work around to track state this way, but maybe it will help someone! v1.2 and v1.3 both behaved this way.
I figured this out when I modified the minimalist app (that runs in every version supported) to include operations from the Button Clicker sample app (which required later versions of Android to leverage JUI for the ui components.) It was a complete accident that I sent data and noticed it was received... I am glad I was paying attention.
I am using PhoneGap build and the chariotsolutions NFC plugin to scan NFC cards, and it was working. However, it started failing after PhoneGap build went down. I can only guess that PhoneGap build is now using a newer version of the plugin. A clean build still makes it crash internally on scan of a card.
I created a new Cordova project with the latest build using the cordova CLI, and installed the chariotsolutions plugin. It is still failing with only the bear bones project, which is outside of PhoneGap build now.
Hardware and software: Android Nexus 7 running Android 4.4.2
Cordova version 3.3
Bear bones project code contains only this onDeviceReady:
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
console.log('v0.0.3');
document.addEventListener('resume', app.resume, false);
document.addEventListener('pause', app.pause, false);
// Read NDEF formatted NFC Tags
nfc.addNdefListener (
function (nfcEvent) {
console.log('nfcEvent '+JSON.stringify(nfcEvent));
var tag = nfcEvent.tag,
ndefMessage = tag.ndefMessage;
// dump the raw json of the message
// note: real code will need to decode
// the payload from each record
console.log(JSON.stringify(ndefMessage));
// assuming the first record in the message has
// a payload that can be converted to a string.
console.log(nfc.bytesToString(ndefMessage[0].payload).substring(3));
},
function () { // success callback
console.log("Waiting for NDEF tag");
},
function (error) { // error callback
console.log("Error adding NDEF listener " + JSON.stringify(error));
}
);
},
ADB output on launch of the app:
I/ActivityManager( 512): Start proc com.test.myapp for activity com.test.myapp/.myappname: pid=17325 uid=10037 gids={50037, 3003}
I/CordovaLog(17325): Changing log level to DEBUG(3)
I/CordovaLog(17325): Found start page location: index.html
D/Whitelist(17325): Unlimited access to network resources
D/CordovaActivity(17325): CordovaActivity.onCreate()
V/WebViewChromium(17325): Binding Chromium to the background looper Looper (main, tid 1) {4211c938}
I/chromium(17325): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserProcessMain(17325): Initializing chromium process, renderers=0
W/chromium(17325): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
D/libEGL (17325): loaded /system/lib/egl/libEGL_tegra.so
D/libEGL (17325): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL (17325): loaded /system/lib/egl/libGLESv2_tegra.so
D/CordovaWebView(17325): CordovaWebView is running on device made by: asus
D/JsMessageQueue(17325): Set native->JS mode to 2
D/CordovaActivity(17325): CordovaActivity.init()
D/CordovaWebView(17325): >>> loadUrl(file:///android_asset/www/index.html)
D/PluginManager(17325): init()
D/CordovaWebView(17325): >>> loadUrlNow()
I/CordovaLog(17325): Changing log level to DEBUG(3)
I/CordovaLog(17325): Found start page location: index.html
D/Whitelist(17325): Unlimited access to network resources
D/CordovaActivity(17325): Resuming the App
D/CordovaActivity(17325): CB-3064: The errorUrl is null
D/SoftKeyboardDetect(17325): Ignore this event
D/OpenGLRenderer(17325): Enabling debug mode 0
D/SoftKeyboardDetect(17325): Ignore this event
I/ActivityManager( 512): Displayed com.test.myapp/.myappname: +813ms
D/AndroidRuntime(17309): Shutting down VM
D/dalvikvm(17309): GC_CONCURRENT freed 97K, 15% free 589K/688K, paused 0ms+2ms, total 5ms
D/CordovaActivity(17325): onMessage(onPageStarted,file:///android_asset/www/index.html)
D/CordovaLog(17325): file:///android_asset/www/index.html: Line 25 : Viewport target-densitydpi is not supported.
I/chromium(17325): [INFO:CONSOLE(25)] "Viewport target-densitydpi is not supported.", source: file:///android_asset/www/index.html (25)
D/CordovaWebViewClient(17325): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity(17325): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/CordovaActivity(17325): onMessage(spinner,stop)
D/CordovaNetworkManager(17325): Connection Type: wifi
I/chromium(17325): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/chromium(17325): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
D/CordovaNetworkManager(17325): Connection Type: wifi
D/CordovaActivity(17325): onMessage(networkconnection,wifi)
D/CordovaLog(17325): file:///android_asset/www/js/index.js: Line 58 : onDeviceReady v0.0.3
I/chromium(17325): [INFO:CONSOLE(58)] "onDeviceReady v0.0.3", source: file:///android_asset/www/js/index.js (58)
D/NfcPlugin(17325): execute registerNdef
D/CordovaLog(17325): file:///android_asset/www/js/index.js: Line 83 : Waiting for NDEF tag
I/chromium(17325): [INFO:CONSOLE(83)] "Waiting for NDEF tag", source: file:///android_asset/www/js/index.js (83)
D/NfcPlugin(17325): execute init
D/NfcPlugin(17325): Enabling plugin Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.test.myapp/.myappname }
D/NfcDispatcher( 769): Set Foreground Dispatch
D/NfcPlugin(17325): parseMessage Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.test.myapp/.myappname }
D/NfcPlugin(17325): action android.intent.action.MAIN
D/CordovaLog(17325): file:///android_asset/www/plugins/com.chariotsolutions.nfc.plugin/www/phonegap-nfc.js: Line 18 : Initialized the NfcPlugin
I/chromium(17325): [INFO:CONSOLE(18)] "Initialized the NfcPlugin", source: file:///android_asset/www/plugins/com.chariotsolutions.nfc.plugin/www/phonegap-nfc.js (18)
D/CordovaActivity(17325): onMessage(spinner,stop)
ADB output when I scan a card. Seems to pause the app at matched single TECH for some reason, and then reloads Cordova running the onDeviceReady again.
D/NativeNfcTag( 769): Check NDEF Failed - status = 255
D/NativeNfcTag( 769): Check NDEF Failed - status = 255
D/NfcDispatcher( 769): dispatch tag: TAG: Tech [android.nfc.tech.MifareClassic, android.nfc.tech.NfcA, android.nfc.tech.NdefFormatable] message: null
I/ActivityManager( 512): START u0 {flg=0x10008000 cmp=com.android.nfc/.NfcRootActivity (has extras)} from pid 769
D/dalvikvm( 512): GC_FOR_ALLOC freed 564K, 15% free 18611K/21744K, paused 145ms, total 145ms
D/dalvikvm( 512): GC_FOR_ALLOC freed 283K, 15% free 18573K/21744K, paused 144ms, total 144ms
I/NfcDispatcher( 769): matched single TECH
D/CordovaActivity(17325): Paused the application!
D/CordovaWebView(17325): Handle the pause
D/NfcPlugin(17325): onPause Intent { }
D/NfcPlugin(17325): stopNfc
D/NfcDispatcher( 769): Set Foreground Dispatch
D/CordovaLog(17325): file:///android_asset/www/js/index.js: Line 48 : -- pause event fired --
I/chromium(17325): [INFO:CONSOLE(48)] "-- pause event fired -- ", source: file:///android_asset/www/js/index.js (48)
I/ActivityManager( 512): START u0 {act=android.nfc.action.TECH_DISCOVERED cmp=com.widgapp.NFC_ReTAG_FREE/com.widgapp.NFC_ReTag_dispatch_other (has extras)} from pid 769
V/receiver Tag discovered: (15520): TAG: Tech [android.nfc.tech.MifareClassic, android.nfc.tech.NfcA, android.nfc.tech.NdefFormatable] mifare tagid: 8A0924F9
I/ActivityManager( 512): START u0 {flg=0x4000000 cmp=com.widgapp.NFC_ReTAG_FREE/.automode (has extras)} from pid 15520
D/NfcDispatcher( 769): Set Foreground Dispatch
D/NfcDispatcher( 769): Set Foreground Dispatch
D/dalvikvm(15520): GC_CONCURRENT freed 224K, 4% free 7810K/8072K, paused 4ms+3ms, total 42ms
W/InputMethodManagerService( 512): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#429d7908 attribute=null, token = android.os.BinderProxy#427e6bf8
I/CordovaLog(17325): Changing log level to DEBUG(3)
I/CordovaLog(17325): Found start page location: index.html
D/Whitelist(17325): Unlimited access to network resources
D/CordovaActivity(17325): Resuming the App
D/CordovaActivity(17325): CB-3064: The errorUrl is null
D/NfcPlugin(17325): onResume Intent { }
D/NfcDispatcher( 769): Set Foreground Dispatch
D/CordovaLog(17325): file:///android_asset/www/js/index.js: Line 41 : -- resume event fired --
I/chromium(17325): [INFO:CONSOLE(41)] "-- resume event fired -- ", source: file:///android_asset/www/js/index.js (41)
D/NativeNfcTag( 769): Tag lost, restarting polling loop
D/dalvikvm(15037): GC_CONCURRENT freed 475K, 7% free 8271K/8824K, paused 3ms+4ms, total 40ms
D/dalvikvm(15037): WAIT_FOR_CONCURRENT_GC blocked 30ms
D/Finsky (15037): [1] 5.onFinished: Installation state replication succeeded.
Any help would be appreciated.
The reason it's not working is because the application is looking for an NDEF tag, but you're scanning a non-NDEF tag.
D/NativeNfcTag( 769): Check NDEF Failed - status = 255
D/NativeNfcTag( 769): Check NDEF Failed - status = 255
D/NfcDispatcher( 769): dispatch tag: TAG: Tech [android.nfc.tech.MifareClassic, android.nfc.tech.NfcA, android.nfc.tech.NdefFormatable] message: null
To read a non-NDEF tag, you'll need to add nfc.addNdefFormatableListener or nfc.addTagDiscoveredListener. You can use one event handler, e.g. app.onNFC, for multiple tag types.
You could also use NXP Tag Writer to write a message to the tag, which will also format it as NDEF.
Note that devices with the Broadcom NFC chipset won't read Mifare Classic tags, so you might get errors about non-NDEF messages even when reading a NDEF message on a Mifare Classic tag.
My Nexus 7 (original version) has the NXP NFC chipset. Your code worked, after I removed console.log('nfcEvent '+JSON.stringify(nfcEvent));. The event can't be stringified because of circular references. I think the second generation Nexus 7 uses the Broadcom NFC chipset.