AVD工具/应用程序来监测和调试意图电话 [英] AVD tool / app to monitor or debug INTENT calls

查看:142
本文介绍了AVD工具/应用程序来监测和调试意图电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我开始写一个我正在寻找一个现有的应用程序,我可以推到一个AVD图像将作为哑/默认接收尽可能多的共同的类型越好。

Before I start to write one I'm looking for an existing App I can push to an AVD image that will act as a dummy / default receiver for as many of the common mime types as possible.

我们的想法是要测试一个成功的共享,而无需构建推到一个物理设备或刀叉特定应用模拟器。标准的AVD图像辉煌用于测试:通过我的code没有应用程序可以执行此操作路径,但不是一个积极的份额

The idea is to test a successful Share without having to push the build to a physical device or knife and fork a specific app to the emulator. The standard AVD images are brilliant for testing the: "No apps can perform this action" path through my code, but not a positive share.

推荐答案

作为权宜之计,每个我的评论上面我创建了一个虚拟接收机应用的基础上,的 tutorialspoint.com 例如,只会显示pased URI。

As a stopgap and per my comment above I created a dummy receiver app, based on the tutorialspoint.com example, that would simply display the pased URI.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_custom);

    TextView label = (TextView) findViewById(R.id.show_data);

    Uri url = getIntent().getData();
    label.setText(url.toString());
}

简单地扩大了一套过滤器的清单,涵盖大多数情况:

Simply expanded the set of filters in the manifest, to cover most scenarios:

    <activity
        android:name=".CustomActivity"
        android:label="@string/title_activity_custom" >
        <intent-filter>
            <action android:name="com.example.intentdemo.LAUNCH" />
            <action android:name="android.intent.action.SEND" />
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.EDIT" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="http" />
            <data android:scheme="https" />
            <data android:scheme="ftp" />
            <data android:scheme="fax" />
            <data android:scheme="tel" />
            <data android:scheme="tv" />
            <data android:scheme="telnet" />
            <data android:scheme="file" />
            <data android:scheme="data" />
            <data android:scheme="im" />
            <data android:scheme="irc" />
            <data android:scheme="gtalk" />
            <data android:scheme="info" />
            <data android:scheme="ldap" />
            <data android:scheme="imap" />
            <data android:scheme="mailto" />
            <data android:scheme="pop" />
            <data android:scheme="skype" />
            <data android:scheme="spotify" />
            <data android:scheme="ssh" />
            <data android:scheme="smb" />
            <data android:scheme="nfs" />
            <data android:scheme="steam" />
        </intent-filter>
    </activity>

这篇关于AVD工具/应用程序来监测和调试意图电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆