Calculator App after Upgrade

JP

Recently, we have started to upgrade our TC57s from Android 8.1 to Android 11. The one problem that we have noticed is that the Calculator app package name is changing. The main issue with this is that it is not consistent among the devices we have upgraded and it ends up being one of the two names below.

com.google.android.calculator
com.android.calculator2

The kiosk profile is setup using com.google.android.calculator so any phone using the other one is not finding the app on the kiosk screen and is giving the error "package not found." The app in the Google Play Store only shows installed if the first package name is used, and when I try installing it when it is named the other way, I get an error.

What is the best way to resolve this issue? We have considered using another app from the Google Play Store entirely to avoid this issue, but I don't like the idea of using some random app that could be taken off the store at any moment and cause mass issues.

2 years ago
Android
ANSWERS
ZC
Zafer Cigdem
2 years ago

Hi James,

I did not face something similar but just an idea;

If it's not same for all devices that is upgraded to OS11, you may try to uninstall/install script to enable/disable the Calculator bundle ID. I'm not sure what can happened but you may try on 1 test device to disable calculator2 and re-enable ..calculator one, to do this you can send below legacy script (install/uninstall + bundle_ID) to your TEST device:

uninstall com.android.calculator2 (to disable this)

install com.google.android.calculator (enable this)

And then you can verify whether the calculator works by using the previous bundle ID of the calculator (...android.calculator), then if it's all good, you may use same kiosk bundle ID that you were using earlier.

I hope it helps. Thank you

Zafer

JP
James Pike
2 years ago

I have attempted this but nothing happens. I have also attempted adding [force] to the end but it still does not want to uninstall. Attached is the error I get in the Google Play Store when attempting to install the correct application. I have also tried installing the APK directly and it says it succeeds but nothing changes.

ZC
Zafer Cigdem
2 years ago

Thank you for sharing, as I don't have a similar case, I can't test it out by myself.

Can you uninstall the new calculator somehow? If yes, even if removing the old calculator can't you install the previous calculator by using an .apk?

Just in case you may try to use enable_system_app legacy script as below syntax: 

enable_system_app  + bundle ID

enable_system_app  install com.google.android.calculator --> whether this enable your previous calculator or not. Thank you

Zafer

MD
Matt Dermody Diamond Contributor
2 years ago

You can have two different Lockdown Profiles. One for each bundle ID of the Calculator app. Then have filter criteria based on that calculator app being installed. 

RC
Raymond Chan Diamond Contributor
2 years ago

If you can come up with simple filter criteria to target two different kiosk profiles to the right devices,  the approach mentioned by Matt is probably the cleanest and most systematic approach that I myself have been using for quite some time.

However, if it is not desirable or easy to come up with two kiosk profiles with appropriate assignment filter expressions, a dirty workaround which I have been using for nearly ten years is to use a script:// kiosk item calling a legacy MobiControl script, in which both of the app bundle-ID are included sequentially.  In situation when any device can have either one of the two apps, the script can always initiate the one found on each device targeted.   A custom calculator icon, rather than the default app icon associated with each of these two apps, should be defined for this script://  item.

With the javascript engine introduced about 2 years ago, one can of course use conditional construct to initiate the right app to improve this script approach further.

JP
James Pike
2 years ago

How would we go about doing this? Is there any documentation on calling a script from the kiosk profile entry? And would the script have to be written in Java or I can use the legacy Android Enterprise commands?

In another post, I saw where you could launch 2 different apps using the below but I couldn't get it to work.

launch://com.google.android.calculator/com.android.calculator2.Calculator

I also tried running the below legacy script on the device and I could not get it to work for me.

start activity com.google.android.calculator/com.android.calculator2.Calculator

MD
Matt Dermody Diamond Contributor
2 years ago

I am not sure of the formatting for a script like that as I've never tried that concept, but from what I can tell you have the wrong BundleID in your test scripts. com.android.calculator2 is the bundle ID, not com.android.calculator2.Calculator

RC
Raymond Chan Diamond Contributor
2 years ago

Under normal circumstance, there is no need to specify a particular activity of an app to start it, and  just using the bundle ID is already fine.   You have to verify that yourself on your device(s).

Assuming that the bundle ID's in earlier post are correct, then just add a new legacy script (say "abc.cmd" to be deployed somewhere on your device file-system accessible by the device agent)  with the following lines:

   start  com.android.calculator2 

   start  com.google.android.calculaton

In your kiosk profile payload, modify the original item to become a custom one :

    script://YOUR_DEV_FILE_FOLDER_PATH /abc.cmd

M
MNMOD@SOTI
2 years ago

Hi James,

Thank you for posting on SOTI Pulse!

I see that couple of answers are provided. Do any of these work for you? If yes, please feel free to mark the post as Solution that helped you resolve the issue.

Kind regards,

Technical Support Specialist | SOTI | +1 905.624.9828 | SOTI.net l Discussion Forum | Log a Case Online l Facebook l LinkedIn l Twitter