avimobilelib

Creator: coderz1093

Last updated:

0 purchases

avimobilelib Image
avimobilelib Images

Languages

Categories

Add to Cart

Description:

avimobilelib

avimobilelib #
Library for accessing the AVI API.
For more information regarding AVI and its services, visit aviapp.mx
Initializing the library #
Avi avi = Avi(context);
avi.init(
// API Key
"12345abcde",
// Secret
"abcde12345",
// Sandbox flag
true,
// Google API key for Google Maps and Google Places (must be included in the Android manifest)
"AIzaxxxxxxxxxxxxxxxxxx"
);
copied to clipboard
Once the library is initialized you can recover the Avi abject by the static shared property.
Avi avi = Avi.shared;
copied to clipboard
Checking for an existing session #
Avi.shared.getSession().then((aviUser) {
if(aviUser != null)
{
// A session exists
}
else
{
// No session
}
});
copied to clipboard
Login a user #
Create the AviUser object with the user credentials
AviUser aviUser = AviUser();
aviUser.name = "Alex";
aviUser.lastName = "Del Piero";
aviUser.email = "[email protected]";
aviUser.telephone = "1234567890";
copied to clipboard
Pass that AviUser object to the login method
Avi.shared.login(aviUser).then((aviUser) {
if (aviUser != null)
{
// Login successful
}
});
copied to clipboard
Logout current user #
Avi.shared.logout().then((ok) {
if (ok)
{
// Logout successful
}
});
copied to clipboard
Show the AVI widget #
The AVI widget handles the request of services, cancellations of services and tracking of running services (A user must be logged in).
Avi.shared.showMainWidget();
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.