Skip to content

Commit 6f745d2

Browse files
Rename CameraApp to CameraActivity
1 parent d42fc8d commit 6f745d2

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

internal_filesystem/apps/com.micropythonos.camera/META-INF/MANIFEST.JSON

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,21 @@
33
"publisher": "MicroPythonOS",
44
"short_description": "Camera with QR decoding",
55
"long_description": "Camera for both internal camera's and webcams, that includes QR decoding.",
6-
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/icons/com.micropythonos.camera_0.1.0_64x64.png",
7-
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/mpks/com.micropythonos.camera_0.1.0.mpk",
6+
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/icons/com.micropythonos.camera_0.2.0_64x64.png",
7+
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.camera/mpks/com.micropythonos.camera_0.2.0.mpk",
88
"fullname": "com.micropythonos.camera",
9-
"version": "0.1.0",
9+
"version": "0.2.0",
1010
"category": "camera",
1111
"activities": [
1212
{
1313
"entrypoint": "assets/camera_app.py",
14-
"classname": "CameraApp",
14+
"classname": "CameraActivity",
1515
"intent_filters": [
1616
{
1717
"action": "main",
1818
"category": "launcher"
1919
},
20-
{
21-
"action": "scan_qr_code",
22-
"category": "default"
23-
}
2420
]
25-
},
26-
{
27-
"entrypoint": "assets/camera_app.py",
28-
"classname": "CameraSettingsActivity",
29-
"intent_filters": []
3021
}
3122
]
3223
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
Camera app wrapper that inherits from the mpos.ui.camera_app module.
2+
Camera app wrapper that imports from the mpos.ui.camera_activity module.
33
"""
44

5-
from mpos.ui.camera_app import CameraApp
5+
from mpos.ui.camera_activity import CameraActivity
66

7-
__all__ = ['CameraApp']
7+
__all__ = ['CameraActivity']

internal_filesystem/builtin/apps/com.micropythonos.wifi/assets/wifi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import mpos.apps
99
from mpos.net.wifi_service import WifiService
1010

11-
from mpos.ui.camera_app import CameraApp
11+
from mpos.ui.camera_activity import CameraActivity
1212

1313
class WiFi(Activity):
1414
"""
@@ -341,7 +341,7 @@ def forget_cb(self, event):
341341
self.finish()
342342
else:
343343
print("Opening CameraApp")
344-
self.startActivityForResult(Intent(activity_class=CameraApp).putExtra("scanqr_intent", True), self.gotqr_result_callback)
344+
self.startActivityForResult(Intent(activity_class=CameraActivity).putExtra("scanqr_intent", True), self.gotqr_result_callback)
345345

346346
def gotqr_result_callback(self, result):
347347
print(f"QR capture finished, result: {result}")

internal_filesystem/lib/mpos/ui/camera_app.py renamed to internal_filesystem/lib/mpos/ui/camera_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from .camera_settings import CameraSettingsActivity
1414

15-
class CameraApp(Activity):
15+
class CameraActivity(Activity):
1616

1717
PACKAGE = "com.micropythonos.camera"
1818
CONFIGFILE = "config.json"

internal_filesystem/lib/mpos/ui/setting_activity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import mpos
44
from mpos.apps import Activity, Intent
55
from mpos.ui.keyboard import MposKeyboard
6-
from .camera_app import CameraApp
6+
from .camera_activity import CameraActivity
77

88
"""
99
SettingActivity is used to edit one setting.
@@ -181,7 +181,7 @@ def gotqr_result_callback(self, result):
181181

182182
def cambutton_cb(self, event):
183183
print("cambutton clicked!")
184-
self.startActivityForResult(Intent(activity_class=CameraApp).putExtra("scanqr_intent", True), self.gotqr_result_callback)
184+
self.startActivityForResult(Intent(activity_class=CameraActivity).putExtra("scanqr_intent", True), self.gotqr_result_callback)
185185

186186
def save_setting(self, setting):
187187
ui = setting.get("ui")

0 commit comments

Comments
 (0)