Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Android app as favorite by default #8

Open
llaske opened this issue Jul 18, 2020 · 1 comment
Open

Add Android app as favorite by default #8

llaske opened this issue Jul 18, 2020 · 1 comment
Labels

Comments

@llaske
Copy link
Owner

llaske commented Jul 18, 2020

It's possible to add an Android app as favorite so it could appear in the Sugarizer home view activity circle.
But it's possible only when the user is connected by clicking on favorite icon in the Sugarizer activity list view.

Is there a way to define an Android app as favorite by default (in activities.json file)? So it could appear by default in the Sugarizer home view for all users.

@llaske llaske changed the title Add Android app in favorite view by default Add Android app as favorite view by default Jul 18, 2020
@llaske llaske changed the title Add Android app as favorite view by default Add Android app as favorite by default Jul 18, 2020
@llaske
Copy link
Owner Author

llaske commented Jul 18, 2020

It's possible starting in Sugarizer commit llaske/sugarizer@a7f4dbd.

To do that, add a new line in activities.json like explain here.
But because it's not a Sugarizer activities, you should:

  • Set the id property to the internal id of the Android app,
  • Set the name property to the name you want to display for the activity (could be different from the real one),
  • Set the version property to the app version (not a prerequisite but better to identify the app version),
  • Set the icon property to value /data/user/0/org.olpc_france.sugarizeros/cache/<id>.png where <id> is the value of id property
  • Remove directory property.

At end, you should have something like that:

{"id": "com.android.chrome", "name": "Chrome", "version": "83.0.4103.106", "type":"native", "icon": "/data/user/0/org.olpc_france.sugarizeros/cache/com.android.chrome.png", "favorite": true, "activityId": null},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant