Android Question Realtime twitter notifications

trueboss323

Active Member
Licensed User
Longtime User
I'm trying to create a Twitter client and in the background I would like it to monitor new tweets from a person. The way it's currently doing it is it runs on a Timer every 5 minutes to check for new tweets, and sends a push notification. Doing it this way, I'm afraid this might cause a huge battery consumption. Is there a way to do this in real time?
 

DonManfred

Expert
Licensed User
Longtime User
Does Twitter provide any api for this?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I just want to know if it's possible doing in real time?
If they PROVIDE a Api for this. You need to check their Documentation .

If they only provide a Rest api then you need to stay with the system you are using.
 
Upvote 0

trueboss323

Active Member
Licensed User
Longtime User
Since the sticky background service is no longer recommended for use. Is there a better alternative to use?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Is there a better alternative to use?
One idea:
Setup a b4j server which fetch twitter every minute. You can send a pushnotification to your android app when something new.
On android fetch the new tweets when the notication arrives.
 
Upvote 0
Top