https://kotlinlang.org logo
Title
u

user

07/06/2022, 11:11 AM
Android - Listening to incoming messages Am working on an android app that should be able to listen to incoming SMS and then show notifications. Later am using content://sms/inbox public List getAllSms(String folderName) { List lstSms = new ArrayList(); Sms objSms = new Sms(); Uri message = Uri.parse("content://sms/"+folderName); ContentResolver cr = mActivity.getContentResolver(); Cursor c = cr.query(message, null, null, null, null); mActivity.startManagingCursor(c); int totalSMS = c.getCount(); if (c.moveToFirst()) { for...