Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How I am calling the content provider from App B:
- @SuppressLint("Recycle") Cursor cursor = getContentResolver().query(Uri.parse("content://com.phehossof.requisition.ProviderContent/acl"), null, null, null, null, null);
- if (isNull(cursor))
- NotAuthorized();
- assert cursor != null;
- if(cursor.moveToFirst()) {
- while(!cursor.isAfterLast()) {
- username = cursor.getString(cursor.getColumnIndex("name"));
- grade = cursor.getString(cursor.getColumnIndex("grade"));
- department = cursor.getString(cursor.getColumnIndex("department"));
- getPermissions(getString(R.string.app_name), Integer.parseInt(grade), Integer.parseInt(department));
- }
- } else {
- NotAuthorized();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement