I have a appData.db file which I collected form .apk file.
Now when I open this file into 'DB Browser for SQLite', some fields are not showing properly. It contains bangle text.
This field working good
This field is not working, this is actually bangla text
Related
I have a problem when executing select query in android with sqlite database. In database there is a field based on sinhala characters. I populate the database using DB browser in UTF-8 encoding. I used SQLiteAssetHelper to access database in assets folder. when i try to use select query and display in android textview the data in field based on sinhala outputs strange characters like විද්â€.
I try to change the font in textview and try to change the encoding by using System.setProperty( sinhala_word,"UTF-8" ).
As example when try to set word
රහිත
in android text view it shows like
රහිà¶
this is how my database looks like:
This is how text appears in text view:
I'm developing a strategy game that will have a country full of kingdoms. I want to be able to store and read back in the information of the kingdomgs. I've looked at tutorials online but they just aren't specific to what I'm looking for. So basically:
-Where to store a text file which holds string values.
-The correct file path.
-And how to read from that text file, and check if it is empty.
You can store text data in string resource file:
https://developer.android.com/guide/topics/resources/string-resource.html
Also you can use asset to store text
https://developer.android.com/reference/android/content/res/AssetManager.html
And there is diffrenece:
Difference between /res and /assets directories
I am making a note application and want the user to be able to edit in rich text.
The user writes the note, then it gets converted into html and saved into a database.
This way when it is retrieved from the database, it does not lose its rich text.
Yet I am having a problem, if the user adds a color to their text and saves the note it converts it to html like this
"<p><font color=#0000ff>user text</font></p>"
when retrieved from the database no text color shows up. this is because android saves the html wrong. In order for android to get color from html the letters need to be capitalized like this
"<p><font color=#0000FF>user text</font></p>"
This confuses me because if android can only read it in caos why doesn't it convert it in that way.
How do I get it so when this code runs
//--save to string--//
Editable e = noteContent.getText();
String s2 = Html.toHtml(e);
Spanned s3 = Html.fromHtml(s2);
classes.setText(s3);
to save the text color to the caps. so when it is retrieved form the database the text color shows up.
Thanks,
Jordan
Make sure your RGB value is CAPITALIZED.
Try to use:
Html.fromHtml("<![CDATA[<font color='#145A14'>text</font>]]>");
Hope this help!
Having done some basic tutorials, I started making my first real android app in eclipse. I want this app to check if the text in an EditText matches the text on a PDFpage (this one: http://www.augustinianum.eu/roosterwijzigingen/14062012.pdf (it contains my school's schedule changes)). I've found out how to make the app check if the text in the EditText matches a string (with the method contains()), so now the only thing I need to do is to download all of the text of that PDFpage to a string. But I have no idea how to. Or is there maybe a method which I can check with if a PDFpage contains a certain word without downloading the entire website to a string?
Thank You!
A PDF is not a text-file, it is a binary file. Therefore you should not download the data into a string but into a byte array. Then you must extract the text data from the PDF using some PDF library. In that text you then can search your keyword.
The most interesting part will be to extract the text from the PDF. You may look around this site for other questions which tried the same. Here is a quick search or this.
A WebView loads HTML page from the /assets dir. When a user enters some data into a text field in that HTML file, can my WebView catch/save that data once a user preses some button or link?
Also, when a user returns to that page, can I fill the text field with the data he previously entered?
I am trying to create a way to save temporary data between HTML pages in /assets dir.