Send Email from android Using Firebase - android

Can we send emails within android using firebase , i have tried several libraries like GmailBackground,BackgroundMail, custom method of Javax to send mail , but unable to send any email ,not even a simple one.
So I wonder if Firebase give such a feature , it would be great ?
Firebase Email Sending Blog post is showing empty is i think deleted , but why?
if you have any working source or tutorial to sent an email with attachment , it would be great , thanks

I've been researching this all day...
Option with third-party: SendGrid.com
There's actually a blog post by Tyson Bailey where he explains how he managed to get that done using SendGrid.com (monthly fee) here:
http://blog.onaclovtech.com/2014/07/emailster.html
It even includes the link to a Git he created upon it.
The solution in fact uses AngularJS as #Rexford mentioned in his comment.
Other options... None that I know for the moment, and am exactly researching upon a solution through GCP.
I can tell you they have been working since 2014 on something called "Triggers" that would allow triggering API actions from the database changes (which would helps lot), but seems to have been merged into Google Cloud Functions lately which is in Alpha by the time.

The good news is that as of a few days ago Firebase does now support sending emails... Obviously not from Android - that would be horrible - but from Firebase Fucntions - see here for an example.

Don't think Firebase support that yet..
You can use maligun service with this library for now. I have tested, it works.
https://github.com/sargue/mailgun
https://documentation.mailgun.com/en/latest/quickstart-sending.html#how-to-start-sending-email

Related

Android - Logging errors to an email account

I've implemented an ErrorHandler class into my app which is working just great but as I'm not sure if what I'm doing can fit into "best practices" just would like to share it with you to have your opinion.
My question is silly and my class is very simple. All that I do is the next: in every catch block of my whole java code I do a call to ErrorHabdler.log(e) (which works as an AsyncTask) and as I'm working with AWS what log(e) does is capture all information about the error, like message, device name and model, etc (NO user information) and sends a formatted email with the error to a specific email address.
Another possibility would be to create a new table into my AWS DynamoDB set called Exceptions and instead of sending an email in background write the error log into that new table to have errors more "centralized".
I'd like to know if you consider what I'm actualli doing a good practice, or if you prefer my second choice, or maybe none of them and you would better use a third party error logger.
Best!
There are several Crashlytics tools on the internet.
The best choice is to go to these tools, which make it easier to control crashes reports.
The most common, and is what I use in most of my projects, is Frabric.IO Crashlytics ,: https://fabric.io/kits/android/crashlytics
You can follow these steps to install Crashlytics in your project: https://fabric.io/kits/android/crashlytics/install

i need to change topics in my app every day or every week automaticlly without the user updates the app

I have Christian Android App and there are 5 buttons in my app , I need to update the topics , news and Verses daily or weekly without let the user update the app , is there any way to do that ? I will be grateful if any one help me with tutorials , Please Guide Me THANKS
You can either prepare all possible buttons and choose which to display according to the current timestamp, or you need to build a web API that can provide you with the necessary data and is updatable independent from the app itself.
You must use webservice and SQL DB for this. If you want to add more information for user you just need to update your data base. And in each button tap you should call web api for getting the data.
For web service creation you can use retrofit.
Refer these links
http://www.vogella.com/tutorials/Retrofit/article.html
http://www.journaldev.com/13639/retrofit-android-example-tutorial
https://developer.android.com/training/basics/data-storage/databases.html
Perfect answer by Jacob you can also use cache along with the API call which expires after a specific period. So you don't have to force the user to go online every time he uses your app.
I would do this with notifications, you can have scripts that run weekly to change a topic... and on message receive you can update your topics based on the data coming from the "data-load" this is good because on top of that you can notify them "You have a new topic" or something like that.
There is a lot of resources to set up notifications, and if you are using android studio it is already built in.
https://firebase.google.com/docs/cloud-messaging/
Thanks all for helping me , i already solve my problem through Firebase Realtime Database Because of your posts , thanks again for your help
here is the tutorial https://www.youtube.com/watch?v=QETnC6SEwa0

Android, messaging between 2 registered users advice

I have a scenario where I register users to the system and after they are logged in then I would like to create something like a field called messages(i.e. Facebook messaging system) so 2 users can communicate between each other. This is just an idea but I am trying to find some resources and documentation on line without any luck of how can I achieve this. Can someone give me some advice please on what tools I could use in order to make this idea work ?
I am not asking for source code or so, I just need some advice on how I could achieve this or any kind of references to similar projects would be much appreciated.
Thanks in advance.
This is a perfect use case for a cloud pub/sub messaging service like Pusher or Realtime.co
Check this chat examples on github for Android and iOS:
https://github.com/realtime-framework/MessagingAndroidChat
https://github.com/realtime-framework/MessagingSwiftChat
Note: I work for SightCall. :-)
We offer a platform for realtime communication on mobiles and browsers. While we are best known for WebRTC Video, we also have a realtime data facility that makes it easy to send text-messages between two logged-in endpoints.
We have a sample Android App that shows how to use the framework. You can get an API key for free for a trial.
https://github.com/sightcall/Communicator-for-Android
Of particular interest to you regarding sending/receiving text messages - notice the lines concerning the use of
rtcc.dataChannel().send(bytes, 0, uid);
This is where a text message is sent to a User named by their 'uid', and the method
#RtccEventListener
public void onDataChannelOutOfBandEvent(DataChannelOutOfBandEvent event)
This is where a text message is received as an event.

Piwik tracking in an android application

I want to do data analytics for my android application using Piwik.
In Piwik's documentation, they suggest using GitHub.
I got the Piwik API and download the following file:
https://github.com/piwik/piwik-java-tracking
which I don't know how to use.
What are the steps needed to get the data analysis using the Piwik working?
What should I do next?
I also would like to implement piwik tracking in my android app.
This is what I understood so far:
Unlike for iOS/MacOS applications, there is currently no SDK to help us out.
Piwik developers have a ticket opened in their bugtracker about this, which shows they're aware of the issue and willing to improve the situation, but it will take some time before this android tracking SDK is released.
At the moment, the Piwik team encourages android and Java developers to use the piwik-java-tracking library you mentioned. This is basically just a java wrapper for the web tracking API reference, which helps you to generate Tracking Request URLs to send to your Piwik instance.
This piwik-java-tracking project lacks documentation (there is none that I know of in Github), but there is javadoc in the java files.
Basically what you need to do to track an action is to:
Create a new instance of SimplePiwikTracker
Feed it with whatever values and parameters you wish to track using the various setters available
When you're done, get the URL using one of the methods defined in the PiwikTracker interface, depending of the type of "event" you want to track
Send a request to that URL to actually track your action into you Piwik instance.
This has several drawbacks:
If you need bulk tracking, you'll have to figure out a way of doing so. The web tracking API reference states you can use use a HTTP POST request containing a JSON object to do it.
It doesn't provide any help to handle the case where user is offline. If you need to, you'll have to find a way to cache your tracking request (in an sqlite database for example) and bulk send them when the user is back online.
You'll need to handle possible exceptions raised by network error for the tracking request, to make tat tracking does not interfere with your app normal behavior.
Be sure to read this article too. It gives you an overview of what you need to do to get up & running.
This is what I understood so far. I may update this answer as I progress in implementing piwik tracking in my own app.
Good luck.
Edit: I just noticed that Piwik released "Piwik SDK Android". There are some instruction on how to get this working in the project's wiki.

notify user when website has changed using c2dm in android

i want to make app that make a notification when breaking news has arrived to news website
during my search i found two ways to do that
1- using c2dm server & php & database
2- using timer that scan the website automaticly every time period i decide it
can any one help me by give me an example code for each method or a Tutorial for each method
I'm working on GCM as well. The first comment already told you the right way to solve your problem, but I wanna add something more is that This excellent tutorial
Read it, try to understand it. I think it is quite clear. Hope this help :)
C2DM is deprecated. You could use GCM instead. Go through this tutorial how to get started with it.
You can refer this too.

Categories

Resources