什么是Android的显性与隐性的活动通话之间的有什么不同? [英] What is the different between Explicit and implicit activity call in android?
本文介绍了什么是Android的显性与隐性的活动通话之间的有什么不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是明确的和隐含的活动通话之间的不同的Android?如果你用一个简单的例子来说明,答案将是不错的:)
What is the different between Explicit and implicit activity call in android ? if you explain the answer with a simple example will be good :)
推荐答案
例如:
隐活动通话
<activity android:name=".BrowserActivitiy" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
</intent-filter>
</activity>
和其他的方式来调用隐含的意图是如下。
And the Other way to call implicit Intent is below.
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://www.example.com"));
startActivity(intent);
明确活动的呼叫:您拨打一个电话,指示到底哪个活动类:
Explicit activity call: You make a call that indicate exactly which activity class:
Intent intent = new Intent(this, ActivityABC.class);
i.putExtra("Value", "This value for ActivityABC");
startActivity(intent);
希望这有助于您了解更多关于Android的显性和隐性的活动通话。 你可以得到更详细的关于Android意图 href="http://www.vogella.com/articles/AndroidIntent/article.html">
Hope this help you understand more about Explicit and implicit activity call in android. You can get more detail about Android Intent here
这篇关于什么是Android的显性与隐性的活动通话之间的有什么不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文