任何问题请联系WX:uu16853

买模板送网站采集器 让你轻松放开双手运营网站!

购买更多有优惠!

Android中Intent对应的category列表大全 Android开发技术

  在Android中使用Intent对应的category列表最全版本如下,更新到了Android 2.2 API Level8,Android123提示注意后面部分固件必须相应版本才可以调用  Android 1.5、1.6 android.intent.category.ALTERNATIVE   android.intent.category.BROWSABLE   android.intent.category.DEFAULTandroid.intent.category.DEVELOPMENT_PREFERENCE   android.intent.category.EMBED   android.intent.category.HOME   android.intent.category.INFO   android.intent.category.LAUNCHER   android.intent.category.MONKEY   android.intent.category.OPENABLE   android.intent.category.PREFERENCE   android.intent.category.SELECTED_ALTERNATIVE   android.intent.category.TAB   Android 2.0,2.0.1,2.1 新增车座和充电座 android.intent.category.CAR_DOCK   android.intent.category.DESK_DOCK  Android 2.2 新增行车模式 android.intent.category.CAR_MODE 

Android通过Intent发送电子邮件含附件 Android开发技术

   如何在Android系统中发送带附件的电子邮件呢? 其实通过Intent可以很方便的发送Email,只需要短短10行代码就可以处理,这里Android开发网就以在sdcard上的android123.cwj文件为例,通过Intent来发送电子邮件。完整代码如下 File file = new File("\sdcard\android123.cwj"); //附件文件地址  Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra("subject", file.getName()); // intent.putExtra("body", "android123 – email sender"); //正文 intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file)); //添加附件,附件为file对象            if (file.getName().endsWith(".gz")) {                intent.setType("application/x-gzip"); //如果是gz使用gzip的mime            } else if (file.getName().endsWith(".txt")) {                intent.setType("text/plain"); //纯文本则用text/plain的mime            } else {                intent.setType("application/octet-stream"); //其他的均使用流当做二进制数据来发送            }  startActivity(intent); //调用系统的mail客户端进行发送

100% Secure Checkout

PayPal / MasterCard / Visa