Can one send data fom firebase database to email? - java

I have a firebase realtime database that stores information about voters for my android app. Is it possible to send the details of this database eg (vote results) to registered voters? Im using email/password sign-in option.
Thanks already.

You can do it in several ways, it depends on your architecture, Firebase Firestore won't automatically send any emails, but you can use Could Functions to execute code when you change a document on the database, then use the Cloud Function to send the emails.

Related

Android connection with other phone

I want to create a simple social app. On this app, users can communicate via the internet. It will be a simple connection - notification sends from one to other users. (ex. user A sends a notification to user B. User B see a notification from user B).
How the best achieve this communication? Is Google Cloud Messaging is the best solution? How can I calculate costs?
You should consider using the Firebase tools. With the details you provide, you will probably want to use a combination of Firebase Realtime Database + Firebase Cloud Messaging + Firebase Cloud Functions.
You choose a path on the Realtime Database to be the place where you write data. For instance, write messages to users/:user_id/messages. Then attach a trigger to this path with Cloud Functions, so every time something is written to this path you can fire a notification to the the other user with Cloud Messaging.
Reference:
Cloud Messaging
Realtime Database
Cloud Functions
Check out Firebase Cloud Messaging .

How to connect android users to my database / web application?

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...

update database of an app from another app in android

I need to update and insert rows in Sqlite from another app. I am working on an android app and I have to update database of another app,how can I do that,is it possible to access and edit another app's database from my app.
You should look at Content Providers. From the android official docs
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process.
Android Docs explain how you can use it.
I understand what you are trying to achieve. correct me if i am wrong. You are developing android application in which you are trying to update your application database by fetching data from some different database. right? if yes, you have to get details of the database server /database connection details from the database owner if possible. in case if the owner of the database is not providing or not ready to give you credentials/database connection details then confirm whether they have any services/webAPI/web services through which they expose database data.
If they have webapi/webservices available then you can easily consume in your andriod application and do what ever operation you want to perform.
Hope this helps..

How to create an Android App form and save data to a data base on a server?

I am looking for some tutorials and guidelines on how to save information entered into a form containing text fields to a data base on the server.
On a second level, I would like to be able to send notifications to the application on the phone based on information stored in the data base.
Thanks...
It is advisable to store data locally in sqlite in the device and send it to the server probably through a webservice, or directly connect to SQL Server using asynctask. Google more about these.
Notifications, again webservices or c2dm will help

Android Login and store cookies to manipulate database

I am new to Android so apolpgies if I am not clear
I am developing an android application that manipulates a mysql database (phpmyadmin). It has registration and login classes that send the inputs of the textboxes to my JSONPARSER.java class which identifies them as POST methods and sends them to an API on my server which in turn queries the database. This part works, However I want to have it so that when a user is logged in they can add to the database but i need to identify which user is querying the database?
How to I accomplish this?
Thanks

Categories

Resources