GCX-HCI / tray

a SharedPreferences replacement for Android with multiprocess support
Apache License 2.0
2.29k stars 272 forks source link

How to run it in specific process #52

Closed xibsked closed 9 years ago

xibsked commented 9 years ago

I am having two processes in my app. Say I have two process com.example.appname.xx and another com.example.appname.yy . By default it is running in the process com.example.appname. How can I indicate it to run this in either com.example.appname.xx orcom.example.appname.yy.Thanks.

passsy commented 9 years ago

override the tray from the lib in your android manifest with

        <provider
            android:name=".provider.TrayContentProvider"
            android:authorities="@string/tray__authority"
            android:exported="false"
            android:multiprocess="false"
            android:process=":someOtherProcess" />
passsy commented 9 years ago

Have you any troubles running Tray in the main app process? Could it help if Tray runs by default in its own process?

xibsked commented 9 years ago

No Its running fine in the main process also. I am able to move it to the another process. Thanks passsy. You guys have really done great job!. I was facing tonnes of problem with SharedPreferences in multi process environment . Thanks alot!