App works on phone but not tablet

I have an App I am developing for phones and tablets.
I use a clock element to get the current date and time.
This works fine on my phone.
On my samsung tablet running the same MIT AI2 companion (v2.60) the clock element is not being recognised.
no method named 'Now' in class java.lang.Boolean
so i tried SystemTime instead of Now
no method named SystemTime' in class java.lang.Boolean

This works fine on the phone, just not on the tablet.
Any Ideas as to my issue?

Update:
So I created a new project to replicate this function and it works fine on the phone and tablet.
So my main project somehow loses the clock when being transferred to the tablet.

Further Update:
When I build the full project APK and install on Tablet the clock elements work, it is only the companions clock elements that fail on the tablet.

Thanks for letting us know the final outcome David. It's certainly a strange anomaly.

Can you post the model of the tablet and Android version?

Hi Chris,
The tablet is a Galaxy Tab S6 Lite
running android 11
kernel version 4.14.113-21053626
One UI version is 3.1

Thanks David

That might explain it - App Inventor, including the Companion, currently targets Android 10.

Ok, good to know, the full apk works fine on android11 in any case.
I will keep using android 10 for companion development.
Thanks.

This shouldn't be an issue of which Android version is targeted. My guess is that calling the procedure Initialize is causing headaches since that name is used internally to manage a bunch of things. Try using a different procedure name, e.g., init and see if you have the same issue.

I changed the name of this procedure and haven't had a problem since.

Thanks for the inputs guys.
also thanks for the all wonderful work that you are doing here.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.