mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
This is needed for the apps to get enabled soon after installation. In case of 'sharing' app, a shortcut will appear on the apps page. This also brings uniformity to help later refactoring. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
28 lines
633 B
Python
28 lines
633 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
FreedomBox app for api for android app.
|
|
"""
|
|
|
|
from plinth import app as app_module
|
|
|
|
|
|
class ApiApp(app_module.App):
|
|
"""FreedomBox app for API for Android app."""
|
|
|
|
app_id = 'api'
|
|
|
|
_version = 1
|
|
|
|
def __init__(self):
|
|
"""Create components for the app."""
|
|
super().__init__()
|
|
|
|
info = app_module.Info(app_id=self.app_id, version=self._version,
|
|
is_essential=True)
|
|
self.add(info)
|
|
|
|
def setup(self, old_version):
|
|
"""Install and configure the app."""
|
|
super().setup(old_version)
|
|
self.enable()
|