Get rid of “Exported service does not require permission” warning

The warning is telling you that you have exported (ie: made publicly available) a service without securing it with a permission. This makes your service available to any other applications without restrictions. See Exported service does not require permission: what does it mean? If your service doesn’t need to be available to other applications, you … Read more

Android open pdf file

The problem is that there is no app installed to handle opening the PDF. You should use the Intent Chooser, like so: File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +”https://stackoverflow.com/”+ filename); Intent target = new Intent(Intent.ACTION_VIEW); target.setDataAndType(Uri.fromFile(file),”application/pdf”); target.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); Intent intent = Intent.createChooser(target, “Open File”); try { startActivity(intent); } catch (ActivityNotFoundException e) { // Instruct the user to … Read more

Android 13 – How to request WRITE_EXTERNAL_STORAGE

TLDR: You don’t. From Google’s official documentation: “If your app targets Android 11, both the WRITE_EXTERNAL_STORAGE permission and the WRITE_MEDIA_STORAGE privileged permission no longer provide any additional access.” So in effect, if you were to request WRITE_EXTERNAL_STORAGE on Android 11 or later, you would be requesting nothing. This is the whole point of Android’s migration … Read more

Usage of android:process

I would agree that not many people would find android:process to be useful as an attribute of the application tag. However, I have found it to be useful as an attribute of the activity tag. The purpose of android:process on an activity is to specify that your activity should be launched in a process having … Read more

How to specify to not allow any data backup with android:dataExtractionRules?

Add dataExtractionRules attribute to your AndroidManifest.xml file with a reference to data_extraction_rules.xml file: <application android:allowBackup=”false” android:fullBackupContent=”false” android:dataExtractionRules=”@xml/data_extraction_rules” …> Then, exclude all possible domains for cloud backups and d2d transfers, update or create a file app/src/main/res/xml/data_extraction_rules.xml: <?xml version=”1.0″ encoding=”utf-8″?> <data-extraction-rules> <cloud-backup> <exclude domain=”root” /> <exclude domain=”file” /> <exclude domain=”database” /> <exclude domain=”sharedpref” /> <exclude domain=”external” /> </cloud-backup> … Read more

Manifest merger failed targeting Android 12 [duplicate]

The issue was caused by 3 activities missing the android:exported attribute in the androidx.test:core library version 1.3.0. Upgrading to version 1.4.0-beta01 fixed the issue. If you are getting errors after targeting Android 12, the easiest way to debug this is to: downgrade to a prior sdk version rebuild project after a successful build, open your … Read more

Using the new “manifestmerger” property in Android

Add the following line to your project.properties file of your application project. manifestmerger.enabled=true Introduced with Android SDK Tools, Revision 20 (June 2012): https://developer.android.com/studio/releases/sdk-tools Build System     * Added automatic merging of library project manifest files into the including project’s manifest.       Enable this feature with the manifestmerger.enabled property.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)