In the previous version of Hollywood for Android, I could download an .apk file from my server and install it programmatically using Run(). But now I get this message:
"Cannot find viewer for extention *.apk!"
Is there a different way that the package installer needs to be called now?
Change in How Run() and Execute() Work in Android
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Change in How Run() and Execute() Work in Android
Actually, Run() and Execute() were never designed to open APK files directly. I didn't even know that this was possible. The implementation of those commands didn't change in Hollywood 8.0 but of course the target Android API level had to be raised which means that some things might behave differently. I'll investigate what's causing this.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Change in How Run() and Execute() Work in Android
So the reason why this didn't work any more were, once again, new security restrictions introduced with Android 7.0. I've fixed it now but the result is that when installing the Hollywood Player, the user needs to explicitly allow it to install other apps. That's why it's disabled in the Hollywood APK Compiler because it doesn't make sense to activate it for all apps because then every app compiled by the Hollywood APK Compiler would ask for permission to install other apps which could be quite confusing. You can activate it manually, though.
Code: Select all
- Fix [Android]: Execute() and Run() can now be used to install APKs again; note that when using the
Hollywood APK Compiler you need to request the "REQUEST_INSTALL_PACKAGES" permission via the manifest
because by default apps can't install other apps and it doesn't make sense to generally request this
permission for all apps because very few will actually need this
Re: Change in How Run() and Execute() Work in Android
With the Professional Edition, can this be achieved right now by adding the following line to the manifest?
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Change in How Run() and Execute() Work in Android
Unfortunately not. It also needs a fix in the Hollywood runtime itself. However, since an update for the APK Compiler is to be released soon, you won't have to wait too long for this to work...
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Change in How Run() and Execute() Work in Android
APK Compiler 3.1 has just been released. If you include this line in the manifest...
...Run() and Execute() should be able to open APK packages.
Code: Select all
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
Re: Change in How Run() and Execute() Work in Android
Thanks for adding that feature!
Does this require the use of PermissionRequest() with a new constant?
Does this require the use of PermissionRequest() with a new constant?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Change in How Run() and Execute() Work in Android
No, that's not necessary. Just put it in the manifest and it should work.PEB wrote: ↑Fri Jun 14, 2019 10:53 pm Does this require the use of PermissionRequest() with a new constant?