Tasker's Content Provider
The ContentProvider is available from Tasker v1.2.2.
It only supports specification of URI and Projection arguments in the cursor query.
IMPORTANT: If your app targets API 30 or above you need to add the following inside your <manifest> tag in your manifest file:
<queries>
<package android:name="net.dinglisch.android.taskerm" />
</queries>
Query Named Tasks
URI: content://net.dinglisch.android.tasker/tasks
Columns:
- name: name of the task
- project_name: project name of the project the task is in
Sort order: alphabetic by task name, even if task name is not included in the projection.
Example:
Cursor c = getContentResolver().query( Uri.parse( "content://net.dinglisch.android.tasker/tasks" ), null, null, null, null );
if ( c != null ) {
int nameCol = c.getColumnIndex( "name" );
int projNameCol = c.getColumnIndex( "project_name" );
while ( c.moveToNext() )
Log.d( TAG, c.getString( projNameCol ) + "/" + c.getString( nameCol ) );
c.close();
}
Query Preference Values
URI: content://net.dinglisch.android.tasker/prefs
Columns:
- enabled: whether Tasker is enabled or not
- ext_access: whether the user has enabled external app access
Sort order: unspecified
|