Call calculator from B4A

mrjaw

Active Member
Licensed User
Longtime User
There is a way to call a calculator from B4A
?
 

klaus

Expert
Licensed User
Longtime User
Beginner's Guide Edit 2.2 chapter 17.27

B4X:
Sub Calculator
    Dim i As Intent
    i.Initialize("", "")
    i.SetComponent("com.android.calculator2/.Calculator")
    Try
        StartActivity(i)
    Catch
        ToastMessageShow("Calculator app not found.", True)
    End Try
End Sub
Best regards.
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
Klaus I tried that code but it says the calculator doesn't exist.

I guess Samsung has called it something else on my S2.

I've searched the internet about this and all posts I see say the manufacturer can change it and I guess that's what's happened to me.

Do you know how I find out the intent requirements for me to run then calculator?

regards, Ricky
 
Upvote 0
Top