Category : android-12

On Android 12, Issue reproducible with long file names. As it can see in the images attached, the extension of the file is cut in portrait. When I set "android:textAppearance" android:textAppearance="?attr/textAppearanceSubtitle1" and the layout <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".FirstFragment"> <TextView android:id="@+id/first_line_text" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:layout_marginEnd="10dp" android:ellipsize="middle" android:maxLines="1" app:layout_constraintWidth="true" android:text="RF_20210819NZ Herald ..

Read more

I have come across multiple sources that starting in late 2021, Android Advertising ID will not be available (it will be String of zeros) on Android 12 devices when users will be opt-out of Ads personalization. One of the good sources is: https://www.xda-developers.com/google-play-services-delete-ad-id-opt-out-personalization/ To ensure the proactive handling of my app monetization for the Android ..

Read more

We are currently implementing a splashscreen via the new Splashscreen API. We are following the migration guide. The background color is set correctly (by windowSplashScreenBackground), but the icon is not visible, neither on an Emulator, nor on a physical device. build.gradle android { compileSdkVersion 31 … } dependencies { implementation "androidx.core:core-splashscreen:1.0.0-alpha01" … } values-v31/themes.xml <style ..

Read more

I am testing my app in Android 12 official version in Pixel 3a. Then Sensor.TYPE_STEP_COUNTER can not be gotten. My source code : val sensorManager = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager val sensors = sensorManager.getSensorList(Sensor.TYPE_STEP_COUNTER) The size of return value "sensors" is 0 !! As far as I know, the size of return value was 1 in ..

Read more

A new PendingIntent field in PendingIntent is FLAG_IMMUTABLE. In 31, you must specify MUTABLE or IMMUTABLE, or you can’t create the PendingIntent, (Of course we can’t have defaults, that’s for losers) as referenced here According to the (hilarious) Google Javadoc for Pendingintent, you should basically always use IMMUTABLE (empasis mine): It is strongly recommended to ..

Read more

Android 12 requires the addition of a mutability flag to the creation of a PendingIntent. When creating a Pendingintent.getBroadcast() in the following way PendingIntent.getBroadcast(this.getApplicationContext(), 0, dismissIntent, PendingIntent.FLAG_CANCEL_CURRENT | android.app.PendingIntent.FLAG_MUTABLE); I get a "WrongConstant" error stating the following: Must be one or more of: PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, android.app.PendingIntent.FLAG_IMMUTABLE … Clearly, I have the flag set ..

Read more

I almost found many similar links – and none helped Gmail is not allowing me to get file from /storage/emulated/0/Android/data/myapppackage/cache/..pdf tried both manually using Gmail and programmatically Able to attach if the same file is downloaded to /storage/emulated/0/download/..pdf CODE – protected void sendEmail(Context ctx, String filePath){ Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); Uri uri = ..

Read more