The Sunbird-AIAssistant mobile app is a versatile platform allowing users to seamlessly search, play, like, and share various types of content. It features chat functionality with three distinct bots—Story Bot for storytelling, Parent Assistant for parent-child engagement, and Teacher Assistant for educational support. The app also includes a 'My Pitara' feature enabling users to create personalized playlists. With a user-friendly interface and a blend of entertainment and education, the app aims to offer a holistic and interactive experience for diverse user needs.
-
-
Shows content based upon the query given it as input. Also it takes recorded audio as input to show the desired contents.
-
Filters contents based upon the filter selected in the UI.
-
Scans the QR Code(Diksha supported) and shows the content.
-
Device specific like functionality is available and telemetry is generated on this action.
-
Shared the content URL on all supported apps available on the device.
-
-
Changes the app language based upon the language selected in the UI. Also it filters the content based upon the language.
-
-
-
Shows the contents based upon the recent usage
-
Users can select their own contents and create their own playlist for ease of access of content.
-
Fetches content from Youtube and add it to Playlist.
-
Users can select files from the device and add it to the Playlist.
-
Fetches content from DIKSHA and add it to Playlist.
-
-
├── app
│ ├── components
│ │ ├── add-to-pitara
│ │ ├── app-exit
│ │ ├── app-update
│ │ ├── application-header
│ │ ├── bot-messages
│ │ ├── bot-permission
│ │ ├── edit-removed-modal
│ │ ├── langauge-select
│ │ ├── new-playlist-modal
│ │ ├── qrcode-popup
│ │ ├── recording-alert
│ │ ├── sheet-modal
│ │ ├── skeleton-item
│ │ └── upload-local
│ ├── directives
│ ├── pages
│ │ ├── create-playlist
│ │ ├── home
│ │ ├── mypitara
│ │ ├── parent-sakhi
│ │ ├── player
│ │ ├── playlist-details
│ │ ├── qr-scan-result
│ │ ├── search
│ │ ├── splash
│ │ ├── story
│ │ ├── teacher-sakhi
│ │ └── view-all
│ ├── services
│ │ ├── api
│ │ ├── app-update
│ │ ├── bot
│ │ ├── config
│ │ ├── content
│ │ ├── db
│ │ ├── playlist
│ │ ├── scan
│ │ ├── sources
│ │ └── telemetry
│ └── tabs
├── assets
Prerequisites:
Package | Version | Recommended Version |
---|---|---|
Node | 18+ | 18.16.1 |
NPM | 9+ | 9.5.1 |
Capacitor | 5+ | 5.5.1 |
Ionic | 7 | 7.2.0 |
Java(For Android) | 17+ | 17.0.5 |
Gradle(For Android) | 8+ | 8.5 |
Configuration files
-
app_name
: name of the appapp_id
: applicationId of the appapp_version_code
: app version code(Needs to be updated before playstore)
-
BASE_URL
: Base url of the instanceCONFIG
: config API end pointPAGE_SEARCH_API
: content search API end pointCONTEXT_SEARCH
: content search API end pointCONTENT_SEARCH_API
: content search API end pointBOT_QUERY_API
: bot query API end pointSEARCH_API
: diksha content search API end pointBOT_SAKHI_API_PATH
: story bot API end pointBOT_ACTIVITY_API_PATH
: teacher and parent bot end pointREGISTER_DEVICE_API_PATH
: device registry API end pointKEY
: Key for API token generationSECRET
: Secret for API token generationPRODUCER_ID
: Unique id to identify mobile app telemetry eventsPRODUCER_PID
: Source to identify mobile app telemetry events
Project Setup
1. Ionic-Android build Setup
- Install java
- Install Gradle
- Install Android Studio
- After Android studio installation, install SDK
- Open Android studio and goto settings/appearance and behavior/system settings/Android SDK
- Install appropriate Android sdk platform package.
- Add environment variables in ~/.bashrc
or ~/.bash_profile
as follows
export ANDROID_SDK_ROOT=path_to_sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
- Reference: https://ionicframework.com/docs/installation/android
CLI Setup
- `npm install -g ionic`
- `npm install -g capacitor`
2. Project Setup
- git clone the repo(https://github.com/Sunbird-AIAssistant/djp-mobile-app.git).
- Rename config.properties.example
file to config.properties
and put all the valid credentials and api endpoint.
- Run `./build.sh`
- npm i
- npx cap add android
<!-- for windows -->
install git-bash https://git-scm.com/download/win and run `./build.sh`
3. How to build apk
- To check attached devices do
adb devices
npm run ionic-build
(Make sure you have attached device)- Apk location
project_folder/android/app/build/outputs/apk/apk_debug.apk
3. How to update or add new appicon
- Add the new icon.png file in assets folder in project root
- icon resolution should be 1024x1024
- Run npx @capacitor/assets generate --iconBackgroundColor '#eeeeee' --iconBackgroundColorDark '#222222'
github reference - https://github.com/ionic-team/capacitor-assets
5. How to debug apk
- Open chrome and enter
chrome://inspect
- Select app