[Android] : Preferences Not Available to Plugins
See original GitHub issueI have been attempting to use the cordova-plugin-code-push alongside tabris-android. Unfortunately the “codepushdeploymentkey” preference along with other preferences are not being parsed/passed to the plugin during initialization. The debug logging statements below demonstrate what is happening:
09-11 05:17:38.153 6517 6517 D logging preferences parsed: {loglevel=DEBUG, codepushdeploymentkey=lhZoVI0z5UWn3GKr6O2_ROTUy-wYVyFgmvTob}
09-11 05:17:38.450 6517 6517 D logging preferences passed to appView.init: {loglevel=DEBUG, codepushdeploymentkey=lhZoVI0z5UWn3GKr6O2_ROTUy-wYVyFgmvTob}
09-11 05:17:38.450 6517 6517 D logging preferences received in CordovaWebViewImpl.init: {loglevel=DEBUG, codepushdeploymentkey=lhZoVI0z5UWn3GKr6O2_ROTUy-wYVyFgmvTob}
09-11 05:17:39.010 6517 6517 D logging preferences received in to TabrisWebView.init: {}
09-11 05:17:39.010 6517 6517 D logging preferences received in CordovaWebViewImpl.init: {}
My assumption is that the TabrisActivity.java, which I don’t have access to, is not parsing and passing the preferences to plugins that are being initialized. I would appreciate any advice you can give me regarding this, if you are unable to make the preferences available to plugins in a pr.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
a problem when using shared preference's plugin
I'm working on flutter and I've a problem with Shared preference plugin this is my code: import 'package:flutter/material.dart'; ...
Read more >[BUG] Shared Preference plugin not working for headless task
After doing a lot of research, I found the answer. Add this to your code before you use shared preferences. SharedPreferences.
Read more >SharedPreferences - Android Developers
For any particular set of preferences, there is a single instance of this class that all clients share. Modifications to the preferences must...
Read more >Get the Android Studio Azure DevOps Services plug-in
In this article · In Android Studio, open plugin settings: · Click the Browse repositories... · Click the Install plugin button and restart...
Read more >shared_preferences | Flutter Package - Pub.dev
Shared preferences plugin #. pub package. Wraps platform-specific persistent storage for simple data (NSUserDefaults on iOS and macOS, SharedPreferences on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@509dave16 You are absolutely correct; Tabris.js is not a hosting platform. However, assuming you are able to provide the hosting, I believe Tabris.js’ built-in functionality can solve all the other scenarios.
To give an implementation example, you might store a version number inside the app, for example
1.0.1
. Upon launch, the app can fetch a remote document to determine the most up-to-date version of the code. If the client has a copy that is older than what that document specifies, then it would call theinstallPatch
method. This would actually be a lot faster than CodePush’s methodolgy of running a diff on every single file in your app. Additionally it provides extra functionality in that you could theoretically patch one of your JavaScript dependencies innode_modules
.For more background on patching in Tabris.js check out this blog post.
@cookieguru Thanks for the example! I was starting to think along those same lines. I will have to explore Tabris.js patching some more. Appreciate the time you took today to address my issue.