How do I connect a webapp and an android app with firebase? - android

I have been trying to learn how to create an app that allows people to upload images via the web or android.
I know that Android uses content providers to implement a mechanism for the sharing of data between applications. More specifically, Android uses the MediaStore API to make use of this functionality. However, that is limited to other Android devices.
I was wondering how I would go about connecting a web app made using reactjs to an Android app preferably using firebase. However, if it isn't possible in firebase that would be okay too,
I am a beginner in web app development, so I am not particularly sure about how the software's architecture will look like.
I have been struggling to find an updated concise solution online. Can anyone point me in the right direction and if not point me to some resources that will guide me in the right direction.
Thank you!

Attach/configure both of your application to use same database and storage bucket in firebase
As you can see I connected my android application as well as web administration application to same firebase project.
As you can see there is an add app option in firebase console where you can select platform. Register both of your application on same project and thats it.

Related

How can i build native android apps from any website (Not Website convert into apps)

Suppose , i have a website and its running well . Now i want to make an android apps using website information or My apps will contain all the information of that website already contain or how can i connect an android apps with any website.
Some solution :
1. convert website into android apps (i don't need this).
2. JSON API (i think this is best option for me ).
May be there has so many option but this time i can't remember. option is best for me if it is possible . but i don't how to create a JSON API from website .
but i don't know how to do it. please let me know share something for better understand.
or if has any other better solution for this problem please let me know .
You could create a web app, using android native web view or some technologies like ionic, etc..., or create a comprehensive API endpoint in your backend/website and start build an android app from scratch.
creating a web app is a simpler approach but has so many shortcomings in design, functioning and flexibility aspect, so if you want a competitive app with a fine extendibility feature the best option is native android development. but it could be more costly as it needs both backend and android development.
If your website is already implemented and running, you can just create an Application using a https://developer.android.com/reference/android/webkit/WebView. Basically, this is an injected Browser, allowing the user to access your Website without actually open chrome/firefox etc. on the smartphone.
To improve the usability, the layout of your website should be able to dynamically resize the content.
If you wish to actually implement an application (Activities/Fragmets...) you need to connect to your backend server the same way your website is retrieving the information.

How to connect and use google cloud sql for database access?

I know this is a nooby question and I apologise in advance. I'm looking all over but I just can't seem to find any documentation on connecting an Android app built in Android Studio to a Google Cloud SQL Database.
I'm only really doing this to try and find out how it is done because I'm interested in it but I'm very new to Android development. I've connected to a SQL database before from c# but it was only a local one, I've never connected to an online one before and I think the Google Cloud Platform operates a bit differently anyway?
Basically, whenever I try to find documentation for this, it keeps referring back to the Google App Engine, which seems to be a different way to create apps than just writing them in Android Studio (very likely I could be wrong, like I said, I'm very new to Android development).
I've seen that there is documentation for Eclipse with the Google Plugin but can't find anything for Android Studio. Is Android Studio not suited for this type of use?
I've seen that you can create a Google Cloud module for a project in Android Studio but I'm not exactly sure what that entails.
Basically, I would just love a set of very basic steps that I should follow for if I were wanting to write to a Google Cloud SQL DB from an Android app in Android Studio.
Otherwise, any good resources where I could possibly learn more about what I need to do would also be appreciated.
I think my biggest issue currently is that I have exactly 0 backend knowledge and so I'm just not really sure of what is required to set up this connection.
You should not access Cloud SQL directly from your Android (or iOS) or other client because you cannot secure the credentials needed to do so. If you embedded your credentials into your app, someone could extract them and either gain access to your database directly or could cause other trouble for you.
If you are open to other database types and you don't want to explore proxying requests through your own backend, then you should take a look at Cloud Firestore or Firebase Realtime Database. Firebase provides SDKs for Android that allow you to access these securely directly from your app. Firestore will scale better than the Realtime database, but that might not matter for your app.
A similar question and reason for why you shouldn't try to connect directly to Cloud SQL is covered in more depth here.

Creating Photosharing app on Android

I want to develop android application like Photofeed application as mentioned on Google cloud sample link or like Instagram. For that I need App Engine SDK but i am not getting how i will achieve this functionality. In my app, i want exact functionalities (uploading image, like and comment on that photo) like Photofeed app shown on that link. For that I'll have to use Google Cloud Storage but Photofeed is for Webapp and i want to develop Mobile app. For that i also referred Mobile back-end starter but not getting much idea. Its quite confusing. Please guide me to develop this application. Is it possible to use Photofeed sample java classes in my android application?
Thank you.
You will need to install Google Plugin for Eclipse and make Android Connected App Engine Application. This is a good starting point.
You can make similar app or any app that connects to GAE as backend in 4 steps as follows:
Make your entity classes: You can use JPA, JDO or Objectify to access the Data Store or use its API directly as done in the sample NoSQL classes (The easiest way is Objectify IMO). Or you can use Google Cloud SQL as done in the SQL classes of the sample ( I never used that in a project so I do not know if there is another way beside the API).
Make REST Endpoints: You can use Google Cloud Endpoints to make REST API for your own app. This will allow you to develop Android, iOS and JavaScript clients in unified way. If needed you can secure it using OAuth too.
Generate Client Libraries: If you are using Eclipse, Google Plugin will provide that in the context menu of the App Engine project so you simply right click and click Generate Client Libraries. It can be done using command line too.
Consume the endpoints in the Android app: This is done really simple as explained here.
Note : You will need a Servlet to upload photos to Google Cloud Storage. You can make use of the one in the sample.

Android Cloud app building blocks

I am a beginner in Android app making. I want to build a basic Cloud app which can take back up of the user's data and can store it on remote server. I know there are millions of such app, but would like to know some link that I can refer to begin my App building.
I hope I am clear with my question.
I recommend using Google App Engine. You can do all of the coding in eclipse, and once you have it set up properly it's fairly painless to deploy your webapp to the server and start testing your android app.
If you require a true relational database, google app engine makes you pay extra. If you don't however, there is no charge for the standard datastore. Also, app engine is free until you have lots of traffic to/from the server.
You can develop in Java or python. Here is the setup guide for eclipse (Java).

Backend for iOS and Android: what to use as a junior dev?

I'm developing an iOS app and Android app that have to read data from (and maybe write data to) my web app. On the web app the users login, modify a dashboard (their data), and their changes are reflected in the iOS and Android apps. Pretty basic stuff. I just don't know what a good design for me is.
Things I'm considering:
The web app is a client. The web app makes calls to an API I build where
all the user's data is added/modified. Android and iOS apps both
make calls to this API as well.
The web app lets users login and modify the dashboard. As changes are made they are fired off to a BaaS (such as QuickBlox, StackMob, Parse, CloudMine, etc...). The iOS and Android apps make calls to the BaaS.
The web app is everything. User logs into web app, modifies data. Android and iOS both make calls to web app.
Your recommendation...
Considerations:
I'm a junior dev with limited but growing experience. I'm fairly comfortable with Ruby. Java and Objective-C is a WIP.
I want to get this up and running ASAP. Willing to do a V2 the "correct" way once I get customers or funding.
Please advise on architecture. Thank you.
You can use Webview for Android. Read this link:
http://developer.android.com/reference/android/webkit/WebView.html

Categories

Resources