Smith
Smith

Reputation: 423

How to create message and save it in Android?

i am trying to develop a simple application. i want to create a simple message and want to save it. now, i want to select message from list of messages which i have created and stored. can any one please suggest me or give an idea for developing the same.

Thanks in Advance

Upvotes: 1

Views: 356

Answers (3)

Aman Aalam
Aman Aalam

Reputation: 11251

I feel you should go like this:

  • Have your application store Contacts in a database (I guess you're already doing this)
  • Have your application store messages in another database (I guess you're already doing this too)
  • In the UI, display all the messages inside a ListView, by querying them from your message database.
  • When user clicks on any message, have another screen that loads this message in full, and lets the user select the recipients
  • Send the text message to the selected recipients now

I just wanted to point out the flow of the app, since the storage and retrieval process os pretty straight forward. I am not sure if this was what you were looking for.

Do let me know.

Upvotes: 0

Nanne
Nanne

Reputation: 64399

If you substitute the word "message" for "note", you are describing something really similar to the notepad example.

It runs you step by step trough the code you need to make an application that has notes (messages) you can add, and open.

If you are new to Android development you should go trough all the excersises, because it's a really good help, but if you're not you can just download the sollution and use that.

Upvotes: 1

Yekmer Simsek
Yekmer Simsek

Reputation: 4102

If you will store little amount of data you can use sharedpreferences

http://developer.android.com/reference/android/content/SharedPreferences.html

If you want a real solution that is sqlite database that comes with android.

http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

Upvotes: 0

Related Questions