通过Service下载文件,然后想写个notification提示下载完成哪位高手给出示例代码啊!!!!

解决方案 »

  1.   

    registerNotificationManager = (NotificationManager)IMConnectionService.this.getSystemService(NOTIFICATION_SERVICE);
    registerNotification = new Notification ();
    registerNotification.tickerText = "提示标题";
    registerNotification.icon = R.drawable.main_logo;
    registerNotification.when = System.currentTimeMillis();
    PendingIntent pt = PendingIntent.getActivity(Service实例, 0, null, 0);
    registerNotification.setLatestEventInfo(Service实例, "提示内容", "提示标题", pt);
    registerNotificationManager.notify(REGISTER_ID, registerNotification);
      

  2.   

    那个“Service实例”要写什么? 我是刚学 还请您 给我一个Service的完整的示例