Is there a way to read sms from inbox using flash? I'm using flash to create an app. I've created native extension using eclipse and flash builder. The java code i used is:
FREObject result = null;
Bundle bundle = intent.getExtras();
String msgData = "";
if (bundle != null)
{
Uri uri = Uri.parse("content://sms/inbox");
Cursor cursor = context.getActivity().getContentResolver().query(uri, null, null, null, null);
cursor.moveToFirst();
do{
for(int idx=0;idx<cursor.getColumnCount();idx++)
{
msgData += " " + cursor.getColumnName(idx) + ":" + cursor.getString(idx);
}
}
while(cursor.moveToNext());
try
{
result = FREObject.newObject(msgData);
}
catch (FREWrongThreadException e)
{
Log.e(DeviceInfoExtension.TAG, "ErrorRead: "+e.getMessage(), e);
}
}
return result;
I couldn't figure out what's wrong ? Any help would be appreciated.