diff --git a/IcarusAndroid/app/src/main/java/framework/everywaretechnologies/it/icarusandroid/MainActivity.java b/IcarusAndroid/app/src/main/java/framework/everywaretechnologies/it/icarusandroid/MainActivity.java index 9bf1795999d8bd8cc09962481578ef5f8c274745..168aebaeec3cc9cca0bf3c87a17b209fee6fc079 100644 --- a/IcarusAndroid/app/src/main/java/framework/everywaretechnologies/it/icarusandroid/MainActivity.java +++ b/IcarusAndroid/app/src/main/java/framework/everywaretechnologies/it/icarusandroid/MainActivity.java @@ -108,10 +108,10 @@ public class MainActivity extends AppCompatActivity { if(eventNameEditText.getText().length() == 0) eventName="eventoProva"; else eventName=eventNameEditText.getText().toString(); - if(eventCategoryEditText.getText().length()==0) eventCategory=Icarus.EventCategories.APPLICATION.toString(); + if(eventCategoryEditText.getText().length()==0) eventCategory=EventTrackResource.EventCategories.APPLICATION.name().toLowerCase(); else eventCategory=eventCategoryEditText.getText().toString(); - if(eventLabelEditText.getText().length()==0) eventLabel = "labelProva"; + if(eventLabelEditText.getText().length()==0) eventLabel = EventTrackResource.EventLabel.FOREGROUND.name().toLowerCase(); else eventLabel=eventLabelEditText.getText().toString(); if(mostProbableActivityEditText.getText().length()==0) mostProbableActivity="activityProva"; diff --git a/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/EventTrackResource.java b/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/EventTrackResource.java index 0e50dc91ac29b6b259b1342f4370b98783562cfd..8b18022beef634d23aa3a73f39671f1cc5223e73 100644 --- a/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/EventTrackResource.java +++ b/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/EventTrackResource.java @@ -5,6 +5,16 @@ import org.json.JSONObject; public class EventTrackResource extends IcarusResource { + public enum EventCategories{ //categorie di evento + + APPLICATION,ACTION,NOTIFICATION; + } + + public enum EventLabel{ + + FOREGROUND,BACKGROUND; + } + private String eventName; private String eventCategory; private String eventLabel; diff --git a/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/Icarus.java b/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/Icarus.java index 10ad48e9099ba0eff76253aae80ef2cb3d30b3f1..c6b8c3905bdd614c88b50990cf801e93130edf72 100644 --- a/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/Icarus.java +++ b/IcarusAndroid/icarus/src/main/java/framework/everywaretechnologies/it/icarus/Icarus.java @@ -37,12 +37,6 @@ import java.util.function.Consumer; public class Icarus { - public enum EventCategories{ //categorie di evento - - APPLICATION,ACTION,NOTIFICATION; - } - - private final static String ICARUS_URL="https://webdev.ewlab.di.unimi.it/icarus/str";