我有一个不会改变的网站。我希望能够打开一个应用程序并按下网站上的特定按钮。这样做的主要原因是网站被设计为访问大约2秒钟,输入你的名字,按下按钮然后离开。
只是好奇,任何人都有任何想法。
谢谢
答案 0 :(得分:0)
您需要对网站进行反向工程以查看该按钮的功能,然后在您的启动器活动的onCreate
中发布请求(主要是POST
请求)以伪造该操作按钮。
答案 1 :(得分:0)
您可以在清单文件中使用intent过滤器。他是一个示例代码。
<activity
android:name=".TestActivity"
android:label="@string/app_name" >
<intent-filter>
<!-- for link -->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="test.com"
android:path="users/test"
android:pathPrefix="/"
android:scheme="http" />
</intent-filter>