profile trigger

This commit is contained in:
2022-01-05 18:06:26 +01:00
parent 5653a9c70e
commit 941bb3e1af
18 changed files with 313 additions and 82 deletions

View File

@@ -609,10 +609,18 @@ public class ActivityManageRule extends Activity
}
else if(triggerType == Trigger_Enum.profileActive)
{
newTrigger.setTriggerType(Trigger_Enum.profileActive);
Intent profileTriggerEditor = new Intent(myContext, ActivityManageTriggerProfile.class);
startActivityForResult(profileTriggerEditor, requestCodeTriggerProfileAdd);
return;
if(Profile.getProfileCollection().size() > 0)
{
newTrigger.setTriggerType(Trigger_Enum.profileActive);
Intent profileTriggerEditor = new Intent(myContext, ActivityManageTriggerProfile.class);
startActivityForResult(profileTriggerEditor, requestCodeTriggerProfileAdd);
return;
}
else
{
Toast.makeText(context, getResources().getString(R.string.noProfilesCreateOneFirst), Toast.LENGTH_LONG).show();
return;
}
}
else if(triggerType == Trigger_Enum.activityDetection)
{