Posts

Showing posts from August, 2013

An android library to display your changelog

Image
I've published a small library to display your changelog.
You can find sources, docs and examples in github.


ChangeLog Library provides an easy way to display a change log in your Android app.
It provides a custom ListView to display a change log through a xml file.
it supports multi languageyou can use it in Activities, Fragments, Dialogsit supports html text markup as bold and italicsyou can customize layout and behaviour
Implementing this library in your own apps is pretty simple.
First, you need an XML layout that will contain the ChangeLogListView that displays your changelog.
Then, you need a XML file with change log in res/raw folder.
It automatically searches for res/raw/changelog.xml but you can customize filename.
Initial release.[b]New![/b] Add new attrs to customize header and row layoutFixed log while parsing Add support for html markupAdd bullet point in Support for customized xml filename Last, if you would like a multi language changelog, you just…

Color Pickers from Google

Image
There are a lot of Color Pickers available, some very nice.
The most difficult thing is to know that there are and where they are.

Here a first collection, written by Google.
Checkout in github repository last version and last document about usage.

Google Stock Calendar

You can find source in Color Picker repository.
You can download and use it

It is very simple to use. You have just to provide an array of colors. ColorPickerDialog colorcalendar = ColorPickerDialog.newInstance( R.string.color_picker_default_title, mColor, 0, 5, Utils.isTablet(this)? ColorPickerDialog.SIZE_LARGE : ColorPickerDialog.SIZE_SMALL); colorcalendar.show(getFragmentManager(),"cal"); mColor is an array of Color.
public static int[] colorChoice(Context context){ int[] mColorChoices=null; String[] color_array = context.getResources(). getStringArray(R.array.default_color_choice_values); if (color_array!=null && color_array.length&g…

Notification History in 4.3+

Image
Android 4.3 has a new hidden feature: Notification History.
Currently there is no action.

You can see it in Manifest.xml:
https://github.com/android/platform_packages_apps_settings/blob/master/AndroidManifest.xml#L785


A simple way could be this:
Intent intent = new Intent("android.settings.SETTINGS"); intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, "com.android.settings.NotificationStation" ); Otherwise you can use:
Widgets->Setting shortcuts->Notifications and put a shortcut in your home launcher.

NotificationListenerService and a Whatsapp extension for Dashclock

Image
Android 4.3 (API 18) introduced NotificationListenerService.

In this post I'll talk how to use this API, and I'll show how an app can observe the stream of notifications with the user's permission.

It is very easy to use a NotificationListenerService.
First of all you have to extend NotificationListenerService and implement onNotificationPosted() and onNotificationRemoved() methods
public class WhtsNotificationListener extends NotificationListenerService { @Override public void onNotificationPosted(StatusBarNotification sbn) { //.............. } @Override public void onNotificationRemoved(StatusBarNotification sbn) { //.............. } } Then you must declare the service in your manifest file with the BIND_NOTIFICATION_LISTENER_SERVICE permission and include an intent filter with the SERVICE_INTERFACE action
Finally user must enable your service. Without this authorization it doesn't work!
Y…