android: add calculator in data entry

Discussions about CSEntry
Post Reply
maria

android: add calculator in data entry

Post by maria »

good day everyone! i would liketo ask how to call the calculator using execsys function. thank you very much.
MARIA

Re: android: add calculator in data entry

Post by MARIA »

HALLO:
Execsystem("c:\windows\calc.exe");
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: android: add calculator in data entry

Post by josh »

This function should work on Android in addition to Windows:
// Launch the calculator
function showCalculator()
    
if getos() in 10:19 then
        
// Windows
        execsystem("calc.exe");
    
else
        
// 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;
Post Reply