2015-12-30 40 views
-1

爲什麼我的發射器圖標的大小很小。它只是圖像問題還是我做了一些錯誤的設置。我使用圖像資源來設置啓動器圖標。發射器圖標和推圖標大小問題

而且清單應用部分是像

<application 
android:name=".Abc" 
android:allowBackup="true" 
android:icon="@mipmap/ic_launcher" 
android:label="@string/app_name" 
android:theme="@style/AppTheme">...... 

而且推圖標來過小而我發送通知。

推代碼 公共無效的onCreate(){ super.onCreate(); Parse.initialize(this,「..」,「..」); ParseInstallation.getCurrentInstallation()。saveInBackground(); ...}

+0

附加請通知Java代碼 – piotrek1543

+0

我使用解析推送通知 – MAKEININDIA

+0

它似乎是你沒有所有尺寸的圖標 – piotrek1543

回答

0

您是否爲所有屏幕尺寸設置了所有圖標? 我通常使用this template來生成我的圖標,比我用Asset Studio生成不同的尺寸。

0

使用通知管理器創建通知。試試這個

Bitmap bm = BitmapFactory.decodeResource(context.getResources(), R.mipmap.launcher); 

NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 

     Intent intent = new Intent(context, MainActivity.class); 
     PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, Notification.DEFAULT_LIGHTS | Notification.FLAG_AUTO_CANCEL); 

     final Notification notification = new NotificationCompat.Builder(context).setLargeIcon(bm) 
       .setContentTitle("Application") 
       .setContentText("New Message") 
       .setContentIntent(pendingIntent) 
       .setAutoCancel(true) 
       .setTicker("New Message from a User") 
       .setVibrate(new long[]{200, 1000, 200, 1000}) 
       .setLights(Color.WHITE, 3000, 3000) 
       .getNotification(); 

     mNotificationManager.notify(10000, notification);