摘要: 1 ntent.setType(“image/*”);//图片格式2 3 intent.setType(“audio/*”); //选择音频4 5 intent.setType(“video/*”); //选择视频 (mp4 3gp 是android支持的视频格式)6 7 intent.setTyp... 阅读全文
posted @ 2015-03-23 19:01 jenson138 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * 分享信息到朋友 3 * 4 * @param file,假如图片的路径为path,那么file = new File(path); 5 */ 6 private void shareToFriend(File file) { 7... 阅读全文
posted @ 2015-03-23 17:00 jenson138 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: 有时候我们需要在某个 Activity 停留几秒种,然后再跳到下一个 Activity。那么这个怎么实现呢?一个方法是可以使用 Thread 的 sleep 函数,这个我们在 用Handler实现线程间的消息通信 也有提到:1 try {2 Thread.sleep(1 * 1000);3 ... 阅读全文
posted @ 2015-03-23 16:04 jenson138 阅读(1538) 评论(0) 推荐(0) 编辑
摘要: 1 public static void CopyToClipboard(Context context,String text){2 ClipboardManager clip = (ClipboardManager)context.getSystemService(Context... 阅读全文
posted @ 2015-03-23 15:56 jenson138 阅读(4824) 评论(0) 推荐(0) 编辑
摘要: 1 private void phoneCall(String num) { 2 String phoneNum = "tel:" + num;3 Uri smsToUri = Uri.parse(phoneNu... 阅读全文
posted @ 2015-03-23 15:31 jenson138 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1 private void sendSMS(String num,String smsBody) { 2 String phoneNum = "smsto:" + num;3 Uri smsToUri = Uri.parse(phoneNum); 4 ... 阅读全文
posted @ 2015-03-23 15:27 jenson138 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1 public static void share(Context context, String text) {2 Intent intent = new Intent(Intent.ACTION_SEND);3 intent.setType("text/... 阅读全文
posted @ 2015-03-23 10:48 jenson138 阅读(403) 评论(0) 推荐(0) 编辑