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.
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" />
Ver esta entrada en español | See 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.
Ver esta entrada en español | See 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.
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:
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.
Bad Behavior has blocked 3 access attempts in the last 7 days.