This section demonstrates the following operations:
- Start mini program
- Run the mini program in real device
Starting the mini program simply needs one line of code.
Once the mini program package is uploaded to the mPaaS console, you can replace the “Hello mPaaS!” Toast related code (
Toast.makeText(MainActivity.this, "Hello mPaaS!", Toast.LENGTH_SHORT).show();) in the
MainActivity with the following code, so that the mini program starts upon a click on
- Connect your mobile to the computer, and turn on the USB debugging mode.
- Run the project in Android Studio to update the App installed on your mobile.
- Open the App on the mobile, click the text “Hello World” to start the mini program.
Now, you have successfully started the mini program and run it on the real device.
Click to download the demo used in the tutorial.