{ "id": "169414", "key": "AC-5127", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2017-08-29T19:53:48.000+0000", "created": "2017-08-06T17:16:12.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-30T08:49:49.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": [], "description": "Inside Firebase module this line will called:\r\n`FirebaseApp.initializeApp(ctx, firebaseOptions);`\r\nThis ran under SDK5, but now it crashes with:\r\n[WARN] : W/System.err: java.lang.NoSuchMethodError: No static method isDeviceProtectedStorage(Landroid/content/Context;)Z in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/io.mobilelearning.learn.mla-1/base.apk)\r\n[WARN] : W/System.err: \tat com.google.firebase.FirebaseApp.zza(Unknown Source)\r\n[WARN] : W/System.err: \tat com.google.firebase.FirebaseApp.initializeApp(Unknown Source)\r\n[WARN] : W/System.err: \tat com.google.firebase.FirebaseApp.initializeApp(Unknown Source)\r\n\r\nFor ctx I tested unsuccesfully with ctx from onCreateApp, `TiApplication.getInstance().getBaseContext();` and `getActivity().getApplicationContext();`\r\n\r\nIt seams in relation `Landroid/support/v4/content/ContextCompat`.\r\nI have tested with a lot of versions of google service stuff.\r\nHere the project: https://github.com/AppWerft/Ti.Firebase\r\n\r\n", "attachment": [], "flagged": false, "summary": "Issue with context since SDK6", "creator": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "425984", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "On JS layout I simple use:\r\n````\r\nif (Alloy.CFG.development_settings.firebase == true) {\r\n\t\tconst FiBa = require(\"ti.firebase\");\r\n\t\tFiBa.initFirebaseApp();\r\n}\r\n````", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-08-06T17:17:58.000+0000", "updated": "2017-08-06T17:17:58.000+0000" }, { "id": "425985", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "Found this method `isDeviceProtectedStorage` works only since SDK24. Does it supported by SDK6.1.1.?", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-08-06T17:50:17.000+0000", "updated": "2017-08-06T17:50:17.000+0000" }, { "id": "426312", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~titanium@webmasterei-hamburg.de],\r\n\r\nTi.Firebase is a third party module so contact with the module owner for any issue. Now Appcelerator latest SDK version is 6.1.2.GA and it supports Android API 24.\r\n\r\nThanks", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-08-09T08:26:22.000+0000", "updated": "2017-08-09T08:27:53.000+0000" }, { "id": "426317", "author": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "body": "Now I have installed sdk6.2.0.* from edge and API24. Its weird, but this is now the error message if I try to get the context (a problem before I call thirdparty stuff)\r\n\r\n[WARN] : W/System.err: java.lang.NoSuchMethodError: No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/io.mobilelearning.learn.mla-2/base.apk)\r\n\r\nI tested this ways to get context:\r\nTiApplication.getInstance().getBaseContext();\r\nTiApplication.getAppCurrentActivity().getApplicationContext();\r\nand inside onAppcreate:\r\n@Kroll.onAppCreate\r\n\tpublic static void onAppCreate(TiApplication _app) {\r\n\t\tctx = _app.getInstance().getBaseContext();\r\n\t\t\t\r\n\t}\r\nall the same issue with `cannot getAppCurrentActivity`… ", "updateAuthor": { "name": "titanium@webmasterei-hamburg.de", "key": "titanium@webmasterei-hamburg.de", "displayName": "Rainer Schleevoigt", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-08-09T09:45:41.000+0000", "updated": "2017-08-09T09:45:41.000+0000" }, { "id": "426434", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello!\r\n\r\nYou should use the latest tested version of Ti SDK and that is 6.1.2.GA. You can get it using this command\r\n- appc ti sdk install latest\r\n- appc use latest\r\n- appc setup\r\n\r\nAlso, this is not our Appcelerator official module so contact with the module owner for the issue.\r\n\r\nThanks", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-08-10T00:53:50.000+0000", "updated": "2017-08-10T00:54:08.000+0000" }, { "id": "427399", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Rainer, this is the same issue as in TIMOB-25206 and we just tracked it down to an SDK-regression. It will be fixed in 6.2.0.GA!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-08-30T08:49:49.000+0000", "updated": "2017-08-30T08:49:49.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }