Clear the App Data Programmatically in Android Application data has been created due to use shared preference data, databases and network caches data. This data has been manually clear on Settings -- > Apps (or) Application Manager --> Select the app you want to clear the data. --> Then click button clear data to erase the app from the Phone and SDCARD. Applications like facebook, google+, gmail and some games captures more data on phone and SDCARD. Once you clear the data of your app, all passwords and saved settings in app has been lost. So carefull to use this method. Create the Class MyApplication public class MyApplication extends Application { private static MyApplication instance; @Override public void onCreate() { super.onCreate(); instance = this; } public static MyApplication getInstance(){ return instance; } public void clearApplicationData() { File cache = getCacheDir(...
Hi friends, have a great day. In android development, initially most of developers are learn on eclipse, then android studio came with a lot of features. Most of developers hate because of GRADLE. In eclipse, we using maven. But gradle is completely different. Take a long time for making a build. Please don't take seriously, if you have enough RAM, Internet and good speed of processor. :) I give some suggestion to perform the faster gradle build. 1. Append the following lines in gradle.properties in your app. # The Gradle daemon aims to improve the startup and execution time of Gradle. # When set to true the Gradle daemon is to run the build. # org.gradle.daemon=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. # org.gradle.parallel=true # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10...
Hi friends, have a great day. Now I'm going to explain the what is proguard and it's usage in android. Believe android is big sea, there is lot of things. What is Proguard? Proguard is a simple java tools to shrink apk, prevent re-engineering from hackers. It's a reduce the size of android apps and run faster. Proguard renames the classes, methods and objects to prevent the re-engineering the APK. Now hackers easily to hack your code and run for their uses. Proguard stops them and protect your code. In android project, proguard located in apps folder. proguard-rules.pro To enable the code shrinking, just add simple line in gradle. It's under buildTypes{ release{ minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } Please follow the below lines, that's very important to make it. -dontusemixedcaseclassnames #Specifies not to generate mixed-case c...
Comments