Folder Encrypter [FREE/PRO]

Folder Encrypter allows you to password-protect all your folders and to make them invisible in Android Gallery.
It hashes directory names and hide them from your File Manager.
Easy, secure and fast! 😉 Try it out.

Simple and clean interface!

FEATURES:
• Protect your folders
• Hide Media Files from Gallery
• Hash directory name
• Clean Interface
• Simply hold a folder to unlock
• Priority Updates

Rate us!

Free Version: https://play.google.com/store/apps/details?id=com.ingamedeo.folderencrypterfree

PRO Version also available on Play Store 😉

Enjoy!

Save Array List in shared preferences Android

Get the Arraylist:

String serialized = sharedPrefs.getString(“NAME”, “”);
//Changing this one to linkedlist should solve the java.lang.UnsupportedOperationException problem
myList =  new LinkedList(Arrays.asList(TextUtils.split(serialized,”,”)));

Save the Arraylist:

SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putString(“locked”, TextUtils.join(“,”, myList));
editor.commit();

How to store a List in SharedPreferences using Gson

First of all you have to download Gson library from here: https://code.google.com/p/google-gson/downloads/list

And then install it in your IDE..For Android Studio you can follow this article.. http://www.amedeobaragiola.me/blog/2013/09/02/how-to-import-jar-in-android-studio/

Then: (from stackoverflow)

I found the easiest solution to store and retrieve a list of items from SharedPreferences is to simply serialize / deserilaize the array into / from JSON and store it into a string setting.

Gson comes really handy doing it.

READ:

SharedPreferences prefs = context.getSharedPreferences(“settings”, Context.MODE_PRIVATE);
String value = prefs.getString(“list”, null);
GsonBuilder gsonb = new GsonBuilder();
Gson gson = gsonb.create();
MyObject[] list = gson.fromJson(value, MyObject[].class);

WRITE:

String value = gson.toJson(list);
SharedPreferences prefs = context.getSharedPreferences(“settings”, Context.MODE_PRIVATE);
Editor e = prefs.edit();
e.putString(“list”, value);
e.commit();

How to import Jar in Android Studio

Answer from stackoverflow..it worked for me 😉


So,
Steps to follow in order to import a JAR sucesfully to your project using Android Studio 0.1.1:

  • Download the library.jar file and copy it to your /libs/ folder inside your application project.
  • Open the build.gradle file and edit your dependencies to include the new .jar file:

compile files('libs/android-support-v4.jar', 'libs/GoogleAdMobAdsSdk-6.4.1.jar')

  • File -> Close Project
  • Open a command prompt on your project’s root location, i.e'C:UsersUsernameAndroidStudioProjectsMyApplicationProject'
  • On the command prompt, type gradlew clean, wait till it’s done.
  • Reopen your application project in Android Studio.
  • Test run your application and it should work succesfully.