How to Enable Android Download Manager

Please edit my answer if is not valid Check if download manager is available: int state = this.getPackageManager().getApplicationEnabledSetting(“com.android.providers.downloads”); if(state==PackageManager.COMPONENT_ENABLED_STATE_DISABLED|| state==PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER ||state==PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED){ // Cannot download using download manager } else { request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName); request.setDescription(fileName); manager.enqueue(request); } And the solution for trying to enable download manager is: packageName = “com.android.providers.downloads” try { //Open the specific App Info … Read more

How to update Gradle dependencies to their latest version

This is all I’ve been able to come up with. I will happily accept another answer if there is a less manual method of doing this. In Android studio I replace every dependency version with a plus example: compile ‘namespace:package1:+’ Sync or build the project which will cause all the dependencies to be resolved to … Read more

How to get information of an APK file in the file system (not just installed ones) without using File or file-path?

OK I think I found a way using the Android framework (someone on reddit gave me this solution), to use file-path and use it, but it’s not perfect at all. Some notes: Not as direct as before. Good thing is that it might also be possible to handle even files that are outside of the … Read more

Android hide/unhide app icon programmatically

Hide app’s icon using below code: PackageManager p = getPackageManager(); ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); // activity which is first time open in manifiest file which is declare as <category android:name=”android.intent.category.LAUNCHER” /> p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); Here is how to bring back the app’s icon. PackageManager p = getPackageManager(); ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); p.setComponentEnabledSetting(componentName, … Read more

Fully change package name including company domain

current package : com.company.name New package : com.mycomapny.name Steps: 1) Suppose you are at this screen which is shown below. 2) Open project pane and click on settings icon. 3) Deselect Compact Empty Middle Packages. 4) Then your package is now broken into individual parts as shown below . 5) right click on “company” select … Read more

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