Notification-創(chuàng)新互聯(lián)

1.android3.0版本以上的用法:

目前累計服務客戶近1000家,積累了豐富的產品開發(fā)及服務經驗。以網站設計水平和技術實力,樹立企業(yè)形象,為客戶提供做網站、網站制作、網站策劃、網頁設計、網絡營銷、VI設計、網站改版、漏洞修補等服務。成都創(chuàng)新互聯(lián)始終以務實、誠信為根本,不斷創(chuàng)新和提高建站品質,通過對領先技術的掌握、對創(chuàng)意設計的研究、對客戶形象的視覺傳遞、對應用系統(tǒng)的結合,為客戶提供更好的一站式互聯(lián)網解決方案,攜手廣大客戶,共同發(fā)展進步。

NotificationManager nm = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    Notification.Builder nb=new Builder(DownLoadService.this);
    Intent intent=new Intent();
    intent.setAction(Intent.ACTION_CALL);
    intent.setData(Uri.parse("tel:110"));
    PendingIntent pendingIntent=PendingIntent.getActivity(DownLoadService.this, 0, intent, 0);
    nb.setContentTitle("標題");
    nb.setContentText("內容");
    nb.setSmallIcon(R.drawable.alert_dark_frame);
    nb.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.alert_dark_frame));
    nb.setContentIntent(pendingIntent);
    Notification notification=nb.build();
    notification.flags= Notification.FLAG_AUTO_CANCEL;
    nm.notify(0, notification);

2.android任何版本通用用法:

NotificationManager nm=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    Notification notification=new Notification(R.drawable.alert_dark_frame,"",System.currentTimeMillis());
    notification.flags= Notification.FLAG_AUTO_CANCEL;
    Intent intent=new Intent();
    intent.setAction(Intent.ACTION_CALL);
    intent.setData(Uri.parse("tel:110"));
    PendingIntent pendingIntent=PendingIntent.getActivity(this, 0, intent, 0);
    notification.setLatestEventInfo(this, "標題", "內容", pendingIntent);
    nm.notify(0, notification);

另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

網頁題目:Notification-創(chuàng)新互聯(lián)
轉載注明:http://muchs.cn/article30/djieso.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供外貿建站、企業(yè)網站制作網站設計公司、網站導航、靜態(tài)網站、網站策劃

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

h5響應式網站建設