22
33import android .os .Bundle ;
44
5- import org .cientopolis .samplers .model .InformationStep ;
6- import org .cientopolis .samplers .model .InsertDateStep ;
7- import org .cientopolis .samplers .model .InsertTimeStep ;
8- import org .cientopolis .samplers .model .MultipleSelectStep ;
9- import org .cientopolis .samplers .model .PhotoStep ;
10- import org .cientopolis .samplers .model .SelectOneOption ;
11- import org .cientopolis .samplers .model .SelectOneStep ;
12- import org .cientopolis .samplers .model .MultipleSelectOption ;
13- import org .cientopolis .samplers .model .Step ;
14- import org .cientopolis .samplers .model .Workflow ;
5+ import org .cientopolis .samplers .framework .information .InformationStep ;
6+ import org .cientopolis .samplers .framework .insertDate .InsertDateStep ;
7+ import org .cientopolis .samplers .framework .insertText .InsertTextStep ;
8+ import org .cientopolis .samplers .framework .insertTime .InsertTimeStep ;
9+ import org .cientopolis .samplers .framework .location .LocationStep ;
10+ import org .cientopolis .samplers .framework .multipleSelect .MultipleSelectStep ;
11+ import org .cientopolis .samplers .framework .photo .PhotoStep ;
12+ import org .cientopolis .samplers .framework .selectOne .SelectOneOption ;
13+ import org .cientopolis .samplers .framework .selectOne .SelectOneStep ;
14+ import org .cientopolis .samplers .framework .multipleSelect .MultipleSelectOption ;
15+ import org .cientopolis .samplers .framework .Step ;
16+ import org .cientopolis .samplers .framework .Workflow ;
17+ import org .cientopolis .samplers .framework .soundRecord .SoundRecordStep ;
1518import org .cientopolis .samplers .network .NetworkConfiguration ;
1619import org .cientopolis .samplers .ui .SamplersMainActivity ;
1720
@@ -28,7 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
2831 super .onCreate (savedInstanceState );
2932
3033 // Set the network configuration
31- NetworkConfiguration .setURL ("http://192.168.1 .10/samplers/upload.php" );
34+ NetworkConfiguration .setURL ("http://192.168.0 .10/samplers/upload.php" );
3235 NetworkConfiguration .setPARAM_NAME ("sample" );
3336
3437 lb_main_welcome_message .setText ("Bienvenido a la Aplicacion de Prueba!" );
@@ -47,39 +50,55 @@ protected Workflow getWorkflow() {
4750 workflow .addStep (new InsertTimeStep (101 , "Seleccione la Hora de la muestra" ,102 ));
4851
4952 // Insert Date
50- workflow .addStep (new InsertDateStep (102 , "Seleccione la Fecha de la muestra" ,2 ));
53+ workflow .addStep (new InsertDateStep (102 , "Seleccione la Fecha de la muestra" ,103 ));
54+
55+ // Sound
56+ workflow .addStep (new SoundRecordStep (103 , "Grabe algo" ,2 ));
5157
5258 // SelectOneStep
5359 ArrayList <SelectOneOption > optionsToSelect2 = new ArrayList <SelectOneOption >();
54- optionsToSelect2 .add (new SelectOneOption (1 ,"SI" , 5 ));
55- optionsToSelect2 .add (new SelectOneOption (2 ,"NO" , 6 ));
60+ optionsToSelect2 .add (new SelectOneOption (1 ,"SI" , 3 ));
61+ optionsToSelect2 .add (new SelectOneOption (2 ,"NO" , 4 ));
5662 workflow .addStep (new SelectOneStep (2 , optionsToSelect2 , "¿Quiere sacar una foto?" ));
5763
64+ // PhotoStep
65+ PhotoStep photoStep = new PhotoStep (3 , "Saque una foto de su gato" ,"" ,4 );
66+ // set help resource
67+ photoStep .setHelpResourseId (R .raw .photohelp );
68+ workflow .addStep (photoStep );
69+
5870 // InsertTextStep
59- // workflow.addStep(new InsertTextStep(3 , "Escriba algo","cualquier cosa",50, InsertTextStep.InputType.TYPE_TEXT, true, 3 ));
71+ workflow .addStep (new InsertTextStep (4 , "Escriba algo" ,"cualquier cosa" ,50 , InsertTextStep .InputType .TYPE_TEXT , true , 5 ));
6072
6173 // LocationStep
62- //workflow.addStep(new LocationStep(4, "Seleccione la posicion de la muestra",4));
63-
64- // PhotoStep
65- workflow .addStep (new PhotoStep (5 , "Instrucciones para mostrar" ,"" ,6 ));
74+ workflow .addStep (new LocationStep (5 , "Seleccione la posicion de la muestra" ,6 ));
6675
6776 // MultipleSelectStep
6877 ArrayList <MultipleSelectOption > optionsToSelect = new ArrayList <MultipleSelectOption >();
6978 optionsToSelect .add (new MultipleSelectOption (1 ,"Arboles" ));
7079 optionsToSelect .add (new MultipleSelectOption (2 ,"Basura" ));
7180 optionsToSelect .add (new MultipleSelectOption (3 ,"Arroyo" ));
7281 optionsToSelect .add (new MultipleSelectOption (4 ,"Animales" ));
73- workflow .addStep (new MultipleSelectStep (6 , optionsToSelect , "Seleccione si observa algo de esto" ,7 ));
82+ workflow .addStep (new MultipleSelectStep (6 , optionsToSelect , "Seleccione si observa algo de esto" ,null ));
83+
7484
85+
86+ /*
7587 // SelectOneStep
7688 optionsToSelect2 = new ArrayList<SelectOneOption>();
7789 optionsToSelect2.add(new SelectOneOption(1,"Opcion 1", null));
7890 optionsToSelect2.add(new SelectOneOption(2,"Opcion 2", null));
7991 optionsToSelect2.add(new SelectOneOption(3,"Opcion 3", null));
8092 optionsToSelect2.add(new SelectOneOption(4,"Opcion 4", null));
8193 workflow.addStep(new SelectOneStep(7, optionsToSelect2, "Seleccione solo uno"));
94+ */
95+
8296
8397 return workflow ;
8498 }
99+
100+ @ Override
101+ protected Integer getMainHelpResourceId () {
102+ return R .raw .mainhelp ;
103+ }
85104}
0 commit comments