Hi everybody,
I have been developping a launcher for a company in order to prevent users
(from this company of course) from doing some actions on the phone, like
send sms text for example.
So, I'd like to know how can I prevent user from sending sms text.
After seaching it, all I have found is people saying that it is not
possible. Well, I refuse to believe that. I think it's gotta be a way to do
this;
til now, all I'm getting is information about users' sms, using a extended
class from ContentObserver, like this:
public class SMSObserver extends ContentObserver {
private Handler handle = null;
private Context context;
public SMSObserver(Handler handler, Context context) {
super(handler);
this.handle = handler;
this.context = context;
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
Uri uriSMS = Uri.parse("content://sms/sent");
// Uri uriSMS = Uri.parse("content://sms/out");
// Uri uriSMS = Uri.parse("content://sms/");
Cursor cur =
context.getApplicationContext().getContentResolver().query(uriSMS, null,
null, null, null);
if (cur.moveToNext()) {
String[] nomes = cur.getColumnNames();
for (String string : nomes) {
Log.i("LAUNCHER", string);
}
Log.i("LAUNCHER", cur.getString(cur.getColumnIndex("address")));
Log.i("LAUNCHER",
cur.getString(cur.getColumnIndex("callback_number")));
Log.i("LAUNCHER", cur.getString(cur.getColumnIndex("read")));
Log.i("LAUNCHER", cur.getString(cur.getColumnIndex("type")));
Log.i("LAUNCHER", cur.getString(cur.getColumnIndex("body")));
}
}
}
does anybody knows how to do it?
any help would be really great.
thanks.
Lucas Diego
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.