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

青岛网站建设在线网站开发工具需求

青岛网站建设在线,网站开发工具需求,网站怎么做h5支付,做问卷的网站生成二维码目录 1、说明2、使用方法2.1 常用方法2.2 调用系统应用 3、参考资料 1、说明 在Android开发中常常会用到Intent进行不同活动启动#xff0c;整理资料如下 2、使用方法 2.1 常用方法 1、一般情况而言#xff0c;都是使用如下的方式进行调用 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 ArrayAdapterstring(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 messagenew 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 str1msg.getData().getString(text1); int int1msg.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 idandroid.permission.CALL_PHONE / Uri callUri Uri.parse(tel:10086); Intent intent new Intent(Intent.ACTION_CALL, callUri); // 调用发邮件这里要事先配置好的系统Email否则是调不出发邮件界面的 Uri emailUri Uri.parse(mailto:zuolongsnail163.com); Intent intent new Intent(Intent.ACTION_SENDTO, emailUri); // 直接发邮件 Intent intent new Intent(Intent.ACTION_SEND); String[] tos { zuolongsnailgmail.com }; String[] ccs { zuolongsnail163.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://www.hkea.cn/news/14521158/

相关文章:

  • 做网站怎么每天更新内容深圳互联网公司
  • 甘肃省建设部网站使用经典wordpress编辑器使用手册
  • 做网站大概多少钱php网站开发优势
  • 个人博客网站下载开发直播app多少钱
  • 怎样加快网站收录哈尔滨网站只做
  • 开发区网站开发语言windows 没有wordpress
  • 专业网站设计服务在线咨询做点心的网站
  • 深圳网站设计公司哪家便宜国家企业信用信息系统公示查询官网
  • 安徽网站建设方案开发专注手机网站建设
  • 湛江网站建设制作维护wordpress+企业库插件
  • 石家庄网站排名wordpress自定义页面创建专辑
  • 购买了域名之后怎么做网站公司logo设计在线生成免费设计入口
  • 旅行社电商网站怎么做免费建网上商城
  • 响应式网站开发方案百度竞价推广代运营公司
  • 山东济南做网站公司自己的网站怎么做进销存
  • 仙居网站建设wordpress创始人赚钱吗
  • 建站之星换模板网页设计实验报告实验1
  • 营销网站的建立新洲网站建设
  • 网站上常用字体无域名公司注册
  • 马鞍山做网站的公司软文自助发稿平台
  • 建设网站多少钱WordPress产品录入
  • 香奈儿网站建设策划书wordpress4.8主题
  • 营销型网站建设技术指标做网站模板的网页名称是m开头
  • 做农产品的网站名称无锡市新吴区住房和建设交通局网站
  • 泉州苏州百度seo
  • 为什么要建设图书馆网站帝国系统做网站地图
  • 莱州市规划建设管理局网站湖南网站排名
  • 重庆旅游网站建设地址宜家在线设计
  • 潍坊市作风建设年活动网站网站淘客怎么做
  • 天津河西做网站网站支持ipv6怎么做