This bundle provides a command to generate Android application and needed RESTApi based on your bundle definition.
A generator prompt some information: AppName, package, destination folder, ... After generate Android application based on YourBundle in destination folder :
- Entity's and ContentProvider's based on YourBundle\Entity class.
- Account based on FOSUser (YourBundle\Entity\User).
- SyncService and SyncAdapter between Account and Provider's.
Base application generated contain some additional class:
- Api class for authentication and communication with Api.
- Authenticator system (include Account login activity and Account service).
- Helper's for Account, Database and Entity
- Various utilities class.
- And a Constant class (root package) that containing features like DB version, API url, ...
Android SDK must be installed !!
Add minimum-stability rule to your composer.json
...
"minimum-stability": "dev",
...Next install AndroidGeneratorBundle using composer
$ composer require kolapsis/androidgenerator-bundleI also advise you to install:
$ composer require friendsofsymfony/rest-bundle
$ composer require lexik/jwt-authentication-bundle- Create your FOSUser class and configure FOSUser
- Create your's Entities in YourBundle\Entity with AndroidAnnotation
- Create your API and configure firewall (being built generator)
- Generate your Android Application with:
$ php bin/console android:create:app YourBundleOr
$ php bin/console generate:android:app YourBundle -t 24 -m 21 -s /opt/android -g 2.2.0 -a MyApp -p ~/workspace/MyApp -d host.com -u http://api.host.comThis bundle is under the BSD 2-Clause license. See the complete license in the bundle:
Resources/meta/LICENSE