How to update the database in Android Studio? - java

I'm creating an android application that helps prevent violence against women. I'm done creating the login and registration module. Now, I'm using voice recognition as an alarm and if it recognizes the word "help" the silent alarm will be triggered. I'm wondering how can I update the database once the user says "help". I want to store the word "help" in the database if the user says it. And also, I want to store his/her current location through GPS. Any help would be much appreciated. Thank you!

You want to store it in local db (sqlite) or you want to send the information to your server and store it in the database there?

Related

Android Studio Server data transfer

I am developing an app in android studio and I would appreciate some help with it.
The idea is to make the app get data from some type of online server/database/whatever would be the best option. Then after retrieving data from there it would use it to display the data in app and user would be able to interact with data retrieved (aka ordering a product), then the app would send some type of signal that the product has been ordered online and at the end you would be able to see the order from your computer, which will somehow connect to the same online system.
Is there any way to do that and if so I would appreciate some help.

How to create a box for user input and then store it as a variable in Android Studio

I'm totally new to Java and Android Studio. I wanted to know how to create a box dialogue or whatever the correct term is to create a box where the user can type and whatever he writes will be stored under a variable?
Context: I'm creating a home security device. The purpose of the app would be for the user to insert their phone number so they could get SMS notifications on the state of their doors that is monitored by external sensors on a Raspberry Pi. Once I know how to take in user input in Android studio and save it under a variable I can then save it to a file and using Python read from that file and then do whatever I need to with the phone number. Ideally, I understand this would have been done in just Java but learning another language with my novice understanding at this stage is too slow to make this project happen on time, hope you understand and ignore my lack of knowledge in this area.
Thanks ahead!

Use FireBase database with android app only

I am considering using a FireBase database to store app data. What I would like to achieve is to have the data available to my app only.
Is this just a matter of creating a single account for my data and hard-coding the credentials into my app (similar to what I am doing now with my MySQL solution)? Or is there a better way to achieve this?
Looking forward to your input.
EDIT:
Let me just explain what I would like to do. I am developing a level based game. A players score is dependent on how fast he/she completes a level, compared to all other players. What I want is the following: I want to store the level data in a SQLite database on the device and to update this from a FireBase database. I do not want users to create an account. So, basically, I want my FireBase database to "act" more or less like my SQLite database: no login needed and only accessible to my app. Hope this makes sense.

How do I know if a user has my app installed and opened?

I wish to promote my app. If a user downloads an app, I would like to know if this is downloaded and opened.
How would you go around doing this?
The question is: how would I know if the user does install my app and open it?
I assume that the key part of "downloaded and opened" is the "and opened" part, correct?
You could just have your activity check some database value (for example) to see if this is the first time that the user opened the app. If so, you could just call a Web Service.
You could actually do that to keep usage statistics in general; you'd probably want to have some kind of explicit opt-in from the user first, though.
Android also has a package for capturing usage statistics.

Android how to let users interact with each other

Been doing basic Android development for awhile now. Ready to implement some ideas previously I was to unsure to touch on.
If this question has already been asked please feel free to direct me there as I can not find a thread.
Lets say based on user interaction some data is collected and entered to either a text or XML file. How can I enable this user to send this data thats been collected to another Android user using the same app? Are there any APIs out there capable of transferring data between users?
In a simple example, Facebook Messaging. One message is created by a user and sent to another user. How can I get on the right path to this?
Thank you!

Categories