Add initial FirstRun app

This commit is contained in:
Thomas Farstrike
2026-03-06 16:43:56 +01:00
parent 2e8a47d34f
commit d485d4e02a
3 changed files with 47 additions and 1 deletions
@@ -0,0 +1,23 @@
{
"name": "FirstRun",
"publisher": "MicroPythonOS",
"short_description": "Welcomes the user and gives a few pointers on how to control the UI.",
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/icons/com.micropythonos.firstrun_0.0.1_64x64.png",
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/mpks/com.micropythonos.firstrun_0.0.1.mpk",
"fullname": "com.micropythonos.firstrun",
"version": "0.0.1",
"category": "help",
"activities": [
{
"entrypoint": "assets/firstrun.py",
"classname": "FirstRun",
"intent_filters": [
{
"action": "main",
"category": "launcher"
}
]
}
]
}
@@ -0,0 +1,23 @@
from mpos import Activity
class FirstRun(Activity):
def onCreate(self):
screen = lv.obj()
label = lv.label(screen)
label.align(lv.ALIGN.TOP_LEFT, 0, 0)
label.set_width(lv.pct(100))
touchhelp = "swipe from the left edge to go back and from the top edge to open the menu."
label.set_text(f'''
Welcome!
This app will explain how to move around in MicroPythonOS.
If you're on a touch screen, {touchhelp}
If you've got 3 buttons, one is PREVIOUS, one is ENTER and one is NEXT. To go back, press PREVIOUS and NEXT together.
If you've got 2 buttons, one is PREVIOUS, the other is NEXT. To ENTER, press both at the same time. To go back, long-press PREVIOUS.
''')
label.set_long_mode(lv.label.LONG_MODE.WRAP)
self.setContentView(screen)
@@ -86,7 +86,7 @@ class Launcher(Activity):
iconcont_height = icon_size + label_height
for app in AppManager.get_app_list():
if app.category == "launcher":
if app.category == "launcher" or app.fullname == "com.micropythonos.firstrun":
continue
app_name = app.name