Skip to content

Commit

Permalink
test: odk collect
Browse files Browse the repository at this point in the history
  • Loading branch information
varun2948 committed Jul 21, 2023
1 parent add8dba commit 6a58ff1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,15 @@ const TasksComponent = ({ type, task, defaultTheme }) => {
<CoreModules.Button variant="contained"
color="error"
onClick={() => {
document.location.href = 'intent://getodk.org/#Intent;scheme=https;package=org.odk.collect.android;end';
// Replace "org.odk.collect.android.FORM_DOWNLOAD" with the desired action name
const action = "org.odk.collect.android.FORM_DOWNLOAD";
// Replace "vnd.android.cursor.dir/vnd.odk.form" with the desired data mime type
const mimeType = "vnd.android.cursor.dir/vnd.odk.form";

const intentURI = `intent:${action};category=android.intent.category.DEFAULT;type=${mimeType};end;`;

document.location.href = intentURI;
// document.location.href = 'intent://getodk.org/#Intent;scheme=app;package=org.odk.collect.android;end';
// document.location.href = 'intent:#Intent;scheme=app;package=org.odk.collect.android;end;';
// document.location.href = 'https://play.google.com/store/apps/details?id=org.odk.collect.android';
}}>Go To ODK</CoreModules.Button>
Expand Down

0 comments on commit 6a58ff1

Please sign in to comment.