你要访问其他的程序,那么这个程序要先装在到模拟器或真机上面,因为我们要使用要访问其他程序的包。
简单的访问有以下两种方式(目前只知道这两种):
一、使用Intent的setComponent方法
Intent intent = new Intent();
intent.setComponent(new ComponentName("包名", "包名.主类名"));
intent....
分类:
其他好文 时间:
2014-07-20 22:15:53
阅读次数:
374
ComponentName component = new ComponentName("com.android.settings","com.android.settings.wifi.WifiSettings"); Intent intent = new Intent(); intent.set...
分类:
移动开发 时间:
2014-07-12 14:41:10
阅读次数:
279
看到iphone上的日历图标上的数字会随着日期的变化而变化,最近在android平台上也研究了 一下,实现方法如下:
直接上源码
在launcher里改的
首先,在IconCache.java文件中,找到方法private CacheEntry cacheLocked(ComponentName componentName, ResolveInfo info,
Ha...
分类:
移动开发 时间:
2014-06-20 11:28:08
阅读次数:
512
class AddComponentRecursively extends
ScriptableWizard { var componentName : String = ""; @MenuItem ("GameObject/Add
Component Recursively..."...
分类:
其他好文 时间:
2014-06-07 01:09:07
阅读次数:
254
界面: Activitypackage
com.example.serviceTest;import android.app.Activity;import
android.content.ComponentName;import android.content...
分类:
移动开发 时间:
2014-05-18 19:12:31
阅读次数:
377
在学习Android的过程中,Intent是我们最常用Android用于进程内或进程间通信的机制,其底层的通信是以Binder机制实现的,在物理层则是通过共享内存的方式实现的。
Intent主要用于2种情景下:(1)发起意图
(2)广播
它的属性有:ComponentName,action,data,category,extras,flags等,通常情况下,进行Inten...
分类:
其他好文 时间:
2014-05-11 13:38:46
阅读次数:
334
Intent intent = new Intent();ComponentName cmp =
new
ComponentName("com.sina.weibo","com.sina.weibo.EditActivity");intent.setAction(Intent.ACTION_MAIN...
分类:
微信 时间:
2014-05-08 08:35:41
阅读次数:
736