Creating different user profiles [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am creating a game app where you need the ability to be able to create profiles for other players and store them on your phone. I have been looking around for help, but I can't seem to find any tutorial or help for this. Does anyone know which aspect of java I need to research and learn about? I have seen that it might be to do with App-specific files but I'm not sure if that is the right thing.

You can store user information in files (XML / JSON format). You can use the database too - Android supports SQLite (SQLlite database is stored as single file). Android creates files in private folder, other applications cannot access them.
More informations about files:
https://developer.android.com/training/data-storage
Example of usage of SQLite:
https://developer.android.com/training/data-storage/sqlite
Remember not to store user sensitive data in plaintext.

Related

How to save changes in java? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm new to java and I'm recently working on a project which allows you to deposit, withdraw and create new accounts. I want to know if I can somehow save the changes after rerunning the code, for example, the change of users. I've tried several ways on the internet and they didn't seem to work.
There are a variety of ways to accomplish this. For a new programmer, I'd suggest learning how to read and write from files to start.
A simple database system is also an option, but probably more complicated than what you're looking for. This also can't be covered in one tutorial. If you're interested, you should probably do your own research and find something that works for you.
What you need is a database system.
In short, the database will store the data. Your program reads and displays that data. The user modifies it, and pass it to your program to "save" the data (which is replaced the old data with new ones in the database)

Upload/Download text files in Java? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently trying to code a fairly simple program in Java to keep a database on a small library at my university. I'd like for multiple computers to be able to use this program using a shared database stored in a text file that would be downloaded when the program is run, and uploaded once the user is finished using the program and making any edits to the database. I don't know how to go about this at all and would be very grateful for any pointers on a direction to take.
In order to connect to other computers in Java, you should use Sockets, and define your own Protocol (Basically, your protocol would consist on a handshake, and some way on asking the other part of the connection to send the text's data). Anyways, I'd recommend you using a simple SQLite database
To read and save files (txt is a raw text file without any special format), check this
If you'd like the program to display the text, you should learn a bit about Java Swing
Also, try looking a bit in google before asking here

Storing data from android app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on an app the required data to be saved each time the user enters in some information. The information needs to be saved and then accessed again when the users returns to the app. My question is what is the best way to store this information. I have used text files in the past on regular java programs to store and retrieve data but I'm wondering if this would be the best solution for an android app. Any help is greatly appreciated.
You can use SQLite database to store data.
http://hmkcode.com/android-simple-sqlite-database-tutorial/
http://www.tutorialspoint.com/android/android_sqlite_database.htm
or use SharedPreferences
There are many different ways of storing data depending on what you are doing.
But SharedPreferences should probably suffice for what you need.
http://developer.android.com/reference/android/content/SharedPreferences.html

Building a database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am attempting to build a database that will allow a user to upload their music to be accessed by someone else/third party. How would I create it so that the music can be uploaded to a database but providing a path for it to be accessed from where it is stored?
As in A Band upload “Song” and it is then streamed by A Fan.
If it can't upload to a database I need to upload it to a server.
We are building the back end in Java and the front end in HTML.
We are also using Glassfish and Netbeans for writing the code.
You can store files in a BLOB field in a database for example. Another possibility would be to store them directly on the file system, but it has its problems (such as the lack of metadata).
Then you'll need to figure how you want to map each file, for example http://myserver.com/Artist/Album/Songname or http://myserver.com/listen?uniqueid=743.
File upload servlets are available all over the web, so that shouldn't be a problem. The rest is up to your programming skills (this might be too big of a project for you).
Then you'll just need to connect those things together, and that's the part where you start to program (or hit the Google hard).

how do i get save, edit, delete, and search ,MIDLET application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am a student. I need to make a application. I have built the GUI. Now I need to know how to do it?
I have heard about sql server compact, but does it work together with j2me? If not, something to solve the problem?
It will be better if you can pass me a example. If you couldn't, not worry, I just to need to know a database program for mobile (with j2me).
Could it be possible without use a database program? For example, using a text file? Or any other storage mechanism.
Appreciate any help.
In j2me you can use RMS. But you can't handle with large data. Some Third party database's also available for j2me development. You can use that API's. Also refer this existing discussion on same in this forum. And look at database connection using j2me article.

Categories

Resources