Resources for developing Android apps with databases - java

I'm looking for some resources on developing Android apps with a connected remote database safely and securely. The idea is to have users log in to a personal profile which can be populated with text data, files and images. The app will also have geolocation, text/video chat and some other features but first things first.
I was reading it is bad practice to connect to a remote database, say MySQL, through an app directly and that something called REST API is the preferred and safe method of communication. Are there any good guides/examples on how to connect to to a remote DB in this fashion? Tips?
I have have some school experience in Java but I'm new to Android development.
Thank you!

Have you tried Google's Firebase?
You can learn more here:
https://firebase.google.com

Related

MongoDB with Android Studio

ALL questions I saw here is too old for understanding so I'm asking a new one.
Im building a social media app that stores data, and will ,at the end, send notification even when the app is offline.
Is MongoDB is a good choice to use with Android Studio to my project ?
I understood that I need first to connect it to Realm and by Realm I use MongoDB.
Do you think its a good DB to use with Android? if it is, do you have any good guides for it?
If not, is there any other DB to use that is easy to learn\use?
PS
I dont want to use Firebase, because of its pricing.
Thank you .
MongoDB is also available for android
The only problem is that it does not have well-structured documentation for android..
I recently managed to connect my android application to the remote database
here is a sample unit application
https://github.com/i-sachinkumar/MongoDB-for-Android
Its readme file contains all the steps to be followed in the back-end as well as in the android studio
Enjoy

How does a website and android app connects?

I am new in android development and i have been developing android apps using cloud firebase but how can i make an app for a website which is not using firebase. I know i need to connect to its database but what if the website is hosted on wordpress.com which does not provide phpmyadmin. So is there any other way? I know there is something called rest api. Can we use rest api in websites that are developed in some framework like codeignitor? Please explain what rest api is and is there any other way to get the data for our app? Please let me know thank you.
This is going to be tough. Usually, an application communicate with a web service. A web service may be a Rest API, Firebase or any hosted service that can provide data (I don't know all of the subtilities of it).
Explaining to you how all of this works wouldn't work here as it will be objective as every application have different needs and every developper have preferences on how he want his application to communicate with the world.
One thing you should avoid at all costs would be to access an online database directly from your application as it is a huge security flaw.
Here are some links that will help you understand better all of this.
REST API concepts and examples
Make an HTTP request with Android
Web services explained
I am well aware that stackoverflow answer shouldn't be mainly links but I still thinks that they will be relevant to your problem. Be aware that this answer doesn't even cover a little part of communication between an application an a webservice. You'll have to learn that by yourself, using courses and tutorials.

Meteor Mongo and Android App Sharing DB

I am trying to create a meteor project that allows android apps to access its DB.
We have understanding of Meteor (me) and Java android development (friend).
Could anyone experienced in this field give a simple guideline on which keywords to search, or give a brief guideline of how to approach this.
I was thinking of creating a meteor server, then somehow allowing the android app to access MongoDB.
I am pretty experienced with simply making a web app with Meteor and Meteor mongo, but I have no experience opening the database to external apps.
Meteor uses the DDP protocol. So you can build your backend with Meteor, and then connect to it with any app (native Android app for example) through the DDP protocol by using a library for Java. A list of DDP libraries is maintained here. You should be able to find something for Android.

Better way to develop a remote database driven android app?

i have a wordpress blog hosted over my personal shared hosting.Now i want to develop an android app for that blog so the users can use the mobile app to see what i am writing on my blog.
Like for example you can take mashable.com android app.
so basically i have experience in programming android aap but i am just asking this so i can code it in a better way.
i have 3 idea to do this now:
1.Use rss feed of my blog and parse it and display the contents but it has a issue that rss only display most latest contents.So whether i need to store the feed contents timely on android device so a user can view the previous most content also.
But i think it's not a good idea because it will unnecessarily increase the size of database and make diff copies on every device.
2.Just simply use complete java code to pull data from my web mysql database as per the user request and just display it over the screen without storing it locally on android device.
3.Develop some sort of API solution on my web server then send the data in json or xml format so i can use it on my android device(via java) without bothering to connecting to mysql server as a core part because that part already done by on web server and my api already sending data in required format.
So these are 3 idea i have now.So please suggest me a better one form these three or you can give any other idea.
I am asking this question because previously i never programmed this sort of mobile aap where i need to pull the data from remote server.
-Thanks
You can simply install WordPress Mobile Pack to display Mobile site of your wordpress blog/site
Or
You can check this link to find out other plugins: 11 Ways to Create a Mobile Friendly WordPress Site
Now, If you want to create an app then you can simply implement it by using WebView.

Which database in Java Android?

I am developing an app in Android. I would like to attach a database (created in C++) to my app Android that my Android app could read. In which format should I create this database with my C++ program?
Android provides a built in SQLite database, which is used by the applications developed for it. The Android SDK provides a well-defined, easy-to-use API to this database, and as long as you don't have a real special need for your own database, I would suggest using it.
You might want to have a look at sqlite (www.sqlite.org/).
sqlite - http://developer.android.com/guide/topics/data/data-storage.html
SqlLite is the built-in database. Portable across Android, iPhone, HTML5 and just about every embedded system.
I take it that your question is how to create a database on a host computer (using C++) and transfer it to the Android App. If so, then have your C++ program create a SqlLite database on your host computer and then either package the database with the app, or download it into the App's data folder from a server.
http://realm.io "Realm is a mobile database: a replacement for SQLite & Core Data
Realm can save you thousands of lines of code & weeks of work,
and lets you craft amazing new user experiences."
For C++ program you can use C/C++ Interface For SQLite. Check out the tutorial An Introduction To The SQLite C/C++ Interface.

Categories

Resources