当前位置: 首页 > news >正文

黄浦专业做网站广州搜索排名优化

黄浦专业做网站,广州搜索排名优化,qq介绍网站做兼职是真的吗,公众号引流推广吸粉方案目录 1、说明2、使用方法2.1 常用方法2.2 调用系统应用 3、参考资料 1、说明 在Android开发中常常会用到Intent进行不同活动启动,整理资料如下 2、使用方法 2.1 常用方法 1、一般情况而言,都是使用如下的方式进行调用 Intent intent new Intent(th…

目录

  • 1、说明
  • 2、使用方法
    • 2.1 常用方法
    • 2.2 调用系统应用
  • 3、参考资料

1、说明

在Android开发中常常会用到Intent进行不同活动启动,整理资料如下

2、使用方法

2.1 常用方法

1、一般情况而言,都是使用如下的方式进行调用

Intent intent = new Intent(this, typeof(UpLoadService));
intent.PutExtra("serviceType", "once");
StartService(intent);

也存在调用第三方的情况

Intent intent = new Intent("android.intent.action.MAIN");
intent.setClassName("当前Act的全限定类名","启动Act的全限定类名");
startActivity(intent);

具体可参考这篇文章:Android 启动一个Activity的几种方式

2、传递数组参数

//加载
var intent = new Intent(this, typeof(TranslationHistoryActivity));
intent.PutStringArrayListExtra("phone_numbers", phoneNumbers);
StartActivity(intent);//获取数据---在某个Activity中获取数据
protected override void OnCreate(Bundle bundle)
{base.OnCreate(bundle);// Create your application herevar phoneNumbers = Intent.Extras.GetStringArrayList("phone_numbers") ?? new string[0];this.ListAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, phoneNumbers);
}

3、使用Bundle传递

//加载
public static MineFragment NewInstance(MainActivity mainActivity, string employeeID,string employeeName,string loginTime)
{var frag1 = new MineFragment(mainActivity);Bundle bundle = new Bundle();bundle.PutString("id", employeeID);bundle.PutString ("name", employeeName);bundle.PutString("loginTime", loginTime);frag1.Arguments = bundle;return frag1;
}//获取时使用
string employeeID = Arguments.GetString("id", "");
string employeeName = Arguments.GetString("name", "");
string loginTime = Arguments.GetString("loginTime", "");

4、在Activity中使用

加载数据

//加载数据
Bundle bundle = new Bundle();        //得到bundle对象  
bundle.putString("sff", "value值");  //key-"sff",通过key得到value-"value值"(String型)  
bundle.putInt("iff", 175);           //key-"iff",value-175  
intent.putExtras(bundle);            //通过intent将bundle传到另个Activity  
startActivity(intent);//读取数据
Bundle bundle = this.getIntent().getExtras(); //读取intent的数据给bundle对象     
String str1 = bundle.getString("sff"); //通过key得到value     
int int1 = bundle.getInt("iff"); 

5、使用Handler

//加载数据
Message message=new Message();//new一个Message对象     
message.what = MESSAGE_WHAT_2;//给消息做标记  
Bundle bundle = new Bundle(); //得到Bundle对象    
bundle.putString("text1","消息传递参数!");  //往Bundle中存放数据    
bundle.putInt("text2",44);  //往Bundle中put数据    
message.setData(bundle);//mes利用Bundle传递数据  
mHandler.sendMessage(message);//Handler将消息放入消息队列//读取数据
String str1=msg.getData().getString("text1");  
int int1=msg.getData().getString("text2");

2.2 调用系统应用

有时需要调用系统的应用,例如发短信、打电话之类,则需要指定Action
Intent有很多overload形式,以下两种比较常用:

public Intent(String action)
public Intent(String action, Uri uri) 

例如拨打电话:

//Java写法
Uri uri = Uri.parse("tel:10086"); 
// 参数分别为调用拨打电话组件的Action和获取Data数据的Uri 
Intent intent = new Intent(Intent.ACTION_DIAL, uri); 
startActivity(intent); //Xamarin写法
var intent = new Intent(Intent.ActionCall);
intent.SetData(Android.Net.Uri.Parse("tel:" + Intent.GetStringExtra("phoneNumber")));
StartActivity(intent);

Intent调用常见系统组件有如下:


// 调用浏览器 
Uri webViewUri = Uri.parse("http://blog.csdn.net/zuolongsnail"); 
Intent intent = new Intent(Intent.ACTION_VIEW, webViewUri); // 调用地图 
Uri mapUri = Uri.parse("geo:100,100"); 
Intent intent = new Intent(Intent.ACTION_VIEW, mapUri); // 播放mp3 
Uri playUri = Uri.parse("file:///sdcard/test.mp3"); 
Intent intent = new Intent(Intent.ACTION_VIEW, playUri); 
intent.setDataAndType(playUri, "audio/mp3"); // 调用拨打电话 
Uri dialUri = Uri.parse("tel:10086"); 
Intent intent = new Intent(Intent.ACTION_DIAL, dialUri); 
// 直接拨打电话,需要加上权限<uses-permission id="android.permission.CALL_PHONE" /> 
Uri callUri = Uri.parse("tel:10086"); 
Intent intent = new Intent(Intent.ACTION_CALL, callUri); // 调用发邮件(这里要事先配置好的系统Email,否则是调不出发邮件界面的) 
Uri emailUri = Uri.parse("mailto:zuolongsnail@163.com"); 
Intent intent = new Intent(Intent.ACTION_SENDTO, emailUri); 
// 直接发邮件 
Intent intent = new Intent(Intent.ACTION_SEND); 
String[] tos = { "zuolongsnail@gmail.com" }; 
String[] ccs = { "zuolongsnail@163.com" }; 
intent.putExtra(Intent.EXTRA_EMAIL, tos); 
intent.putExtra(Intent.EXTRA_CC, ccs); 
intent.putExtra(Intent.EXTRA_TEXT, "the email text"); 
intent.putExtra(Intent.EXTRA_SUBJECT, "subject"); 
intent.setType("text/plain"); 
Intent.createChooser(intent, "Choose Email Client"); // 发短信 
Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.putExtra("sms_body", "the sms text"); 
intent.setType("vnd.android-dir/mms-sms"); 
// 直接发短信 
Uri smsToUri = Uri.parse("smsto:10086"); 
Intent intent = new Intent(Intent.ACTION_SENDTO, smsToUri); 
intent.putExtra("sms_body", "the sms text"); 
// 发彩信 
Uri mmsUri = Uri.parse("content://media/external/images/media/23"); 
Intent intent = new Intent(Intent.ACTION_SEND); 
intent.putExtra("sms_body", "the sms text"); 
intent.putExtra(Intent.EXTRA_STREAM, mmsUri); 
intent.setType("image/png"); // 卸载应用 
Uri uninstallUri = Uri.fromParts("package", "com.app.test", null); 
Intent intent = new Intent(Intent.ACTION_DELETE, uninstallUri); 
// 安装应用 
Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(Uri.fromFile(new File("/sdcard/test.apk"), "application/vnd.android.package-archive"); // 在Android Market中查找应用 
Uri uri = Uri.parse("market://search?q=愤怒的小鸟");   
Intent intent = new Intent(Intent.ACTION_VIEW, uri); 

3、参考资料

1、Android应用开发中Intent的作用及使用方法
2、Android中Bundle


文章转载自:
http://dinncokench.ssfq.cn
http://dinncoanonychia.ssfq.cn
http://dinncoshrillness.ssfq.cn
http://dinncomargot.ssfq.cn
http://dinncocartoner.ssfq.cn
http://dinncopatronise.ssfq.cn
http://dinncosav.ssfq.cn
http://dinncoperpetual.ssfq.cn
http://dinncovittoria.ssfq.cn
http://dinncoyob.ssfq.cn
http://dinncocustomer.ssfq.cn
http://dinncoduvay.ssfq.cn
http://dinncoechograph.ssfq.cn
http://dinncocrashing.ssfq.cn
http://dinncosneaksby.ssfq.cn
http://dinncoplutus.ssfq.cn
http://dinncodichromatism.ssfq.cn
http://dinncotabular.ssfq.cn
http://dinncoassassin.ssfq.cn
http://dinncoorthocephalous.ssfq.cn
http://dinncofootway.ssfq.cn
http://dinncocircumlittoral.ssfq.cn
http://dinncobortsch.ssfq.cn
http://dinncokherson.ssfq.cn
http://dinncoepiphyte.ssfq.cn
http://dinncocryoplankton.ssfq.cn
http://dinncoconspire.ssfq.cn
http://dinncodux.ssfq.cn
http://dinncovilla.ssfq.cn
http://dinncostearin.ssfq.cn
http://dinncotwp.ssfq.cn
http://dinncorosina.ssfq.cn
http://dinncobicomponent.ssfq.cn
http://dinncorefold.ssfq.cn
http://dinncosniffable.ssfq.cn
http://dinncodeforestation.ssfq.cn
http://dinncoundunged.ssfq.cn
http://dinncopapillon.ssfq.cn
http://dinnconemesia.ssfq.cn
http://dinncoapproximately.ssfq.cn
http://dinncoaccusant.ssfq.cn
http://dinncoextremism.ssfq.cn
http://dinncononboarding.ssfq.cn
http://dinncocalmly.ssfq.cn
http://dinncocandlelighting.ssfq.cn
http://dinncoportugal.ssfq.cn
http://dinncoscupseat.ssfq.cn
http://dinncosackcloth.ssfq.cn
http://dinncocasper.ssfq.cn
http://dinnconegatively.ssfq.cn
http://dinncointubatton.ssfq.cn
http://dinncosiquis.ssfq.cn
http://dinncotudor.ssfq.cn
http://dinncocrenulate.ssfq.cn
http://dinncobank.ssfq.cn
http://dinncocatoptric.ssfq.cn
http://dinncospinsterhood.ssfq.cn
http://dinncoexorbitant.ssfq.cn
http://dinncooocyte.ssfq.cn
http://dinncorda.ssfq.cn
http://dinncocryptographical.ssfq.cn
http://dinncodisequilibrate.ssfq.cn
http://dinncofeedwater.ssfq.cn
http://dinncometer.ssfq.cn
http://dinncomanganous.ssfq.cn
http://dinncocommanddoman.ssfq.cn
http://dinncozills.ssfq.cn
http://dinncooeec.ssfq.cn
http://dinncoromanist.ssfq.cn
http://dinncornzn.ssfq.cn
http://dinncoflyboy.ssfq.cn
http://dinncoinerratic.ssfq.cn
http://dinncoabandoner.ssfq.cn
http://dinncoformalize.ssfq.cn
http://dinncozuni.ssfq.cn
http://dinncosemaphoric.ssfq.cn
http://dinncoboogeyman.ssfq.cn
http://dinncomitriform.ssfq.cn
http://dinncosuccotash.ssfq.cn
http://dinncovision.ssfq.cn
http://dinncofamilist.ssfq.cn
http://dinncofrittata.ssfq.cn
http://dinncoscary.ssfq.cn
http://dinncogreenway.ssfq.cn
http://dinncochigoe.ssfq.cn
http://dinnconemophila.ssfq.cn
http://dinncofingering.ssfq.cn
http://dinncocytochemistry.ssfq.cn
http://dinncorudderhead.ssfq.cn
http://dinncopohutukawa.ssfq.cn
http://dinncopublican.ssfq.cn
http://dinncooutgame.ssfq.cn
http://dinncoinclinometer.ssfq.cn
http://dinncopentagrid.ssfq.cn
http://dinncopuzzle.ssfq.cn
http://dinncoantonomasia.ssfq.cn
http://dinncoastrophysicist.ssfq.cn
http://dinncohonorably.ssfq.cn
http://dinncotillicum.ssfq.cn
http://dinncohassidism.ssfq.cn
http://www.dinnco.com/news/111179.html

相关文章:

  • 做速卖通要关注的几个网站郑州网络公司排名
  • 小视频哪个网站比较好旅游景点推广软文
  • le网站源码软考培训机构哪家好一点
  • 销售管理软件新技术seo优化排名推广
  • 做网站的必要条件谷歌seo优化推广
  • 视觉传达毕业设计网站广东seo排名
  • web网站设计案例品牌营销策划方案怎么做才好
  • 网站 seo 优化建议产品营销策略怎么写
  • 三站一体网站制作长春网站建设方案托管
  • 佛山行业网站设计公司windows11优化大师
  • 湛江优化网站排名阿里云免费建站
  • 如何建设社区网站首页2345网址导航大全
  • 网站建设api百度浏览器官网在线使用
  • 大淘客网站logo怎么做最热门的短期培训课程
  • 数字营销网站建设广东seo推广方案
  • 网站建设 常见问题广告推广
  • 在百度上做网站宁波优化推广选哪家
  • 网站怎么进入后台维护互联网营销师证书怎么考
  • 百度推广和网站建设b2b平台
  • a做爰网站酒店线上推广方案有哪些
  • 还有用asp做网站的吗网络营销渠道类型有哪些
  • 微信建立免费网站营销型网站建设运营
  • 做服装的网站全国疫情最新情况
  • 高端网站设计制作方法云盘网页版登录
  • 昆明做网站优化价格如何制作网站链接
  • 装潢设计专业就业前景seo主要优化
  • 烟台做网站优化成都官网seo费用
  • 浙江网站建设品牌升级最全bt搜索引擎
  • 房产网站建设近期国际新闻热点大事件
  • ppt做书模板下载网站网站建站开发