Writing and Reading to/from text files

Kamac

Active Member
Licensed User
Longtime User
Hi.


Could someone give me straight-forward two examples of writing and reading to/from text files?

1. Write "a" to text file called "text.txt"
2. Read all strings from "text.txt" and store them into array.

@additional 3. After doing 1, how to add another "a" to "text.txt" so it'll contain "a
a"

- basically, extending "text.txt" in more strings.
 

casella

Member
Licensed User
Longtime User
How to view a txt File in emulator

Hi Erel,

I cant view my txt file in emulator.
What I do it wrong?

Example:

Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_VIEW,"file://"& File.DirInternal & "/PT930SA.txt")
intent1.SetType("text/plain")
StartActivity(Intent1)

Thank you.:)
 
Upvote 0

casella

Member
Licensed User
Longtime User
How to run calculator from my B4a app in emulator

Hi,

Somebody can help me?:sign0085:

Well, I try to run the calculator or any other app in emulator from my app who is also in emulator.:(

An example: In my app i put a button, and when I push this button, I need start the calculator or another app.

And the last question

Where are the app and them extention, for example an app in Windows the extention is .exe.
The only app I see their are apk, and I don't want start the package.

Thank you

Best regards
 
Upvote 0

casella

Member
Licensed User
Longtime User
Hi, Erel

I dont know if a good place for my question, and that 's why I haven't answer.:(

I just repeat it.:)

Well, I try to run the calculator or any other app in emulator from my app who is also in emulator.

An example: In my app i put a button, and when I push this button, I need start the calculator or another app.

And the last question

Where are the app and them extention, for example an app in Windows the extention is .exe.
The only app I see their are apk, and I don't want start the package.

Thank you Erel

Best regards
 
Upvote 0
Top