码迷,mamicode.com
首页 >  
搜索关键字:componentname    ( 88个结果
Android中启动其它应用的几种方式
1,知道要启动的包名以及要启动的Activity: Intent intent = new Intent();                                /**下面方法的参数分别是指要启动应用的包名及对应的Activity*/ ComponentName cpn= new ComponentName("com.ldm.demo","com.ldm.demo.TextAct...
分类:移动开发   时间:2015-05-11 10:54:39    阅读次数:169
(六十一)Activity启动模式 及 Intent Flags 与 栈 的关联分析(转载自:http://blog.csdn.net/vipzjyno1/article/details/25463457)
在学习Android的过程中,Intent是我们最常用Android用于进程内或进程间通信的机制,其底层的通信是以Binder机制实现的,在物理层则是通过共享内存的方式实现的。 Intent主要用于2种情景下:(1)发起意图 (2)广播 它的属性有:ComponentName,action,d...
分类:Web程序   时间:2015-05-05 16:03:02    阅读次数:110
Intent的使用详解
在android中,Intent的使用可算是无处不在,它起到了媒介的作用,可以当做一条指令,或者一种协议。它的作用是告诉android系统要做什么和怎么做该Intent对象组要由六部分,分别是Componentname,Action,Data,Category,Extras以及Flags。那么这些部分分别起到什么作用,以及..
分类:其他好文   时间:2015-04-28 18:53:06    阅读次数:121
Service之“绑定”
Service类中和Service绑定有关的回调函数有2个:     1.IBinder onBind(Intent intent);     该方法的返回值会传递给android.content.ServiceConnection.onServiceConnected(ComponentName name, IBinder service),如果该方法返回值为null,则该Service不能...
分类:其他好文   时间:2015-04-23 09:42:58    阅读次数:185
Android apk程序调用其他的APK程序
Intent mIntent = new Intent();         ComponentName comp = new ComponentName("启动的APK包名","启动的APK入口类(包名加类名)");         mIntent.setComponent(comp);         mIntent.setAction("android.intent.action.MA...
分类:移动开发   时间:2015-03-16 12:58:06    阅读次数:219
PendingIntent的使用
1, 构造intent Intent mIntent = new Intent("android.intent.action.MAIN"); ComponentName comp = new ComponentName( "c...
分类:其他好文   时间:2015-03-02 16:45:27    阅读次数:208
Android App的源代码
AndroidApp的源代码:---------------------------------------------------------------------------------------------//myActivity.javapackagecom.misoo.pk01;importandroid.app.Activity;importandroid.content.BroadcastReceiver;importandroid.content.ComponentName;im..
分类:移动开发   时间:2015-03-01 22:27:54    阅读次数:247
android 获取当前 activity
ActivityManager am = (ActivityManager) this .getSystemService(ACTIVITY_SERVICE); List taskInfo = am.getRunningTasks(1); ComponentName componentInfo .....
分类:移动开发   时间:2015-02-12 10:29:30    阅读次数:166
Android使用ComponentName组件简单示例
Intent中可以直接使用Intent.setClass(),也可以使用组件Component.简单的使用方式如下: 1 package com.example.test; 2 3 import android.os.Bundle; 4 import a...
分类:移动开发   时间:2015-01-14 12:24:32    阅读次数:280
http://www.google.cn Android 生成谷歌地图
import java.util.Locale;import android.app.Activity;import android.content.ComponentName;import android.content.Intent;import android.content.pm.Activ...
分类:移动开发   时间:2015-01-12 10:47:32    阅读次数:156
88条   上一页 1 ... 4 5 6 7 8 9 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!