is there a tool or manual SDK that can match as much JAVA code to B4A code as possible? For example, run another APP and dynamically add buttons or other controls. It is mainly a few more examples, so that it can be faster and more convenient to convert JAVA code to B4A. Of course, the best approach is to simply insert the JAVA code into the B4A code file without the need for conversion.
like :
PackageManager= this.getPackageManager()
in.Action=intent.setAction
in.Flags =intent.setFlags
Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK =Bit.Or(0x04000000, 0x10000000)
like :
PackageManager= this.getPackageManager()
in.Action=intent.setAction
in.Flags =intent.setFlags
Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK =Bit.Or(0x04000000, 0x10000000)
Java:
Intent intent = this.getPackageManager().getLaunchIntentForPackage("com.tencent.mm");
intent.putExtra("LauncherUI.From.Scaner.Shortcut", true);
intent.setAction("android.intent.action.VIEW");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);
B4X:
Dim pm As PackageManager
Dim in As Intent = pm.GetApplicationIntent("com.tencent.mm")
in.PutExtra("LauncherUI.From.Scaner.Shortcut", True)
in.Action = "android.intent.action.VIEW"
in.Flags = Bit.Or(0x04000000, 0x10000000)
StartActivity(in)