-3

Hello Developers , am sorry i have problem in my android 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

Manohar
  • 22,116
  • 9
  • 108
  • 144
Bishoy
  • 27
  • 6

5 Answers5

1

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.

Jakob Ulbrich
  • 133
  • 1
  • 7
1

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
EKN
  • 1,886
  • 1
  • 16
  • 29
0

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.

  • thanks alot sir , i will try that and tell you , thanks – Bishoy Jun 22 '17 at 13:35
  • I can't really help you with web development but once you have done that part. You can use Volley library to access the API. It uses cache by default, you can also look at oleksandr_yefremov's answer https://stackoverflow.com/a/16852314/7358880 – Abhishek Tyagi Jun 22 '17 at 14:00
0

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/

dfabiano
  • 82
  • 1
  • 7
  • I don't think that a push notification should be used to load data from a server / from firebase. But I think push notifications are good to inform the user about new data. When the app gets opened then, the new data should be loaded. – Phil90 Jun 22 '17 at 13:35
0

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

Bishoy
  • 27
  • 6