How to create message and save it in Android? - 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

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.

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.

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

Related

group chat in flutter using firebase with a twist

Disclaimer: I have never worked with firebase or any other DB so my idea is pretty rough and I will be glad if u correct me in some of my assumptions. Also this is my first question on StackOverflow so I hope it will be detailed enough.
I am currently working on my project which is basically a group chat in flutter using firebase, where I should be able to create a new group chat(create a new DB in firestore) trough the app, let other ppl join(assign them to the new group chat DB).
The twist: If I send a message to the group chat I want other ppl to see a pop-up saying: "do you accept this message", no=> doesn't show / yes=> Shows the message but deletes it for others.
This app is nothing but my idea of how to confirm my theory and also learn a little bit more about both flutter and firebase, so please do not mind if it's useful or not.
Assumption: Each groupchat has it's own DB (Can I create a DB in firestore trough app / send request to?)
Question: Can I assign a specific ID to each message and choose and further edit who is going to be able to see the message trough the app(app_instance_1"I accepted the message so only I and sender can see it")?
Here's a great article for making a Flutter chat app: https://medium.com/flutter-community/building-chat-app-in-flutter-with-firebase-888b6222fe20. If you need more detail or help just write a comment.
About your assumption. Each app usually is connected to one database, and within the database, you can have separate documents to hold each group chat. You can also set up documents for each individual user to save the chats that only they can see. Within documents, you add collections that hold your data.

Android transfer object data through different device, same app

I want to implement a feature in an app where users can add friends and check and compare each other stats from the java objects created, which involves a few subclasses.
I was wondering if anyone know what the best way to approach this would be?
The only thing that pops out is using Firebase. Where the user would click a button to upload the data to Firebase with a UUID link, and then give the UUID to the other user, where he/she would have to manually type the UUID in a textfield, and it gets the data from Firebase.
Would method be viable and is there any other better options?
Thanks
I would probably create a file (you can invent any ending) with all info you need displayed in json. That file can be shared via Whatsapp or what ever and imported in your app?
But I don't know what "stats" that are that the users can compare but I think they will change from time to time? So I would guess an online service would be better because otherwise to update, they have to share again and again?

Android: how to integrate a 'report abuse' mechanism in my app.?

I'm currently working on my first serious app., and I would like to have some sort of contol on the data that users can enter.
Specifically, my app. allows users to write some text content (imagine something like a 'tweet'), and upload pictures.
I would like to prevent them from writing inappropriate text, and uploading offensive pictures for instance.
What I thought of doing, is to allow something like 'report abuse' button, where users who find some content offesive, can press - in which case relevent data will be saved, and later checked, to decide if indeed an inappropriate usage happened (maybe by some sort of server-side code).
As I said, I'm a beginner in android development, and I would really love to hear your suggestions and guiding. Perhaps it is something over my league for now? Maybe you know of such thing that already exists?
My app. uses Parse.com as its DB.
I would really appriciate your help.
Thank you.
I'm developing as well an app with parse and I also had to integrate in it a report button for the user.
The way I did it is simple:
In every Pf User object, I created a field of type counter named "reportCounter" while in the PFObject created by the user (it can be a string, a picture, etc.)I created a boolean field named "isReported". When a user find some inappropriate content he can report it through the dedicated button. The PFObject relative to that content gets its isReported field changed to YES and a parse background job checks every day for all the PFObjects, incrementing the reportCounter field of the owner-creator of the content and sending a report e-mail to the administrator. In this way you can keep also a record to see if a particular user is behaving badly. Just take a look at the Parse documentation about background-jobs. It's pretty good.
I hope this will help.

what kind of database solution suits my mobile apps

I am looking into options how to realize the following use case. A iOS/Android user is using my app which gets its table view data populated by a cloud database solution. The user must be able to send back information (e.g. name + date) which needs to be send back to the database and gets stored there in a/different table/s. Moreover, I would need the db-solution to run automated reports based on the information sent back by the users (e.g. in an excel file).
So far I only found ragic.com might suit my needs. But what other options are out there, which might not be as fancy looking but will get the job done. Thanks guys!
A WebService is considered best practice regarding these matters. Have a look at this guys tutorial:
http://android.programmerguru.com/android-webservice-example/

How to access the SMS storage on Android?

Beginner Android dev here.
I'm trying to create an app that will read the SMS messages stored on the device and then give the user statistics about their habits (like who they message often, common words, etc).
But to my knowledge, there doesn't seem to be a way to do this. I've looked around on forums and the most anyone talks about is accessing the inbox where you can find messages the user hasn't read. How then can the default app and third-party (Handcent for example) display the same texts? They don't keep their own database because Handcent will display all texts upon fresh install.
tl;dr: How do I read SMS messages on an Android devices, specifically messages that have been read before.
For a concrete example of accessing the SMS/MMS database, take a look at gTalkSMS.
You are going to need to call the SmsManager class. You are probably going to need to use the STATUS_ON_ICC_READ constant and maybe put what you get there into your apps local db so that you can keep track of what you have already read vs the new stuff for your app to parse through.
BUT bear in mind that you have to declare the use of the class in your manifest, so users will see that you have access to their SMS called out in the permissions dialogue they get when they install. Seeing SMS access is unusual and could put some users off. Good luck.
Here is the link that goes into depth on the Sms Manager
Do the following, download SQLLite Database Browser from here:
Locate your db. file in your phone.
Then, as soon you install the program go to: "Browse Data", you will see all the SMS there!!
You can actually export the data to an excel file or SQL.

Categories

Resources