How can I open a web page in App Inventor

梦想的初衷 提交于 2019-12-10 10:55:32

问题


I have a webviewer which is the main application andbelow the webviewer is a button. I would like to open a web page in the user's web browser when the button it clicked. How can I do this in App Inventor?

Action: android.intent.action.VIEW 
DataUri: http://example.com 

The above as instructed in the documentation isn't working.


回答1:


Add ActivityStarter to the screen and configure its properties:

ActivityStarter1
Action:android.intent.action.VIEW
DataUri:http://example.com 

Leave the other properties empty.

On the same screen, configure the event handler of the button to call the activityStarter1.StartActivity:

By pressing the button, the web browser is opened with the page http://example.com




回答2:


use the activity starter with the action android.intent.action.VIEW

The data URI is the website you want to open.

Then use:

call ActivityStarter1.StartActivity


来源:https://stackoverflow.com/questions/28869954/how-can-i-open-a-web-page-in-app-inventor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!