Hi,
I am trying to access all the RCS messages on the device.
I get the following error:
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.sec.internal.tapi.service.provider.HistoryLogProvider from ProcessRecord{e7c133 3845:com.gilapps.rcstest/u0a240} (pid=3845, uid=10240) requires com.gsma.services.permission.RCS or com.sec.imsservice.WRITE_IMS_PERMISSION
Even though i request the permission.
Permissions:
<uses-permission android:name="com.gsma.rcs.com.RCS" />
<uses-permission android:name="com.gsma.rcs.permission.RCS" />
<uses-permission android:name="com.gsma.services.permission.RCS" />
<uses-permission android:name="com.gsma.rcs.com.gsma.services.permission.RCS" />
<uses-permission android:name="com.gsma.services.permission.RCS_INTERNAL_ACCESS_ONLY" />
<uses-permission android:name="com.samsung.rcs.im.READ_PERMISSION"/>
<uses-permission android:name="com.sec.imsservice.WRITE_IMS_PERMISSION"/>
<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
Code:
static final Uri CONTENT_URI = Uri.parse("content://com.gsma.services.rcs.provider.history/history");
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final String[] projection = new String[]{"*"};
Cursor query = getContentResolver().query(CONTENT_URI, projection, null, null, null);
if (query!=null) {
((TextView)findViewById(R.id.text)).setText("Found " + query.getCount());
if (query.moveToFirst()) {
do {
Log.i("testgil", "sss");
} while (query.moveToNext());
}
query.close();
}
else {
((TextView)findViewById(R.id.text)).setText("None found");
}
Hi,
I am trying to access all the RCS messages on the device.
I get the following error:
Even though i request the permission.
Permissions:
Code: