|
|
Create an application class and extend `ReveSaaSApplication`.
|
|
|
|
|
|
Declare the application class as name in your android manifest at application tag.
|
|
|
|
|
|
```
|
|
|
<application
|
|
|
...
|
|
|
android:name=".BaseApplication"
|
|
|
...>
|
|
|
...
|
|
|
....
|
|
|
</application>
|
|
|
```
|
|
|
|
|
|
*Override * `onCreate()` method and prepare your app configuration with following data
|
|
|
1. Operator code - Given by REVE
|
|
|
2. User name - the phone number with country code in flat format.
|
|
|
|
|
|
You must call pin creating api with that User name.
|
|
|
|
|
|
**Flat format example :**
|
|
|
|
|
|
Regular format = +8801767-692072
|
|
|
Flat format = 8801767692072
|
|
|
|
|
|
Regular format = 01767-692072
|
|
|
Flat format = 8801767692072
|
|
|
|
|
|
3. Password : password for the user name
|
|
|
|
|
|
4. Default country iso : The country where majority users are in. For example "bd" for Bangladesh.
|
|
|
|
|
|
|
|
|
Finally call
|
|
|
|
|
|
`ReveSaaS.configure(yourConfiguration);`
|
|
|
|
|
|
|
|
|
**Sample code :**
|
|
|
|
|
|
|
|
|
```
|
|
|
public class BaseApplication extends ReveSaaSApplication {
|
|
|
@Override
|
|
|
public void onCreate() {
|
|
|
super.onCreate();
|
|
|
ReveAppConfig config = ReveAppConfig.newBuilder()
|
|
|
.withOpCode(getOperatorCode())
|
|
|
.withUserName(getUserName())
|
|
|
.withPassword(getPassword())
|
|
|
.withDefaultCountry(getDefaultCountry())
|
|
|
.build();
|
|
|
ReveSaaS.configure(config);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onTerminate() {
|
|
|
super.onTerminate();
|
|
|
}
|
|
|
}
|
|
|
``` |