Calculate is not working in android

Discussions about CSEntry
Post Reply
muhaliraza
Posts: 44
Joined: February 1st, 2018, 9:00 am

Calculate is not working in android

Post by muhaliraza »

I am using Samsung Tab A7 lite and the android version is 13. I am using the following code, but the calculate does not popup. Any idea who to resolve this issue.

function showCalculator()
if getos() = 10 then
// Windows
execsystem("calc.exe");
elseif getos() = 20 then
// Android - different devices have different built in calculators.
// Samsung uses app:com.sec.android.app.popupcalculator,
// LG and HTC use app:com.android.calculator2.
// We will try one and if it doesn't work then try the other.
if execsystem("app:com.sec.android.app.popupcalculator") <> 1 then
if execsystem("app:com.android.calculator2") <> 1 then
errmsg("Unable to launch calculator.");
endif;
endif;
endif;
end;
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Calculate is not working in android

Post by Gregory Martin »

Google added security restrictions to applications in Google Play that restrict their ability to open external applications. If you need to open another application, you can try installing the version of CSEntry that circumvents these restrictions. The latest version, 7.7.3, is here:

https://www.csprousers.org/apk/csentry7.7.3.apk

This cannot be hosted on Google Play, so if you intend to use this, you will have to manually install it on your devices.
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Calculate is not working in android

Post by htuser »

Because of the Google security restriction, it's a better approach to use the CSPro-JS API to enhance CSEntry apps. For the calculator, there's lot of Javascript examples on the web: https://www.google.com/search?q=javascr ... 6&dpr=1.25

You can easily pick one and add it to you CSEntry apps.
Best,
Last edited by htuser on March 27th, 2023, 7:56 am, edited 1 time in total.
G.VOLNY, a CSProuser from Haiti, since 2004
muhaliraza
Posts: 44
Joined: February 1st, 2018, 9:00 am

Re: Calculate is not working in android

Post by muhaliraza »

Dear Gregory,
Thanks for the clarification. I worked.
Post Reply