Advertisement
tlmarker1968

A new day of battle

Oct 27th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. How I am calling the content provider from App B:
  2.  
  3.         @SuppressLint("Recycle") Cursor cursor = getContentResolver().query(Uri.parse("content://com.phehossof.requisition.ProviderContent/acl"), null, null, null, null, null);
  4.         if (isNull(cursor))
  5.             NotAuthorized();
  6.         assert cursor != null;
  7.         if(cursor.moveToFirst()) {
  8.             while(!cursor.isAfterLast()) {
  9.                 username = cursor.getString(cursor.getColumnIndex("name"));
  10.                 grade = cursor.getString(cursor.getColumnIndex("grade"));
  11.                 department = cursor.getString(cursor.getColumnIndex("department"));
  12.                 getPermissions(getString(R.string.app_name), Integer.parseInt(grade), Integer.parseInt(department));
  13.             }
  14.         } else {
  15.             NotAuthorized();
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement