How can I make a Login activity to connect firebase?
I want to make an app that could login to firebase database project.
I want that someone that have project in firebase could connect his project. That why the login activity need to be dynamic and changeable, that anyone could login to his account without connecting the app to just one project.
For example - I built a desktop application in C# (on visual studio WinForm with FireSharp package), that has a login form to an exist real-time database project using the BasePath (the link of the ptoject), and the Secret in the setting.
Is this possible to do something like that on Android Studio?
Related
i'm new to android studio, and i dont know much about it. My question here is do android provide any authentication method like aspx / php (laravel) that check if a user stay logged in and etc.
From what i learnt so far, i have to sign in to my app by receiving json/xml data from my web service, so my app just display the next screen after the id/password is correct? Is there any more security issue that i need to worried about? Aspx authentication do authenticate on every page even after your first login. But after some research i dont see android studio have this kind of authentication. Am i missing something?
You can use Firebase Authentication for sign-in methods and user management.
You can add Firebase to Android Studio in Tools > Firebase.
No there is no default function in android that does what you want, you have to add a new sdk to handle this issue. You Can Use Firebase as Aviad Nemet said. Or you save in the shared preferences that you user is authenticated after login success. Saving in the Shared Preferences is safe.
I have an android project which is connected to a firebase database, is there any way that I can unlink my project from current database and connect my app to a new firebase database?
If you meant to link your android project to a different firebase project, then of course you can.
At the android side the "connection" is merely a json file stored at
yourProject/app/google-services.json.
You can simply replace it with another file that you may download from the settings page of your new firebase project.
I have wrote a simple web application with few tables. It has it's administration area where you can manage it's table. Basic CRUD operations.
However, I need to develop an Android application which will retrieve information from this web application trough API. So I am going to write a simple API methods for fetching data. Also there will be sometimes when Android user will save some of its data to database.
Android application needs to be able to list items stored in database and bookmark some of those items over HTTP.
To me problem is how to implement SingIn / SignOut operations using Android's Google account. For example, application GMail is always signed in (at least on my device) and I want my application to be always signed in.
Then, how can I manage what items user bookmarked? Should I create a table android_bookmarked_items (android_user_id, item_id)? But then what should be android_user_id? Do I need to use OAuth?
I am doing this kind off sign in for the first time and I am really confused how to connect this web application with android user and manage bookmarked items per user...
You can make use of Android AccountManager. Check out How to get the Android device's primary e-mail address
I think i have found solution by using Google Sign-In for Android. I get idToken for currently login user before each POST request and verify it on server side. Also from the token I get property sub which is user id and store this in my database...
Auth with a backend server
However, I am pretty new to this stuff, tokens and authentication using google, I would like for someone more experinced to confirm that my solution is fine and secure...
I am trying to add information to the Parse.com class, Registration Class in Parse.com, from an android app. The information needs to be linked with the specific user which is logged in on the app.
Here is the Android App Registration Page.
Thanks in advanced.
P.S. I am able to register a user using the android app.
I'm working at my first app and I want to login to a php website, but want to use the Login Activity of Android Studio. My design looks perfect but I don't know how I can access my Database. So how can I compare the email entered from the user and the email saved in the databse?...same for the password.
Thanks a lot for helping me
Your app doesn't know your webpage's database. You need to do add some backend API to your website (via REST, SOAP, HTTP or whatever) so that the app can query for users with given name/password and make that api call from the app. I strongly recommend using encryption.