NotificationManager notificationManager = getNotificationManager(); Notification notification = new Notification(android.R.drawable.ic_menu_camera, "Hello camera!", System.currentTimeMillis()); notification.flags |= Notification.FLAG_AUTO_CANCEL; notification.number += 1; Intent intent = new Intent(this, MainActivity.class); PendingIntent activity = PendingIntent.getActivity(this, 0, intent, 0); notification.setLatestEventInfo(this, "title", "content", activity); notificationManager.notify(0, notification);
Builder build = new Notification.Builder(this) .setContentTitle("New mail from me") .setContentText("subject") .setTicker("New email with photo") .setSmallIcon(R.drawable.ic_action_search) .addAction( android.R.drawable.ic_btn_speak_now, "Speak!", PendingIntent.getActivity(getApplicationContext(), 0, getIntent(), 0, null)) .addAction( android.R.drawable.ic_dialog_map, "Maps", PendingIntent.getActivity(getApplicationContext(), 0, getIntent(), 0, null)) .addAction( android.R.drawable.ic_dialog_info, "Info", PendingIntent.getActivity(getApplicationContext(), 0, getIntent(), 0, null)); Notification notification = new Notification.BigPictureStyle(build) .bigPicture( BitmapFactory.decodeResource(getResources(), R.drawable.jellybean)).build(); Intent notificationIntent = new Intent(this, MainActivity.class); notificationManager.notify(0, notification);
App Inventor is an easy and fun way for the uninitiated to learn about computer programming, and is at the same time a productive!
For most, the underlying technology that makes an app tick is shrouded in mystery. This has been a boon for programming experts and has spurned a very profitable niche for professional programmers who are paid to research, develop, and build these apps. But what if you have an idea for the next big thing – or even the next little thing for that matter? Well, now there is hope for non-programmers. Recently, thanks to a collaboration between Google and MIT, the world of mobile app creation has been opened to everyone with App Inventor!