thanks to all for reply.
First of all I imported "kawa-2.0.jar" and from the source of App Inventor: ArrayIndexOutOfBoundsError.java, IllegalArgumentError.java, JsonUtil.java, Lists.java, RuntimeError.java, UninitializedInstanceError.java, YailConstants.java, YailList.java, YailNumberToString.java, YailRuntimeError.java.
Then I modified the TinyDB.java from the git in this part:
public TinyDB(Context appContext) {
//Before it was preferences = PreferenceManager.getDefaultSharedPreferences(appContext); //In this way with "TinyDB1" the place where tags are saved is the same with the one used in App Inventor
preferences=appContext.getApplicationContext().getSharedPreferences("TinyDB1", Context.MODE_PRIVATE);
}
and I paste in this TinyDB.java this code:
public Object GetValue(final String tag, final Object valueIfTagNotThere) {
try {
String value = preferences.getString(tag, "");
// If there's no entry with tag as a key then return the empty string.
// was return (value.length() == 0) ? "" : JsonUtil.getObjectFromJson(value);
return (value.length() == 0) ? valueIfTagNotThere : JsonUtil.getObjectFromJson(value);
} catch (JSONException e) {
throw new YailRuntimeError("Value failed to convert from JSON.", "JSON Creation Error.");
}
}
Then in my app I did:
//Initialize the variables
List<String> listone;
List<String> listtwo;
List<Double> listthree;
Object save;
//Get the saves
tinydb=new TinyDB(this);
save = tinydb.GetValue("actualSavefiles","");//Create now the ArrayList containing the savefiles
ArrayList al1 = (ArrayList) save;
//Put your App Inventor saves in your variables
listone=(ArrayList)al1.get(0);
listtwo=(ArrayList)al1.get(1);
listthree=(ArrayList) al1.get(2);
Hope that this could be useful to someone
thanks for the inputs;)