{ "id": "170997", "key": "TIMOB-25776", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2018-03-10T09:16:07.000+0000", "created": "2018-01-29T13:31:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "activity", "launchmode", "nfc" ], "versions": [ { "id": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:34:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Dear all,\r\n\r\nI've been playing (or trying to play) with the ti.nfc module for a while.\r\nI'm just throwing there the example TagViewer from the module examples, just a copy and paste of the module and a modification of the tiapp.xml to add the android properties in manifest.\r\n\r\nHowever, when trying to run the project, this warning appears in there:\r\n\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n\r\nAnd the application doesn't work properly. Am I doing something wrong? Should I change something to allow android:launchMode?\r\n\r\nThanks for your comments.\r\n\r\nPD: I've also attached the tiapp.xml the modules folder and the app folder of the project, in case you want to take a look (I tried to attach the whole project, but looks like it is too heavy).", "attachment": [ { "id": "64773", "filename": "app.zip", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-29T13:29:16.000+0000", "size": 1498675, "mimeType": "application/zip" }, { "id": "64772", "filename": "modules.zip", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-29T13:30:11.000+0000", "size": 7771071, "mimeType": "application/zip" }, { "id": "64774", "filename": "tiapp.xml", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-29T13:28:59.000+0000", "size": 4202, "mimeType": "text/xml" } ], "flagged": false, "summary": "Android: Cannot use Ti.NFC", "creator": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "subtasks": [], "reporter": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "environment": "ti.nfc 3.0.0\r\nTitanium SDK 7.0.1", "closedSprints": [ { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "433802", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, follow guide in http://docs.appcelerator.com/platform/latest/#!/api/Modules.Nfc \"android:launchMode=\"singleTask\" is needed so that new intents that result from NFC message dispatching do not start a new activity in your application.\"\r\n\r\nThanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-29T16:11:02.000+0000", "updated": "2018-01-29T16:11:02.000+0000" }, { "id": "433803", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Dear Sharif,\r\n\r\nIf you look at the attached tiapp.xml, I have the android:launchMode=\"singleTask\" already added\r\n\r\n\r\n{code:java}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\n\r\nBut when packaging the app, the log says:\r\n\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n\r\nAnd thus, android:launchMode=\"singleTask\" cannot be used.\r\n\r\nCan you please take a look why?\r\n\r\nThanks.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-29T16:23:43.000+0000", "updated": "2018-01-29T16:23:43.000+0000" }, { "id": "433805", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "I've also tested a possible solution that I've found on some Github issues, that is adding the following code to the alloy.js file:\r\n\r\n{code:java}\r\nif (OS_ANDROID) {\r\n function resumeLauncher() {\r\n Alloy.createController('index', {\r\n });\r\n }\r\n\r\n if (Ti.Android.currentActivity) {\r\n Ti.Android.currentActivity.setOnResume(resumeLauncher)\r\n }\r\n}\r\n{code}\r\n\r\nBut this is also NOT working.\r\n\r\nPlease help, I have a major business opportunity if I can integrate NFC in my apps.\r\n\r\nThanks.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-29T16:49:38.000+0000", "updated": "2018-01-29T16:50:18.000+0000" }, { "id": "433813", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~dfalcon],\r\n\r\nThanks for your feedback. *NFC module* is allowing applications to read and write (Android-only) NFC tags. Are you able to do this by using your application? Please let us know.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-30T05:36:14.000+0000", "updated": "2018-01-30T05:36:14.000+0000" }, { "id": "433818", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Mostafizur,\r\n\r\nAgain, this is failing due to the impossibility to use android:launchMode. I have built a very simple NFC app in Android Studio that works without problem, so there is something wrong in Appcelerator.\r\n\r\nI have provided an alloy example in the ticket for you to check and test. Please check it and provide an explanation on how to make android:launchMode work in Appcelerator. An example app with NFC that works will also work and will help to all the users struggling with the same problem.\r\n\r\nThanks.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-30T08:03:15.000+0000", "updated": "2018-01-30T08:03:15.000+0000" }, { "id": "433833", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you use the only the \"android:launchMode=\"singleTask\"\" with out the \"android:label=\"NFC\"\" as in the docs trap.xml section? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-30T15:35:42.000+0000", "updated": "2018-01-30T15:35:42.000+0000" }, { "id": "433835", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi Sharif,\r\n\r\nI did as indicated, and it's still the same:\r\n\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n\r\nAnd the app doesn't work.\r\nThe manifest looks like this now:\r\n{code:java}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-30T15:52:13.000+0000", "updated": "2018-01-30T15:52:13.000+0000" }, { "id": "433864", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters-section-src-43287610_AndroidIntentFilters-LaunchMode", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-31T03:51:55.000+0000", "updated": "2018-01-31T03:51:55.000+0000" }, { "id": "433872", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi Gary,\r\n\r\nI'm a bit confused here. First, Sharif tell me to\r\n\"follow guide in http://docs.appcelerator.com/platform/latest/#!/api/Modules.Nfc \"android:launchMode=\"singleTask\" is needed so that new intents that result from NFC message dispatching do not start a new activity in your application.\"\r\n\r\nIn module NFC (latest version) and in the appcelerator documentation is stated that \"android:launchMode=\"singleTask\" should be used and is needed to make the NFC app work.\r\n\r\nThen, you point me to a section of the documentation where is stated that \"launch modes cannot be used with Titanium Android\". Isn't that contradictory?\r\n\r\nI have also tried the workaround of\r\n{code:java}true{code}\r\nand it does exactly the same: the app doesn't work. When scanning a tag, the app re-opens and nothing is scanned.\r\n\r\nPlease, take a real look at this. There are many users struggling to make this work and I know of some that are leaving appcelerator due to this kind of unsolved problems.\r\n\r\nAs appcelerator engineers I think that the best approach would be to provide a working solution for this problem instead to pointing to a faulty documentation that \"will be taken down in the near future\".\r\n\r\nThanks for helping.\r\n ", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-01-31T07:51:03.000+0000", "updated": "2018-01-31T07:51:03.000+0000" }, { "id": "434381", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~dfalcon], Titanium does not support \"singleTask\" mode. With the way Titanium is currently architected, there is no way to make that mode work. It would end up getting stuck on the splash screen if you tried to use it. The NFC doc is wrong and needs to be updated. Since launch modes cannot be used with Titanium Android, to offer similar behaviour to android:launchMode= \"singleTask\" when using intent filters, you can set the intent-filter-new-task property in your tiapp.xml. See docs: http://docs.appcelerator.com/platform/latest/#!/guide/Android_Intent_Filters\r\n\r\nPlease try it and let us know the result. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-02-12T20:50:32.000+0000", "updated": "2018-02-12T20:50:32.000+0000" }, { "id": "434383", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Sharif,\r\n\r\nDid you read my previous comment? I have already tried that workaround without success. I feel like you aren't even trying...\r\n\r\nAgain, providing a working example (a really working example) should be the best way to address this, and also for you to investigate an know how to correct the documents and the SDK in order to make this work.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-02-12T20:57:17.000+0000", "updated": "2018-02-12T20:57:17.000+0000" }, { "id": "434470", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~dfalcon]! We discussed this internally and the docs are indeed outdated on Ti.NFC. We will prepare an NFC example that works with newer versions of the SDK and update the docs afterwards. Please allow us to investigate and come back to you once we have something for you. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-14T13:03:19.000+0000", "updated": "2018-02-14T13:03:19.000+0000" }, { "id": "434754", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi Hans,\r\n\r\nDo you have any feedback to share or a rough date for this? I'm eager to have this working, so I can avoid any more bottlenecks in the schedule of my projects.\r\n\r\nThanks for the information!", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-02-22T08:10:09.000+0000", "updated": "2018-02-22T08:10:09.000+0000" }, { "id": "434758", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~dfalcon], our Android team currently finishes the last touches on the 7.1.0 release, please allow us to come back to you soon afterwards. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-22T09:57:16.000+0000", "updated": "2018-02-22T09:57:16.000+0000" }, { "id": "435007", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "[~dfalcon] Have you tried the other examples from the modules if they were working? Also information about the device(s) you are using will be helpful. Any info you can share would be helpful.", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-02-28T16:41:16.000+0000", "updated": "2018-02-28T16:41:16.000+0000" }, { "id": "435054", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi Yordan,\r\n\r\nYes, I have tried the other examples, even with SDK 7.0.2 and I'm still experiencing the same issues. In the months I've been trying to make this work I've tested in several devices, some huawei, some sansung and other brands. Now I have at hand a Huawei P8 Lite and a Huawei 10 pro for testing, both with the same issues.\r\n\r\nHave you managed to make an android app run in SDK 7.0.2? If so, can you share a working example?\r\n\r\nIf you read the rest of the issue ticket, you'll see that I've tested all the provided workarounds, and yet I still have the same issues. Here, you have also what I've done so far and the results.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-03-01T14:39:43.000+0000", "updated": "2018-03-01T14:40:13.000+0000" }, { "id": "435105", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "[~dfalcon] Are you trying to scan a NFC chip or communicate between two devices through Android Beam? The Beam examples from the module worked just fine between Huawei P8 Lite and Samsung S8. If you get any error logs or warning, please share them.", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-03-02T14:06:09.000+0000", "updated": "2018-03-02T14:06:09.000+0000" }, { "id": "435300", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Yordan,\r\n\r\nSorry for the late answer. I wasn't aware you answerd this. This is what I got for each example:\r\n\r\n\r\n*TAGWRITER*: Without android:launchMode, and with property intent-filter-new-task set to true\r\n\r\n{code:java}\r\n[WARN] : W/System.err: java.lang.IllegalStateException: You must disable foreground dispatching while your activity is still resumed\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatchInternal(NfcAdapter.java:1345)\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatch(NfcAdapter.java:1331)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.handleDisableForegroundDispatch(NfcAdapterProxy.java:442)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.disableForegroundDispatch(NfcAdapterProxy.java:339)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:936)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1159)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:362)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:150)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n[ERROR] : TiExceptionHandler: (main) [75823,76040] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [1,76041] - In /alloy/controllers/index.js:144,18\r\n[ERROR] : TiExceptionHandler: (main) [0,76041] - Message: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : TiExceptionHandler: (main) [0,76041] - Source: nfcAdapter.disableForegroundDispatch();\r\n[ERROR] : V8Exception: Exception occurred at /alloy/controllers/index.js:144: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : V8Exception: You must disable foreground dispatching while your activity is still resumed\r\n{code}\r\n\r\nSame behaviour with android:launchMode and also:\r\n\r\n{code:java}\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n{code}\r\n\r\n*TAGVIEWER*: Without android:launchMode, and with property intent-filter-new-task set to true\r\n\r\nNo errors: The app just reopens itself and nothing is scanned\r\n\r\nSame behaviour with android:launchMode and:\r\n\r\n{code:java}\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n{code}\r\n\r\n*TAGFOREGROUND*: Without android:launchMode, and with property intent-filter-new-task set to true\r\n\r\n{code:java}\r\n[WARN] : W/System.err: java.lang.IllegalStateException: You must disable foreground dispatching while your activity is still resumed\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatchInternal(NfcAdapter.java:1345)\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatch(NfcAdapter.java:1331)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.handleDisableForegroundDispatch(NfcAdapterProxy.java:442)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.disableForegroundDispatch(NfcAdapterProxy.java:339)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:936)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1159)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:362)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:150)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n[ERROR] : TiExceptionHandler: (main) [8161,13694] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [2,13696] - In /alloy/controllers/index.js:138,18\r\n[ERROR] : TiExceptionHandler: (main) [0,13696] - Message: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : TiExceptionHandler: (main) [1,13697] - Source: nfcAdapter.disableForegroundDispatch();\r\n[ERROR] : V8Exception: Exception occurred at /alloy/controllers/index.js:138: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : V8Exception: You must disable foreground dispatching while your activity is still resumed\r\n{code}\r\n\r\nSame behaviour with android:launchMode and, as usual:\r\n\r\n{code:java}\r\n[WARN] : android:launchMode should not be used. Ignoring definition from .NfcActivity\r\n{code}\r\n\r\n*TAGBEAMURIS*: With and without android:launchMode:\r\n\r\nWhen pressing “select type of message to send”, nothing happens and this error appears (I've tryied to put a flower.jpg image in almost all the folders of the project):\r\n\r\n{code:java}\r\n[ERROR] : TiFileProxy: (main) [594,594] IOException encountered\r\n[ERROR] : TiFileProxy: java.io.FileNotFoundException: /storage/emulated/0/com.ASP.NFC/flower.jpg: open failed: ENOENT (No such file or directory)\r\n[ERROR] : TiFileProxy: \tat libcore.io.IoBridge.open(IoBridge.java:459)\r\n[ERROR] : TiFileProxy: \tat java.io.FileOutputStream.(FileOutputStream.java:87)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.titanium.io.TiFile.getOutputStream(TiFile.java:289)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.titanium.io.TiFile.open(TiFile.java:352)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.titanium.io.TiFile.write(TiFile.java:398)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.titanium.TiFileProxy.write(TiFileProxy.java:307)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:936)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1159)\r\n[ERROR] : TiFileProxy: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:363)\r\n[ERROR] : TiFileProxy: \tat ti.modules.titanium.ui.PickerProxy.handleMessage(PickerProxy.java:331)\r\n[ERROR] : TiFileProxy: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] : TiFileProxy: \tat android.os.Looper.loop(Looper.java:150)\r\n[ERROR] : TiFileProxy: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[ERROR] : TiFileProxy: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiFileProxy: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[ERROR] : TiFileProxy: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n[ERROR] : TiFileProxy: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)\r\n[ERROR] : TiFileProxy: \tat libcore.io.Posix.open(Native Method)\r\n[ERROR] : TiFileProxy: \tat libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)\r\n[ERROR] : TiFileProxy: \tat libcore.io.IoBridge.open(IoBridge.java:445)\r\n[ERROR] : TiFileProxy: ... 17 more\r\n{code}\r\n\r\n*TAGBEAM*: With and without android:launchMode:\r\n\r\nNo matter which option I select from the list (text, uri, media, etc) the other phone doesn’t detect it.\r\nAlso when trying to beam Media, this error appears (there is a defaults.png image in the Resources folder).\r\n\r\n{code:java}\r\n[ERROR] : TiBlob: (main) [1,164329] Resources/defaults.png\r\n[ERROR] : TiBlob: java.io.FileNotFoundException: Resources/defaults.png\r\n[ERROR] : TiBlob: \tat android.content.res.AssetManager.openAsset(Native Method)\r\n[ERROR] : TiBlob: \tat android.content.res.AssetManager.open(AssetManager.java:560)\r\n[ERROR] : TiBlob: \tat android.content.res.AssetManager.open(AssetManager.java:534)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:77)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:390)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:285)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:113)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.io.TiResourceFile.read(TiResourceFile.java:121)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.TiFileProxy.read(TiFileProxy.java:257)\r\n[ERROR] : TiBlob: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[ERROR] : TiBlob: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)\r\n[ERROR] : TiBlob: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:936)\r\n[ERROR] : TiBlob: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1159)\r\n[ERROR] : TiBlob: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:363)\r\n[ERROR] : TiBlob: \tat ti.modules.titanium.ui.PickerProxy.handleMessage(PickerProxy.java:331)\r\n[ERROR] : TiBlob: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] : TiBlob: \tat android.os.Looper.loop(Looper.java:150)\r\n[ERROR] : TiBlob: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[ERROR] : TiBlob: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] : TiBlob: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[ERROR] : TiBlob: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n{code}\r\n\r\n\r\nI've been unable to run any of the samples. Even trying lots of modifications and possible workarounds nothing seems to work.\r\n\r\nIf this works for you, please share how did you do it and maybe your code and your tiapp.xml, so we can see what are we doing wrong.\r\n\r\nPlease help\r\n\r\n\r\nEDIT: I'm trying to read/write a Tag and also another NFC enabled device. The Tag is perfectly readable by other Play Store apps and also from a simple app that I made using Android Studio.\r\n\r\nUPDATE: Tested this morning in SDK 7.1.0.RC as per indication of the support team. Exactly the same issues as with previous SDKs.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-03-07T15:57:44.000+0000", "updated": "2018-03-09T14:55:36.000+0000" }, { "id": "435434", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dfalcon] What does your tiapp.xml look like?\r\n\r\nThese are the intent-filters I used:\r\n{code:xml}\r\n\r\n\t\r\n\t\r\n\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\r\n\r\n\t\r\n\t\r\n\r\n{code}\r\n{code:xml}\r\n\r\n\r\n{code}\r\n\r\nI made a basic example of detecting tags here:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'gray' }),\r\n nfc = require('ti.nfc'),\r\n nfcAdapter = nfc.createNfcAdapter({\r\n onNdefDiscovered: handleDiscovery,\r\n onTagDiscovered: handleDiscovery,\r\n onTechDiscovered: handleDiscovery\r\n });\r\n\r\nfunction handleDiscovery (e) {\r\n alert(JSON.stringify(e, null, 2));\r\n}\r\n\r\nif (!nfcAdapter.isEnabled()) {\r\n alert('NFC is not enabled on this device');\r\n} else {\r\n Ti.Android.currentActivity.addEventListener('newintent', function (e) {\r\n nfcAdapter.onNewIntent(e.intent);\r\n });\r\n}\r\n\r\nwin.open();\r\n{code}\r\n\r\nAfter scanning an NFC card I receive an alert dialog on the screen.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-09T21:29:17.000+0000", "updated": "2018-03-09T21:29:30.000+0000" }, { "id": "435442", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi Gary,\r\n\r\nMy tiapp.xml is attached at the beginning of the ticket.\r\n\r\nSo, should I get rid of the alloy examples and try to do this in a classic project? Should I add or remove something from my tiapp.xml? I think that, at least, the intent for the \"android.nfc.action.TAG_DISCOVERED\" is not in there.\r\n\r\nSo, for my next \"experiment\": Should I get rid of the android:launchMode=\"singleTask\" and add the true ?\r\n\r\nIf you can answer this I will perform some more tests as soon as possible and let you know the results.\r\n\r\nThanks for helping.", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-03-09T23:11:25.000+0000", "updated": "2018-03-09T23:11:25.000+0000" }, { "id": "435443", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ah yes, so I found it's important to define\r\n\r\n{code:xml}\r\n\r\n{code}\r\n\r\nin each {{intent-filter}}. You can use either Alloy or Classic, I personally prefer working with classic projects. But this shouldn't make a difference. Setting any {{android:launchMode}} parameters will be ignored. I also found I didn't need to specify {{intent-filter-new-task}} for this to work.\r\n\r\nTry my example code and see if that works for you?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-09T23:29:28.000+0000", "updated": "2018-03-09T23:29:28.000+0000" }, { "id": "435446", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Finally.\r\n\r\nAfter adding your adjustments on a classic project the tag scanning worked. I've even managed to make the app write in the tag using part of the code from the old examples (without the foreground dispatchers and all).\r\n\r\nI think that the problem was both the lack of the TAG_DISCOVERED intent plus a wrong coding in the alloy examples, probably outdated since SDK 6.0.4 or so.\r\n\r\nThis is working now on SDK 7.1.0.RC. I will be doing more test with the rest of possibilities (beam) as soon as I get back to my office, but this looks promising.\r\n\r\nMany thanks for the effort on checking this. For the community, I think it will be worthy to update the documentation on Ti.NFC to allow the usage of the module without any difficulties (in fact, how it works right now is even easier than in the old examples).", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-03-10T09:01:20.000+0000", "updated": "2018-03-10T09:01:20.000+0000" }, { "id": "435447", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Happy to hear that [~dfalcon]! I've [updated the docs|https://github.com/appcelerator-modules/ti.nfc/commit/89f7c621bffc85046457ace77218f67acc9349af] to reflect the intent-configuration and will do the same for the example. We should also add an example to the KitchenSink (cc [~topener]).\r\n\r\n*EDIT*: [~bimmel] The docs of the NFC module have been updated. Can we include these changes in the Mondays docs push as well or are they automatically fetched anyway?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-10T09:24:54.000+0000", "updated": "2018-03-10T09:28:17.000+0000" }, { "id": "435492", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], I'll push this change out during our next release.", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-03-12T16:30:33.000+0000", "updated": "2018-03-12T16:30:33.000+0000" }, { "id": "435712", "author": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "body": "Hi guys,\r\n\r\nHate to bring this to the table again, but I found a possible bug on the module.\r\n\r\nWhenever you scan a tag, the app starts a new activity, and there is no way to create an app running in single activity.\r\n\r\nThe documentation stated that \"android:launchMode='singleTask' is needed so that new intents that result from NFC message dispatching do not start a new activity in your application\".\r\n\r\nAs this is not working anymore, the workaround the get the same behaviour, according to more up-to-date documentation, is to use the true\r\n\r\nBut even adding that, the app is still creating a new Activity. With each scan, the app shows a different activity name as shown:\r\n{code:java}\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.dfa.zznfc.ZznfcActivity@c44e1ae\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.dfa.zznfc.ZznfcActivity@ff1dd2b\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.dfa.zznfc.ZznfcActivity@6b7e0e1\r\n{code}\r\nI've also seen that there is an example that uses something called \"Foreground Dispatching\". However, when I try to use the code of that example, I always found the following errors:\r\n{code:java}\r\n[WARN] : W/System.err: java.lang.IllegalStateException: Foreground dispatch can only be enabled when your activity is resumed\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.enableForegroundDispatch(NfcAdapter.java:1298)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.handleEnableForegroundDispatch(NfcAdapterProxy.java:447)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.enableForegroundDispatch(NfcAdapterProxy.java:368)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:962)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1186)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:374)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:150)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n[ERROR] : TiExceptionHandler: (main) [206,206] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,206] - In /app.js:54,14\r\n[ERROR] : TiExceptionHandler: (main) [0,206] - Message: Uncaught Foreground dispatch can only be enabled when your activity is resumed\r\n[ERROR] : TiExceptionHandler: (main) [1,207] - Source: \t\tnfcAdapter.enableForegroundDispatch(dispatchFilter);\r\n[ERROR] : V8Exception: Exception occurred at /app.js:54: Uncaught Foreground dispatch can only be enabled when your activity is resumed\r\n[ERROR] : V8Exception: Foreground dispatch can only be enabled when your activity is resumed\r\n[WARN] : W/System.err: java.lang.IllegalStateException: You must disable foreground dispatching while your activity is still resumed\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatchInternal(NfcAdapter.java:1345)\r\n[WARN] : W/System.err: \tat android.nfc.NfcAdapter.disableForegroundDispatch(NfcAdapter.java:1331)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.handleDisableForegroundDispatch(NfcAdapterProxy.java:442)\r\n[WARN] : W/System.err: \tat ti.nfc.NfcAdapterProxy.disableForegroundDispatch(NfcAdapterProxy.java:339)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:962)\r\n[WARN] : W/System.err: \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1186)\r\n[WARN] : W/System.err: \tat org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:374)\r\n[WARN] : W/System.err: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[WARN] : W/System.err: \tat android.os.Looper.loop(Looper.java:150)\r\n[WARN] : W/System.err: \tat android.app.ActivityThread.main(ActivityThread.java:5621)\r\n[WARN] : W/System.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)\r\n[WARN] : W/System.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)\r\n[ERROR] : TiExceptionHandler: (main) [11,218] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,218] - In /app.js:57,14\r\n[ERROR] : TiExceptionHandler: (main) [0,218] - Message: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : TiExceptionHandler: (main) [0,218] - Source: \t\tnfcAdapter.disableForegroundDispatch();\r\n[ERROR] : V8Exception: Exception occurred at /app.js:57: Uncaught You must disable foreground dispatching while your activity is still resumed\r\n[ERROR] : V8Exception: You must disable foreground dispatching while your activity is still resumed\r\n{code}\r\nFor reference, I'm using this code in a classic project:\r\n{code:java}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'gray' }),\r\n nfc = require('ti.nfc'),\r\n dispatchFilter,\r\n nfcAdapter = nfc.createNfcAdapter({\r\n onNdefDiscovered: handleDiscovery,\r\n onTagDiscovered: handleDiscovery,\r\n onTechDiscovered: handleDiscovery\r\n });\r\nfunction handleDiscovery (e) {\r\n alert(JSON.stringify(e, null, 2));\r\n}\r\nif (!nfcAdapter.isEnabled()) {\r\n alert('NFC is not enabled on this device');\r\n} else {\r\n\tdispatchFilter = nfc.createNfcForegroundDispatchFilter({\r\n\t\tintentFilters: [\r\n\t\t\t// The discovery could be restricted to only text with\r\n\t\t\t// { action: nfc.ACTION_NDEF_DISCOVERED, mimeType: 'text/plain' },\r\n\t\t\t{ action: nfc.ACTION_NDEF_DISCOVERED, mimeType: '*/*' },\r\n\t\t\t// The discovery could be restricted by host with\r\n\t\t\t//{ action: nfc.ACTION_NDEF_DISCOVERED, scheme: 'http', host: 'www.appcelerator.com' }\r\n\t\t\t{ action: nfc.ACTION_NDEF_DISCOVERED, scheme: 'http' }\r\n\t\t],\r\n\t\t// The techList can be specified to filter TECH_DISCOVERED messages by technology\r\n\t\ttechLists: [\r\n\t\t\t[ \"android.nfc.tech.NfcF\" ],\r\n\t\t\t[ \"android.nfc.tech.Ndef\" ],\r\n\t\t\t[ \"android.nfc.tech.MifareClassic\" ],\r\n\t\t\t[ \"android.nfc.tech.NfcA\" ]\r\n\t\t]\r\n\t});\r\n Ti.Android.currentActivity.addEventListener('newintent', function (e) {\r\n nfcAdapter.onNewIntent(e.intent);\r\n });\r\n\tTi.Android.currentActivity.addEventListener('resume', function(e) {\r\n\t\tnfcAdapter.enableForegroundDispatch(dispatchFilter);\r\n\t});\r\n\tTi.Android.currentActivity.addEventListener('pause', function(e) {\r\n\t\tnfcAdapter.disableForegroundDispatch();\r\n\t});\r\n}\r\nwin.open();\r\n{code}\r\n\r\nWith the help of Gary I could make NFC apps that read, write, beam or receive. But always with the app getting a new activity.\r\n\r\nCould you help me to understand how should I use Foreground Dispatching to avoid the app creating a new Activity each time it scans an NFC Tag or a Beam?", "updateAuthor": { "name": "dfalcon", "key": "dfalcon", "displayName": "Daniel Falcon", "active": true, "timeZone": "Europe/Zurich" }, "created": "2018-03-19T08:46:38.000+0000", "updated": "2018-03-19T08:46:38.000+0000" }, { "id": "439846", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closed as completed. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:34:48.000+0000", "updated": "2018-08-06T17:34:48.000+0000" } ], "maxResults": 46, "total": 46, "startAt": 0 } } }