Skip to content

Instantly share code, notes, and snippets.

@oznus
Last active August 1, 2017 02:20
Show Gist options
  • Save oznus/732c24277df8d7b39f63efb54ac16cc2 to your computer and use it in GitHub Desktop.
Save oznus/732c24277df8d7b39f63efb54ac16cc2 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity {
@Inject
MyAppNetworkService myAppNetworkService;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
List<Object> getUserFromNetwork() {
return myAppNetworkService.getUsers();
}
}
public class MyAppNetworkService {
public List<Object> getUsers() {
List<Object> objects = new ArrayList<>();
//code that fetch users from the network
//......................................
return objects;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment