|
|
|
@ -5,6 +5,8 @@
|
|
|
|
|
*/
|
|
|
|
|
package com.todoroo.astrid.api;
|
|
|
|
|
|
|
|
|
|
import org.tasks.BuildConfig;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Constants for interfacing with Astrid.
|
|
|
|
|
*
|
|
|
|
@ -14,25 +16,15 @@ public class AstridApiConstants {
|
|
|
|
|
|
|
|
|
|
// --- General Constants
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Astrid broadcast base package name
|
|
|
|
|
*/
|
|
|
|
|
public static final String API_PACKAGE = "org.tasks";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Astrid app base package name
|
|
|
|
|
*/
|
|
|
|
|
public static final String ASTRID_PACKAGE = "org.tasks";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Permission for reading tasks and receiving to GET_FILTERS intent
|
|
|
|
|
*/
|
|
|
|
|
public static final String PERMISSION_READ = API_PACKAGE + ".READ";
|
|
|
|
|
public static final String PERMISSION_READ = BuildConfig.APPLICATION_ID + ".READ";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Permission for writing and creating tasks
|
|
|
|
|
*/
|
|
|
|
|
public static final String PERMISSION_WRITE = API_PACKAGE + ".WRITE";
|
|
|
|
|
public static final String PERMISSION_WRITE = BuildConfig.APPLICATION_ID + ".WRITE";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Name of Astrid's publicly readable preference store
|
|
|
|
@ -73,7 +65,7 @@ public class AstridApiConstants {
|
|
|
|
|
/**
|
|
|
|
|
* Action name for a broadcast intent requesting custom filter criteria (e.g. "Due by, Tagged, Tag contains", etc.)
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_REQUEST_CUSTOM_FILTER_CRITERIA = API_PACKAGE + ".REQUEST_CUSTOM_FILTER_CRITERIA";
|
|
|
|
|
public static final String BROADCAST_REQUEST_CUSTOM_FILTER_CRITERIA = BuildConfig.APPLICATION_ID + ".REQUEST_CUSTOM_FILTER_CRITERIA";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -81,29 +73,20 @@ public class AstridApiConstants {
|
|
|
|
|
* <li> EXTRAS_ADDON you add-on identifier
|
|
|
|
|
* <li> EXTRAS_RESPONSE an array of {@link CustomFilterCriterion} </li>
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_SEND_CUSTOM_FILTER_CRITERIA = API_PACKAGE + ".SEND_CUSTOM_FILTER_CRITERIA";
|
|
|
|
|
|
|
|
|
|
// --- Actions API
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for intents to be displayed in Astrid's settings. By default,
|
|
|
|
|
* your application will be put into the category named by your application,
|
|
|
|
|
* but you can add a string meta-data with name "category" to override this.
|
|
|
|
|
*/
|
|
|
|
|
public static final String ACTION_SETTINGS = API_PACKAGE + ".SETTINGS";
|
|
|
|
|
public static final String BROADCAST_SEND_CUSTOM_FILTER_CRITERIA = BuildConfig.APPLICATION_ID + ".SEND_CUSTOM_FILTER_CRITERIA";
|
|
|
|
|
|
|
|
|
|
// --- Events API
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying Astrid task list to refresh
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_REFRESH = API_PACKAGE + ".REFRESH";
|
|
|
|
|
public static final String BROADCAST_EVENT_REFRESH = BuildConfig.APPLICATION_ID + ".REFRESH";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying that task was completed
|
|
|
|
|
* <li> EXTRAS_TASK_ID id of the task
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_COMPLETED = API_PACKAGE + ".TASK_COMPLETED";
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_COMPLETED = BuildConfig.APPLICATION_ID + ".TASK_COMPLETED";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying that task was created from repeating template
|
|
|
|
@ -111,7 +94,7 @@ public class AstridApiConstants {
|
|
|
|
|
* <li> EXTRAS_OLD_DUE_DATE task old due date (could be 0)
|
|
|
|
|
* <li> EXTRAS_NEW_DUE_DATE task new due date (will not be 0)
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_REPEATED = API_PACKAGE + ".TASK_REPEATED";
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_REPEATED = BuildConfig.APPLICATION_ID + ".TASK_REPEATED";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying that a repeating task has passed its repeat_until value
|
|
|
|
@ -119,18 +102,18 @@ public class AstridApiConstants {
|
|
|
|
|
* <li> EXTRAS_OLD_DUE_DATE task old due date (could be 0)
|
|
|
|
|
* <li> EXTRAS_NEW_DUE_DATE task new due date (will not be 0)
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_REPEAT_FINISHED = API_PACKAGE + ".TASK_REPEAT_FINISHED";
|
|
|
|
|
public static final String BROADCAST_EVENT_TASK_REPEAT_FINISHED = BuildConfig.APPLICATION_ID + ".TASK_REPEAT_FINISHED";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying that tag was deleted
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_TAG_DELETED = API_PACKAGE + ".TAG_DELETED";
|
|
|
|
|
public static final String BROADCAST_EVENT_TAG_DELETED = BuildConfig.APPLICATION_ID + ".TAG_DELETED";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action name for broadcast intent notifying that tag was renamed
|
|
|
|
|
*/
|
|
|
|
|
public static final String BROADCAST_EVENT_TAG_RENAMED = API_PACKAGE + ".TAG_RENAMED";
|
|
|
|
|
public static final String BROADCAST_EVENT_TAG_RENAMED = BuildConfig.APPLICATION_ID + ".TAG_RENAMED";
|
|
|
|
|
|
|
|
|
|
public static final String BROADCAST_EVENT_FILTER_DELETED = API_PACKAGE + ".FILTER_DELETED";
|
|
|
|
|
public static final String BROADCAST_EVENT_FILTER_DELETED = BuildConfig.APPLICATION_ID + ".FILTER_DELETED";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|