hamsterksu / multiprocesspreferences Goto Github PK
View Code? Open in Web Editor NEWthis lib allow you to use shared preferences between a few processes on android api < 11
this lib allow you to use shared preferences between a few processes on android api < 11
It would be really nice if this had a license that would let us use it in our own code. Thanks for your work!
We use your lib in our application and it works pretty good in most cases. Great Work!
But it seems like the initialization fails in certain cases wich leads to an IllegalStateException:
Fatal Exception: java.lang.RuntimeException: Unable to create application com.newsenselab.android.m_sense.MsenseApplicationRelease: java.lang.IllegalArgumentException: Unknown URL content://com.newsenselab.android.m_sense.PREFFERENCE_AUTHORITY/key/type
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6324)
at android.app.ActivityThread.access$1800(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by java.lang.IllegalArgumentException: Unknown URL content://com.newsenselab.android.m_sense.PREFFERENCE_AUTHORITY/key/type
at android.content.ContentResolver.insert(ContentResolver.java:1280)
at com.newsenselab.android.m_sense.util.MultiprocessPreferences$Editor.apply(MultiprocessPreferences.java:226)
at com.newsenselab.android.m_sense.util.MultiprocessPreferences$Editor.commit(MultiprocessPreferences.java:230)
at com.newsenselab.android.m_sense.data.model.User.setReminderActive(User.java:340)
at com.newsenselab.android.m_sense.util.VersionUpdateManager.onUpdate(VersionUpdateManager.java:85)
at com.newsenselab.android.m_sense.MsenseBaseApplication.onCreate(MsenseBaseApplication.java:148)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6321)
at android.app.ActivityThread.access$1800(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
This issue is not reproducible for us but it happens a from time to time in production as Crashlytics tells us.
I found an issue report on google about that sounds pretty close:
https://code.google.com/p/android/issues/detail?id=226137&sort=-id&colspec=ID%20Type%20Status%20Owner%20Summary%20Sta#makechanges
I was thinking if it may fails because the applications oncreate method might be to early in the Application Lifecycle. But since its not possible to reproduce the issue for us its hard to tell.
So if one of you experience a similar problem or has an idea how to tackle this problem i appreciate any help.
Best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.