Page 1 of 1

Change in How Run() and Execute() Work in Android

Posted: Mon Apr 08, 2019 5:06 am
by PEB
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?

Re: Change in How Run() and Execute() Work in Android

Posted: Wed Apr 10, 2019 10:16 pm
by airsoftsoftwair
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.

Re: Change in How Run() and Execute() Work in Android

Posted: Thu Apr 11, 2019 1:14 am
by PEB
Thanks for looking into this.

I've experimented with trying to use Run() and Execute() to call Android's built-in package installer; but I haven't had any success so far. (It seems like that should be possible, though.)

Re: Change in How Run() and Execute() Work in Android

Posted: Wed Jun 05, 2019 4:28 pm
by airsoftsoftwair
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

Posted: Thu Jun 06, 2019 1:55 am
by PEB
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"/>

Re: Change in How Run() and Execute() Work in Android

Posted: Thu Jun 06, 2019 5:46 pm
by airsoftsoftwair
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...

Re: Change in How Run() and Execute() Work in Android

Posted: Fri Jun 14, 2019 7:28 pm
by airsoftsoftwair
APK Compiler 3.1 has just been released. If you include this line in the manifest...

Code: Select all

<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
...Run() and Execute() should be able to open APK packages.

Re: Change in How Run() and Execute() Work in Android

Posted: Fri Jun 14, 2019 10:53 pm
by PEB
Thanks for adding that feature!

Does this require the use of PermissionRequest() with a new constant?

Re: Change in How Run() and Execute() Work in Android

Posted: Sun Jun 16, 2019 11:32 am
by airsoftsoftwair
PEB wrote: Fri Jun 14, 2019 10:53 pm Does this require the use of PermissionRequest() with a new constant?
No, that's not necessary. Just put it in the manifest and it should work.