Simple native boilerplate Android app that authenticates users via Webasyst ID and enables direct access to all linked Webasyst accounts APIs.
-
Clone this repository
-
Create new file
webasyst.properties
in repository root:
webasyst.x.client_id="YOUR_WEBASYSTID_APP_CLIENT_ID_HERE"
webasyst.x.host="https://www.webasyst.com"
Get your Webasyst ID auth client id here: https://www.webasyst.com/my/waid/apps/
-
Install Android Studio as described in https://developer.android.com/studio/install
-
In Android Studio choose file -> open and navigate to project directory.
-
Detailed manual on running an app on the Android Emulator can be found here: https://developer.android.com/studio/run/emulator
The project has a main module webasyst-x
that provides the core structure of the sample Android application.
Also have the following gradle submodules:
The module contains on-boarding screens (intro) and activity for authorization. Implemented methods of authorization by password, by phone number, by QR Code. Also implemented is an express connection of the WAID-user to the installation using a QR Code.
Use this module if you need to login and connect users by QR Code.
Сommon utility classes, functions and resources.
String resources of the whole project (incl. submodules). See note for translators
A key module that allows you to get information about the user's installations. Contains both data layer objects and interface elements that allow the user to switch between installations.
Use this module if you need to protect sensitive user data. Call PinCodeStore.hasPinCode()
or PinCodeStore.hasPinCodeWithTime()
in onResume()
of the corresponding activity or fragment.
Adds user profile editing features.
String resources are located in /webasyst-x/i18n/src/main/res/values[-lang[-rREGION]]
where lang
is two-letter ISO 639-1 language code
and REGION
is two letter ISO 3166-1-alpha-2 region code (note the lowercase r).
Android selects resources based on the system locale. If it fails to locate appropriate
resources, it falls back to default (res/values/
)
For details, follow the link https://developer.android.com/guide/topics/resources/localization
For details on string resource format, follow the link https://developer.android.com/guide/topics/resources/string-resource
-
Change unique application ID in the main module build.gradle file. More about application ID here: https://developer.android.com/build/configure-app-module
-
Change the package attribute of the main
Manifest.xml
file and change the package name in all source files. -
Change application name in the string resources.
-
Change
app_redirect_scheme
in string resources. It is recommended that you specify a package name or your web domain (in reverse domain name notation) -
Modify the source code at your own discretion.