Reputation: 41
I have a small doubt, I am developing an application with various activities that call a database via json, did right is to make calls in the same activity importing all packages in each activity or create an activity / service / class its functionality is the treatment of calls to the server?
Upvotes: 0
Views: 42
Reputation: 906
Create a class that exposes your required service methods, then use that class in each Activity to communicate w/your server.
Upvotes: 2