{ "id": "173715", "key": "MOD-2551", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2019-06-04T17:22:25.000+0000", "priority": null, "labels": [ "8.0.0.GA", "android-8", "barcode", "ti.barcode" ], "versions": [], "issuelinks": [], "assignee": { "name": "patakijv", "key": "patakijv", "displayName": "John V Pataki", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-19T23:25:29.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "14511", "name": "Barcode" } ], "description": "Using Ti.Barcode. If you press on 'Hello, World' and look at the console you will notice that it consoles\r\n\r\n{code:java}\r\n'*-*-*-*-*-*-* PAUSE BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* STOP BY OS *-*-*-*-*-*-*'\r\n{code}\r\n\r\nAnd if you press 'Cancel' or scan a barcode the console outputs\r\n{code:java}\r\n'*-*-*-*-*-*-* RESTARTED BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* START BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* RESUME BY OS *-*-*-*-*-*-*'\r\n{code}\r\n\r\nFrom what I notice it should not be affecting the activity. This is causing the barcode scanner to run slowly. Sometimes the barcode scanner is taking +30s to close in our production app.\r\n\r\nHere are the modules i'm using:\r\nhttps://github.com/appcelerator-modules/ti.barcode\r\nhttps://github.com/acktie/Acktie-Mobile-Android-Barcode\r\nhttps://github.com/mikefogg/BarcodeView", "attachment": [ { "id": "66671", "filename": "barcodeScanner.js", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-04T17:19:04.000+0000", "size": 1525, "mimeType": "text/javascript" }, { "id": "66675", "filename": "index.js", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-06T20:14:06.000+0000", "size": 2275, "mimeType": "text/javascript" }, { "id": "66676", "filename": "index.tss", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-06T20:14:27.000+0000", "size": 116, "mimeType": "application/octet-stream" }, { "id": "66677", "filename": "index.xml", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-06T20:14:27.000+0000", "size": 187, "mimeType": "text/xml" }, { "id": "66862", "filename": "media.io_shortTiClip.mov", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-20T15:56:48.000+0000", "size": 7140743, "mimeType": "video/quicktime" }, { "id": "66694", "filename": "Screen Shot 2019-06-13 at 8.50.51 AM.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-13T16:05:28.000+0000", "size": 359719, "mimeType": "image/png" }, { "id": "66672", "filename": "tiapp.xml", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-04T17:18:41.000+0000", "size": 4176, "mimeType": "text/xml" } ], "flagged": false, "summary": "Ti.Barcode stops the app when opened", "creator": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti.Barcode\r\n8.0.0\r\nAndroid 8.0.1", "comment": { "comments": [ { "id": "448821", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Why are you using three different barcode module? The second and third one is a third party module. Also, looks to be not supported with the latest SDK 8.0.1.GA when I tried to test with your sample code. Did you try the ti.barcode module's example code? there it has everything you needed for the barcode scanning? The example code works like charm with the module. Try it yourself and let us know. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-06-04T18:57:34.000+0000", "updated": "2019-06-04T18:57:34.000+0000" }, { "id": "448824", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@sharif barcodeScanner.js should be in the lib folder of the app project.", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-04T19:32:26.000+0000", "updated": "2019-06-04T19:32:47.000+0000" }, { "id": "448900", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Yes, I tried that. The other module Acktie-Mobile-Android-Barcode is showing error and not supported with SDK 8.0.1.GA. Why are you using three different barcode module? Did you try the ti.barcode module's example code? there it has everything you needed for the barcode scanning. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-06-06T18:19:21.000+0000", "updated": "2019-06-06T18:19:21.000+0000" }, { "id": "448904", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I updated the index files to remove those other modules. If you want to try that application. What I am talking about is that when Ti.Barcode is opened it fires the signal to pause and stop the activity and it shouldn't be doing that.", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-06T20:15:58.000+0000", "updated": "2019-06-06T20:15:58.000+0000" }, { "id": "449062", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also got an alert because this project has apparently been making api calls?\r\n !Screen Shot 2019-06-13 at 8.50.51 AM.png|thumbnail! ", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-13T16:05:30.000+0000", "updated": "2019-06-13T16:05:30.000+0000" }, { "id": "449153", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~josh.mocek] regarding your latest comment, you probably have a login call in alloy.js", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-18T11:25:53.000+0000", "updated": "2019-06-18T11:25:53.000+0000" }, { "id": "450045", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello!\r\nHope you are doing fine today.\r\nWould you please reply us regarding previous reviews? We are looking forward to your response.\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T05:09:07.000+0000", "updated": "2019-07-25T05:09:07.000+0000" }, { "id": "450552", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~josh.mocek],\r\nI just wanted to follow up and check the status of your issue. Did you manage to resolve the problem? Let us know the update.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-18T10:29:31.000+0000", "updated": "2019-08-18T10:29:31.000+0000" }, { "id": "450571", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It still crashes for me", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-19T13:26:49.000+0000", "updated": "2019-08-19T13:26:49.000+0000" }, { "id": "450589", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~josh.mocek], Can you please share a video that demonstrates the issue of pause the app activity when the ti barcode module is opened? We will investigate any issue with the ti.barcode module. The other third party module and the related issue, you have to reach out their support. Also, the reason you are getting API calls logged in the dashboard, possibly you have login calls in the allloy.js. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-08-19T22:07:52.000+0000", "updated": "2019-08-19T22:08:06.000+0000" }, { "id": "450609", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I added a video", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-20T15:57:06.000+0000", "updated": "2019-08-20T15:57:06.000+0000" }, { "id": "451031", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "The video does not show the app crash. Also in the video, you haven't shown any barcode scanning to demonstrate the slow scanning. Can you please clear your issue? what exactly the issue for you? thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-09-02T17:09:38.000+0000", "updated": "2019-09-02T17:09:38.000+0000" }, { "id": "451039", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The issue is that\r\n\r\nUsing Ti.Barcode. If you press on 'Hello, World' and look at the console you will notice that it consoles\r\n\r\n{code:java}\r\n'*-*-*-*-*-*-* PAUSE BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* STOP BY OS *-*-*-*-*-*-*'\r\n{code}\r\n\r\nAnd if you press 'Cancel' or scan a barcode the console outputs\r\n{code:java}\r\n'*-*-*-*-*-*-* RESTARTED BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* START BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* RESUME BY OS *-*-*-*-*-*-*'\r\n{code}\r\n\r\nIt should not be calling those. In this small sample app it isn't crashing.", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-03T13:40:45.000+0000", "updated": "2019-09-03T13:40:45.000+0000" }, { "id": "451456", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, In your index.js file I see you are calling them in \r\n{code}\r\nvar consoleError = (str) => (() => console.error(str));\r\nvar onPause = consoleError('*-*-*-*-*-*-* PAUSE BY OS *-*-*-*-*-*-*');\r\nvar onResume = consoleError('*-*-*-*-*-*-* RESUME BY OS *-*-*-*-*-*-*');\r\nvar onRestart = consoleError('*-*-*-*-*-*-* RESTARTED BY OS *-*-*-*-*-*-*');\r\nvar onClose = consoleError('*-*-*-*-*-*-* CLOSE BY OS *-*-*-*-*-*-*');\r\nvar onCreate = consoleError('*-*-*-*-*-*-* CREATE BY OS *-*-*-*-*-*-*');\r\nvar onStop = consoleError('*-*-*-*-*-*-* STOP BY OS *-*-*-*-*-*-*');\r\nvar onDestroy = consoleError('*-*-*-*-*-*-* DESTROY BY OS *-*-*-*-*-*-*');\r\nvar onStart = consoleError('*-*-*-*-*-*-* START BY OS *-*-*-*-*-*-*');\r\n\r\n..........\r\n\r\n\r\n\r\nfunction onWindowOpen() {\r\n\tif (OS_ANDROID) {\r\n\t\t$.index.activity.onPause = onPause;\r\n\t\t$.index.activity.onResume = onResume;\r\n\t\t$.index.activity.onRestart = onRestart;\r\n\t\t$.index.activity.onClose = onClose;\r\n\t\t$.index.activity.onCreate = onCreate;\r\n\t\t$.index.activity.onStop = onStop;\r\n\t\t$.index.activity.onDestroy = onDestroy;\r\n\t\t$.index.activity.onStart = onStart;\r\n\t\tvar permissionsToRequest = [\"CAMERA\"];\r\n\t\tpermissionsToRequest = permissionsToRequest.map((str) => \"android.permission.\" + str);\r\n\t\tpermissionsToRequest = permissionsToRequest.filter((perm) => !Ti.Android.hasPermission(perm));\r\n\t\tif (permissionsToRequest.length > 0) {\r\n\t\t\tTi.Android.requestPermissions(permissionsToRequest, (e) => e);\r\n\t\t}\r\n\t} else if (OS_IOS) {\r\n\t\tTi.App.addEventListener('resume', onResume);\r\n\t\tTi.App.addEventListener('paused', onPause);\r\n\t}\r\n\tcloseCamera();\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n\r\nI am not sure what is the problem here. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-09-17T19:12:54.000+0000", "updated": "2019-09-17T19:12:54.000+0000" }, { "id": "451499", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes the consoles are consoling out correctly. The consoles are just functions assigned to the activities event listeners, that way when an activity event is consoled it consoles. For example:\r\nIf you leave the app without killing it you will notice that '*-*-*-*-*-*-* PAUSE BY OS *-*-*-*-*-*-*' will be consoled out. If you go back into the app it will console '*-*-*-*-*-*-* RESUME BY OS *-*-*-*-*-*-*'.\r\n\r\nThe problem is that when a user opens the Ti.Barcode module it pauses the OS and then stops the OS when it should console nothing. You will notice that it pauses and stops the OS by the consoles.\r\n\r\n{code:java}\r\n'*-*-*-*-*-*-* RESTARTED BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* START BY OS *-*-*-*-*-*-*'\r\n'*-*-*-*-*-*-* RESUME BY OS *-*-*-*-*-*-*'\r\n{code}\r\n", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-19T13:39:23.000+0000", "updated": "2019-09-19T13:39:23.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }