参考 http://code.google.com/p/android-scripting/wiki/UsingWebView
gzbus.py
# -*- coding: utf8 -*-
import android
droid = android.Android()
droid.addOptionsMenuItem('Exit','exit')
droid.webViewShow('http://gzbusnow.sinaapp.com/index.php')
while True:
response = droid.eventWait().result
if response == None: continue
print response
if response['name'] == 'exit':
break
在android 4.1 pad 上测试通过.
本文介绍了一种使用Python脚本控制Android设备上WebView的方法。通过gzbus.py脚本,可以在Android设备上显示指定网页,并监听退出菜单项的操作。此脚本已在Android 4.1平板上测试成功。
1537

被折叠的 条评论
为什么被折叠?



