ITeye博客

yuhushuan的博客

yuhushuan · 共 3 篇文章

Android 代码监控apk安装,卸载,替换

public class GetBroadcast extends BroadcastReceiver { private static GetBroadcast mReceiver = new GetBroadcast(); private static IntentFilter mIntentFilter; public static void registerReceiver(Context context) { mIntentFilter = new IntentFilter(); mIntentFilter.addDataScheme("package"); mIntentFilt…

2010-11-02 16:20 · 评论(0)

Android 分享

第一种方法使用地址 String url = "file:///" + "sdcard/download/filename";//filename带扩展名 Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); shareIntent.putExtra(Intent.EXTRA_SUBJECT, subject); shareIntent.putExtra(Intent.EXTRA_TEXT, body); shareIn…

2010-10-14 10:12 · 评论(0)

Android 获取联网方式及代理联网

得到联网方式的方法 public String NetType(Context context) { try { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = cm.getActiveNetworkInfo(); String typeName = info.getTypeName().toLowerCase; // WIFI/MOBILE if(typeName.equals.("wifi"))…

2010-08-23 11:43 · 评论(0)