Currently this feature supports the RC Pro Enterprise with firmware v02.00.04.07 and RC Plus with firmware v05.02.11.06.
- Call RemoteControllerKey.KeyAPPSilentlyUpgrade(a action key) to setup the app package name into the whitelist. Please be noted this configuration will be wiped off after rebooting the RC.
- Inside AndroidManifest.xml file, you need to add the provider section and permission.
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" /><provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider> - Place your apk under the directory: /sdcard/Android/data/your app package name/files/your apk name.apk.
- The install command is listed below.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
final File file = new File(getExternalFilesDir("."), "your app name.apk");
Uri uri = FileProvider.getUriForFile(this, getPackageName() + ".fileProvider", file);
intent.setDataAndType(uri, "application/vnd.android.package-archive");
startActivity(intent);
Comments
0 comments
Please sign in to leave a comment.