Simulating gcm notification from console

Categories: ANDROID like

In this post I will show only example of using gcm notification broadcasting from console. I assume You have working gcm methods in your project. You must change also in manifest two things. 1. In gcm receiver You must remove SEND 2. In permission list paste permission to send gcms. <receiver android:name="" android:permission=""//<–REMOVE, COPY TO […]

Notepad++ with regex, re-using match variables

Categories: NON ANDROID like

Here is an simple example how to use regex in notepad++ with reusing selected match variables. For example we have special code for simulating gcm notifications. We would like to see it in pretty style. To achieve this we must to move all elements with minus to the new lines. How to do it? Here […]

GCM notification with custom sound – shorter version (part)

Categories: ANDROID like

Here is a short example how to create notification with default stuff but different sound: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle("title") .setStyle(new NotificationCompat.BigTextStyle() .bigText("message")) .setContentText("message") .setAutoCancel(true) .setSound(soundUri) .setDefaults(NotificationCompat.DEFAULT_ALL ^ NotificationCompat.DEFAULT_SOUND); The most important part is here: .setDefaults(NotificationCompat.DEFAULT_ALL ^ NotificationCompat.DEFAULT_SOUND) Symbol ^ says “except”, so the last part would say “give me default notification except […]