You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Rename CameraApp to CameraActivity
This commit is contained in:
@@ -3,30 +3,21 @@
|
||||
"publisher": "MicroPythonOS",
|
||||
"short_description": "Camera with QR decoding",
|
||||
"long_description": "Camera for both internal camera's and webcams, that includes QR decoding.",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/icons/com.micropythonos.camera_0.1.0_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/mpks/com.micropythonos.camera_0.1.0.mpk",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/icons/com.micropythonos.camera_0.2.0_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/mpks/com.micropythonos.camera_0.2.0.mpk",
|
||||
"fullname": "com.micropythonos.camera",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"category": "camera",
|
||||
"activities": [
|
||||
{
|
||||
"entrypoint": "assets/camera_app.py",
|
||||
"classname": "CameraApp",
|
||||
"classname": "CameraActivity",
|
||||
"intent_filters": [
|
||||
{
|
||||
"action": "main",
|
||||
"category": "launcher"
|
||||
},
|
||||
{
|
||||
"action": "scan_qr_code",
|
||||
"category": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"entrypoint": "assets/camera_app.py",
|
||||
"classname": "CameraSettingsActivity",
|
||||
"intent_filters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Camera app wrapper that inherits from the mpos.ui.camera_app module.
|
||||
Camera app wrapper that imports from the mpos.ui.camera_activity module.
|
||||
"""
|
||||
|
||||
from mpos.ui.camera_app import CameraApp
|
||||
from mpos.ui.camera_activity import CameraActivity
|
||||
|
||||
__all__ = ['CameraApp']
|
||||
__all__ = ['CameraActivity']
|
||||
|
||||
@@ -8,7 +8,7 @@ from mpos.ui.keyboard import MposKeyboard
|
||||
import mpos.apps
|
||||
from mpos.net.wifi_service import WifiService
|
||||
|
||||
from mpos.ui.camera_app import CameraApp
|
||||
from mpos.ui.camera_activity import CameraActivity
|
||||
|
||||
class WiFi(Activity):
|
||||
"""
|
||||
@@ -341,7 +341,7 @@ class EditNetwork(Activity):
|
||||
self.finish()
|
||||
else:
|
||||
print("Opening CameraApp")
|
||||
self.startActivityForResult(Intent(activity_class=CameraApp).putExtra("scanqr_intent", True), self.gotqr_result_callback)
|
||||
self.startActivityForResult(Intent(activity_class=CameraActivity).putExtra("scanqr_intent", True), self.gotqr_result_callback)
|
||||
|
||||
def gotqr_result_callback(self, result):
|
||||
print(f"QR capture finished, result: {result}")
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ from mpos.content.intent import Intent
|
||||
|
||||
from .camera_settings import CameraSettingsActivity
|
||||
|
||||
class CameraApp(Activity):
|
||||
class CameraActivity(Activity):
|
||||
|
||||
PACKAGE = "com.micropythonos.camera"
|
||||
CONFIGFILE = "config.json"
|
||||
@@ -3,7 +3,7 @@ import lvgl as lv
|
||||
import mpos
|
||||
from mpos.apps import Activity, Intent
|
||||
from mpos.ui.keyboard import MposKeyboard
|
||||
from .camera_app import CameraApp
|
||||
from .camera_activity import CameraActivity
|
||||
|
||||
"""
|
||||
SettingActivity is used to edit one setting.
|
||||
@@ -181,7 +181,7 @@ class SettingActivity(Activity):
|
||||
|
||||
def cambutton_cb(self, event):
|
||||
print("cambutton clicked!")
|
||||
self.startActivityForResult(Intent(activity_class=CameraApp).putExtra("scanqr_intent", True), self.gotqr_result_callback)
|
||||
self.startActivityForResult(Intent(activity_class=CameraActivity).putExtra("scanqr_intent", True), self.gotqr_result_callback)
|
||||
|
||||
def save_setting(self, setting):
|
||||
ui = setting.get("ui")
|
||||
|
||||
Reference in New Issue
Block a user