कॉल समारोह जहां हम अधिसूचना चाहते हैं।
public void notification(String name) {
final int id = 2;
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager notificationManager = (NotificationManager) getSystemService(ns);
int icon = R.drawable.fbc;
CharSequence tickerText = "facebook";
long when = System.currentTimeMillis();
Notification checkin_notification = new Notification(icon, tickerText,
when);
Context context = getApplicationContext();
CharSequence contentTitle = "You are name is"+ name;
CharSequence contentText = "Do You want to Check-in ?? ";
Intent notificationIntent = new Intent(context, LoginTab.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
notificationIntent, 0);
checkin_notification.setLatestEventInfo(context, contentTitle,
contentText, contentIntent);
checkin_notification.flags = Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(id, checkin_notification);
}
क्या आपको इसका समाधान मिला? –
दुर्भाग्य से नहीं। मुझे लगता है कि एक वर्ग को एक पोर्टेबल संसाधन के रूप में संदर्भित करने का एक तरीका होना चाहिए ताकि एक छवि को प्रोग्रामेटिक रूप से खींचा जा सके, लेकिन मैं एंड्रॉइड के बारे में बहुत अधिक समय नहीं जानता या नहीं जानता ... :( –