@Override public void onCreate() { super.onCreate(); context = getApplicationContext(); myAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); }
@Override public void onCreate() { super.onCreate(); Log.i(TAG, "Manager started"); mBotifyManager = new BotifierManager(this); mHandler = new Handler() { public void handleMessage(Message msg) { String cmd = BotifierManager.CMD_NOTIFICATION_ADDED; if (msg.arg1 == 1) { cmd = BotifierManager.CMD_NOTIFICATION_REMOVED; } StatusBarNotification stn = (StatusBarNotification) msg.obj; if (stn == null || !mBotifyManager.isIntresting(stn.getNotification())) { return; } Notification not = stn.getNotification(); if (not == null) { return; } String description = ""; if (not.tickerText != null) { description = not.tickerText.toString(); } Service srv = BotifierNotificationService.this; String text = Botification.extractTextFromNotification(srv, not); Botification bot = new Botification( stn.getId(), stn.getPackageName(), stn.getTag(), description, text); Intent i = new Intent(cmd); i.putExtra("botification", bot); sendBroadcast(i); // Looper.myLooper().quit(); } }; }
@Override public void onCreate() { super.onCreate(); mNotificationHub = NotificationHub.getInstance(); mNotificationPeek = new NotificationPeek(mNotificationHub, this); }
@Override public void onCreate() { super.onCreate(); context = getApplicationContext(); }