learn to enjoy learning

Programming is hard.

You’ll never have finished learning programming, so learn to enjoy learning.

a must read for every programmer or programmer wannabe: http://writing.bryanwoods4e.com/1-poor-poor-child

Leave a Comment

sms2cal v0.3.3 released

Implemented a solution for users with problems about sms messages saved in google calendar with an offset of hours. Now you have an offset option in preferences to add (+X) or remove (-X) hours to the sms time.

Sorry about the delay for fixing this.

Comments (3)

Drink-O-Meter v0.4 released

  • Option to insert drinks in other date and hour than now. Desktop widget still inserts the drinks with the date and hour in the instant of insertion.
  • Improved calendar issues between different versions of android.

Comments (1)

Code for reading inbox sms in android

Tested on android 2.1 and 2.2.

Uri SMSURI = Uri.parse("content://sms/inbox");
String[] projection = new String[]{"_id", "address", "body", "date"};
Cursor cursor = null;
try {
	cursor = getContentResolver().query(SMSURI
			, projection
			, null //selection
			, null //selectionArgs
			, null); //sortOrder

	if (cursor != null && cursor.moveToFirst()) {
		do {
			int    id    = cursor.getInt(cursor.getColumnIndex("_id"));
			String address = cursor.getString(cursor.getColumnIndex("address"));
			String body = cursor.getString(cursor.getColumnIndex("body"));
			String date = cursor.getString(cursor.getColumnIndex("date"));

			SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy - HH:mm:ss");
			date = formatter.format(new Date(Long.parseLong(date))); 

			Log.d(Constants.LOGCAT, "id: " + id + "  address: " + address + "  body: " + body + "  date: " + date);

		} while (cursor.moveToNext());
	}
} finally {
	if (cursor != null) {
		cursor.close();
	}
}

Remember to set the properly permissions in android.manifest


<uses-permission android:name="android.permission.READ_SMS" />

Leave a Comment

help with translation

Ver esta entrada en españolSee this entry in english

I would like to translate my apps (sms2cal and Drink-O-Meter) to other languages than spanish and english.

Do you want one of this apps in your language? write me at pep _@_ spanishcoders.com or leave me a comment in this entry.

Leave a Comment

Drink-O-Meter v0.3.1 released

  • Drink log font color changed for better readability.
  • Added notification on each drink addition.

Leave a Comment

Problem: No calendars shown in preferences

Ver esta entrada en españolSee this entry in english

Some users are reporting that when they goes to preference screen no calendar are shown in order to select the calendar where the entries will be uploaded.

Having the calendar synchronized with your google calendar account in android general preferences is MANDATORY. Other way, the app (sms2cal and Drink-O-Meter) won’t work.

Comments (1)

sms2cal v0.3 released

Ver esta entrada en español / See this entry in english

Option to choose where to put the content of the sms in the calendar entry; two options:

  • Place the sms csontent in the title, right after the name/number of the sender;

  • Place the sms content in the description;

There have been users reporting problems using the app in a mobile synced with more than one google account. When the list of calendars is displayed in the preferences all calendars of all synced accounts are displayed. The sms will be backuped to the account of the calendar you have selected.

Comments (1)

Drink-O-Meter v0.3 released

  • Enabled froyo support (android 2.2)

Leave a Comment

sms2cal v0.2 released

  • Enabled froyo support

Leave a Comment

Bad Behavior has blocked 4 access attempts in the last 7 days.