What about doing a Google search?
Taifun
What about doing a Google search?
Taifun
any other simple way to store and get Java Array into TinyDB.
i think sharedPreference are just working like programatically text editor.
How to write this code in extension.
WE CAN EASILY DO IN BLOCKS.
tinyDb.getDataValue(myTag,YailList.makeEmptyList())
But Its Not Working in Extension.
@SimpleFunction(description = "Get Tag Value as and Empty YailList")
public void getTinyList(String myTag) {
ArrayList<String> Ins = new ArrayList<>();
Ins = getArr(tinyDb.getDataValue(myTag,YailList.makeEmptyList()));
Ins.add("One");
Ins.add("Two");
tinyDb.StoreValue(myTag,YailList.makeList(Ins));
}
public ArrayList<String> getArr(YailList values) {
ArrayList<String> Strl = new ArrayList<>();
for (String val : values.toStringArray()) {
// parsed String
String d = String.valueOf(val);
Strl.add(d);
}
// and now you have the double list
return Strl;
}
Following Line Producing Error
Ins = getArr(tinyDb.getDataValue(Tabs,YailList.makeEmptyList()));
^
Any Solution ?
This happens when you grow with copy-pasting. It is not a bad practice, but at least try to understand what code says before proceeding.
You should check Tiny DB source.
GetValue
method accepts two parameters: key and default value
getDataValue
accepts just one parameter: key
Thanks to Reply . . .
You are right another reason of this problem bunks in practical in engineering collage. and also copy pasting in practical exam. Thanks to Support Back Bencher !
Can we use System.out.println("App Inventor \n"); while Writing Extension ? for Live Testing Purpose.
It won't work. That is not an android java function.
What about using logcat?
Log.d(LOG_TAG, "hello world");
Taifun
Log.d(LOG_TAG, "hello world");
this will displayed on any terminal ?
terminal ~ hello world
Taifun
Yes, you can use it.
To get logs for specific tag, run this command:
adb logcat -s TagName
adb logcat -s System.out
System.err
, System.out
Since when? Someone needs to explain this to me.
Give it a try, you will understand.
It doesn't compile for me It never worked.
Currently I am Using .
@SimpleFunction(description = "TesterMethod")
public String tesTing(String txt) {
testingTxt = testingTxt + "\n" + txt;
return testingTxt;
}
This will Work While Runtime .
I am Using Linux Mint OS.
Sometimes I don't see Log.d()
output in logcat so I always use it in conjugation with System.out
.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.