android-6.0-marshmallow

SMS does not send in Marshmallow

喜欢而已 提交于 2020-01-03 06:37:18
问题 I am trying to open System default Messaging activity when clicking on a button. Here is my code: smsUri = Uri.parse("tel:" + teacherPhone2); Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); intent.putExtra("address", teacherPhone); intent.setType("vnd.android-dir/mms-sms"); startActivity(intent); It works fine below MarshMallow. But in MarshMallow the app crashes when clicking that button. I have set the user-permission and also requested send sms permission. Can anyone tell me why

How do I create the Marshmallow open activity animation?

北慕城南 提交于 2020-01-03 05:02:13
问题 I am writing a launcher. How do I start an activity to show the Marshmallow animation? I have looked at the AOSP Launcher3 source and only found it to use this: if (useLaunchAnimation) { ActivityOptions opts = Utilities.isLmpOrAbove() ? ActivityOptions.makeCustomAnimation(this, R.anim.task_open_enter, R.anim.no_anim) : ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); optsBundle = opts.toBundle(); } Which then get fed into startActivity(context,

Android M: Scene transition with hero elements throws java.lang.IllegalStateException

我的梦境 提交于 2020-01-02 19:28:29
问题 I have a scene transition that I had some issues with: Scene transition with hero elements throws Layer exceeds max. dimensions supported by the GPU But setting transitionGroup fixed it. When I compile the exact same app with the the latest Android M SDK it crashes when pressing back from the transition. Abort message: 'art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethod called with pending exception java.lang.IllegalStateException: Unable to create layer

android-MNC project won’t run on devices prior to API level 'android-MNC'

非 Y 不嫁゛ 提交于 2020-01-02 09:54:26
问题 Shortly after the Google I/O keynote and the consecutive talks about Android M features, I started playing around with the new SDK functions, e.g., runtime permissions. For that it is necessary to set the compileSdkVersion as well as the targetSdkVersion to android-mnc . When running the project on a Nexus 5 with the Android M Developer Preview installed, Android Studio installs the application and it works fine on the device. If I set the minSdkVersion to, e.g., 10 to test it on a 2.3.6

Android M permission install/update behavior

对着背影说爱祢 提交于 2020-01-02 05:02:36
问题 With Android Marshmallow there is a new permission model. Implementing the new model was not a big deal for my affected app permissions. But there were some question around the install and update behavior. I identified some scenarios which are important for me. I know the official documentation (https://developer.android.com/preview/features/runtime-permissions.html) and some things might be clear, but I wanted to be sure. App with target SDK max. 22 installed on an M device and all

Android 6 revoked permissions checked as granted

烂漫一生 提交于 2020-01-01 22:22:51
问题 Got a problem hat I'm not sure is a bug or not. If the user grants a permission and then subsequently revokes it, it appears that checkSelfPermission returns GRANTED on the revoked permission. e.g. it appears that after revoking permission.CAMERA: true == ActivityCompat.checkSelfPermission(context, permission.CAMERA) == PackageManager.PERMISSION_GRANTED The only way i seem to find out that camera was revoked is by an exception: 10-20 14:25:54.330: E/AndroidRuntime(13954): java.lang

Android 6 revoked permissions checked as granted

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 22:22:36
问题 Got a problem hat I'm not sure is a bug or not. If the user grants a permission and then subsequently revokes it, it appears that checkSelfPermission returns GRANTED on the revoked permission. e.g. it appears that after revoking permission.CAMERA: true == ActivityCompat.checkSelfPermission(context, permission.CAMERA) == PackageManager.PERMISSION_GRANTED The only way i seem to find out that camera was revoked is by an exception: 10-20 14:25:54.330: E/AndroidRuntime(13954): java.lang

How Do I determine which app is causing the “Screen Overlay Detected” error?

╄→尐↘猪︶ㄣ 提交于 2020-01-01 12:01:19
问题 Let me preface this with I have already read through Android "Screen Overlay Detected" message if user is trying to grant a permission when a notification is showing and I understand exactly what the overlay problem is. I also understand how to request it as well as how to check if my current running app has permission to draw on overlays (!Settings.canDrawOverlays(this)). I was getting scolded for my app because every time a permission request would popup, the overlays popup would be shown

Android Marshmallow permission model on OS 4.0 READ_EXTERNAL_STORAGE permission always not granted

折月煮酒 提交于 2020-01-01 08:35:28
问题 I have a problem when running my app on Android OS 4.0 and requesting READ_EXTERNAL_STORAGE permission with: ActivityCompat.requestPermissions(ctx, requestedPermissions, requestCode); I always get on the callback public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { grantResults != PackageManager.PERMISSION_GRANTED Checking the permission with ActivityCompat.checkSelfPermission is always returning permissionDenied . It works well

Android M permissions close my app

送分小仙女□ 提交于 2020-01-01 08:01:47
问题 I check for the required permissions on my Log In screen. The dialog shows asking for the 4 permissions I need. All good, but when the dialog appears, the background becomes black and my app closes (doesn't crash, just closes). When I'm done with choosing the permissions I open the app again and it continues running from where it stopped. How can I make the app continue running while the permissions dialog is shown? I use a class which checks for permissions and call it in the Log In activity