The attached test B4XPage project opens the default calculator on a device, allowing the user to do some calculations. How to return the calculation result back to my app?
TIA
B4X:
Sub Button1_Click
Dim jo As JavaObject
jo.InitializeContext
jo.RunMethod("openCalculator", Null)
End Sub
Inline java code in Main module:
#If JAVA
import android.content.Intent;
public void openCalculator() {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_APP_CALCULATOR);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
#End If
TIA