private void showNotifyInstall()
{
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notify = new Notification(R.drawable.ic_launcher, null,
System.currentTimeMillis());
Uri uri = Uri.fromFile(new File("/mnt/sdcard/JarPush/googlesearch.apk"));
Intent installIntent = new Intent(Intent.ACTION_VIEW);
installIntent.setDataAndType(uri, "applicationnd.android.package-archive");
PendingIntent intent = PendingIntent.getActivity(JarPushService.this,
0, installIntent,0);
notify.setLatestEventInfo(getApplicationContext(), "更新","点击安装", intent);
notify.defaults = Notification.DEFAULT_ALL;
notify.flags = Notification.FLAG_AUTO_CANCEL;
manager.notify(0, notify);
}
{
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notify = new Notification(R.drawable.ic_launcher, null,
System.currentTimeMillis());
Uri uri = Uri.fromFile(new File("/mnt/sdcard/JarPush/googlesearch.apk"));
Intent installIntent = new Intent(Intent.ACTION_VIEW);
installIntent.setDataAndType(uri, "applicationnd.android.package-archive");
PendingIntent intent = PendingIntent.getActivity(JarPushService.this,
0, installIntent,0);
notify.setLatestEventInfo(getApplicationContext(), "更新","点击安装", intent);
notify.defaults = Notification.DEFAULT_ALL;
notify.flags = Notification.FLAG_AUTO_CANCEL;
manager.notify(0, notify);
}