-
Notifications
You must be signed in to change notification settings - Fork 1
Manually Instantiation
javier7ar edited this page Apr 24, 2018
·
5 revisions
- Create a Main Activity
-
You can create a class inherited from SamplersMainActivity. You will need to:
- Implement the getWorkflow() method and return the Workflow to pass to the TakeSampleActivity
- On the onCreate() method and set the NetworkConfiguration:
NetworkConfiguration.setURL("http://192.168.1.10/samplers/upload.php"); NetworkConfiguration.setPARAM_NAME_SAMPLE("sample"); // Optional if you will use authentication NetworkConfiguration.setPARAM_NAME_USER_ID("user_id"); NetworkConfiguration.setPARAM_NAME_AUTHENTICATION_TYPE("authentication_type"); // Optional if you will use authentication, set the configuration AuthenticationManager.setAuthenticationEnabled(true); AuthenticationManager.setAuthenticationOptional(true);
-
You can create your own Main Activity and start the TakeSampleActivity like this:
Workflow workflow = new Workflow(); // ... populate the workflow as desired Intent intent = new Intent(this, TakeSampleActivity.class); intent.putExtra(TakeSampleActivity.EXTRA_WORKFLOW, workflow); startActivity(intent);
-