tray
tray copied to clipboard
ContentProvider on a customized process
tray Version (E.g. 0.12.0)
The Provider of Tray is running at main process. In our app we'd like to have it running in a ":service" process so that the UI process is free to be terminated by Android in background.
Seems at present there is no way to customize this.
I tried to manifest merger to add android:process=":service" to the Provider in manifest. But it crashed the app due to:
net.grandcentrix.tray.core.TrayRuntimeException: Internal tray error
Caused by: net.grandcentrix.tray.core.TrayRuntimeException: Internal tray error. Could not find the provider authority. Please fill an issue at https://github.com/grandcentrix/tray/issues 07-26 10:56:24.111 22418 22418 E AndroidRuntime: at net.grandcentrix.tray.provider.TrayContract.getAuthority(TrayContract.java:138) 07-26 10:56:24.111 22418 22418 E AndroidRuntime: at net.grandcentrix.tray.provider.TrayContract.generateContentUri(TrayContract.java:109) 07-26 10:56:24.111 22418 22418 E AndroidRuntime: at net.grandcentrix.tray.provider.TrayContract.generateContentUri(TrayContract.java:80) 07-26 10:56:24.111 22418 22418 E AndroidRuntime: at net.grandcentrix.tray.provider.TrayUri.This is because TrayContract.getAuthority() forces the query of providers in current process: getPackageManager() .queryContentProviders(context.getPackageName(), Process.myUid(), 0);
I have created a pull request for this issue. Pls check.
Same issue here