android-7.1-nougat

IllegalArgumentException: column '_data' does not exist

瘦欲@ 提交于 2019-11-27 12:13:03
问题 In Nougat, this function is not working. String path = getRealPathFromURI(this, getIntent().getParcelableExtra(Intent.EXTRA_STREAM)); public String getRealPathFromURI(Context context, Uri contentUri) { Cursor cursor = null; try { String[] proj = {MediaStore.Images.Media.DATA}; cursor = context.getContentResolver().query(contentUri, proj, null, null, null); if (cursor == null) return contentUri.getPath(); int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor

Replacing default Phone app on Android 6 and 7 with InCallService

萝らか妹 提交于 2019-11-27 02:02:34
Android API level 23 added InCallService to provide the user-interface for managing phone calls . The documentation provides an example manifest registration but I couldn't get it to work. The app compiles fine but Default Apps in settings doesn't show my app. The only place I found any information about the subject was a StackOverflow question that was closed a year ago. Comment on that question proposed to add android.intent.action.DIAL activity but that didn't help me either. I have tried various combinations of other intent's too ( android.intent.action.CALL_DIAL and android.intent.action

Replacing default Phone app on Android 6 and 7 with InCallService

China☆狼群 提交于 2019-11-26 08:30:39
问题 Android API level 23 added InCallService to provide the user-interface for managing phone calls . The documentation provides an example manifest registration but I couldn\'t get it to work. The app compiles fine but Default Apps in settings doesn\'t show my app. The only place I found any information about the subject was a StackOverflow question that was closed a year ago. Comment on that question proposed to add android.intent.action.DIAL activity but that didn\'t help me either. I have