DEVELOPER GUIDE

Welcome to Lazeeva – Let’s start!

Follow our step by step Guide to become part of our App Store. After you have completed the below steps upload your modified App here.

What do you need to change and why

I. Mandatory for ALL apps on Lazeeva: Change in the App manifest

Privacy feature: Lazeeva has an App shelf where all apps downloaded by the end user are automatically stored. This means that users can enjoy your app without being afraid that any unauthorized people see his apps.

II. For all apps that offer In-App purchases: Implementation of the payment SDK

In-App Payments: In order to enable In-App purchases for the end users you need to implement the Lazeeva payment SDK

Ad. I. Mandatory for All apps on Lazeeva (Modify Your App Manifest: MANDATORY for all Apps)
1.Remove this line from the Manifest file:

<intent-filter>

<action android:name=”android.intent.action.MAIN” />

<category android:name=”android.intent.category.LAUNCHER” />

</intent-filter>

2. Add the following line to your Manifest file:

<intent-filter>

<action android:name=”com.lazeeva.android.intent.action.MAIN” />

<category android:name=”com.lazeeva.android.intent.category.LAUNCHER” />

</intent-filter>

Here is a simple example of a Manifest File, already modified to be used for Apps distributed over Lazeeva App store:

<?xml version=”1.0″ encoding=”utf-8″?>

<manifest xmlns:android=”http://schemas.android.com/apk/res/android”

package=”xy.example.com”>

 

<uses-permission android:name=”android.permission.INTERNET” />

………

 

<application

android:allowBackup=”true”

android:icon=”@mipmap/ic_launcher”

android:label=”@string/app_name”

android:supportsRtl=”true”

android:theme=”@style/AppTheme”>

<activity android:name=”.MainActivity”>

<intent-filter>

<action android:name=”com.lazeeva.android.intent.action.MAIN” />

<category android:name=”com.lazeeva.android.intent.category.LAUNCHER” />

</intent-filter>

</activity>

</application>

</manifest>

Ad. II. Apps that Offer In App Purchases (You NEED to install the Lazeeva Library = Payment SDK)
Please contact us at content@lazeeva.com so that we can provide you with the Lazeeva SDK file.
1. Set Up:

The Lazeeva Library needs to be added as a library to your App Project. Put Lazeeva in libs folder in you project and add this line to your build.gradle file.

dependencies {

compile fileTree(dir: ‘libs’, include: [‘*.jar’])

}

2. Extend Application class and initialize Lazeeva SDK with app secret (please ask Lazeeva to give you your app_secret ID).

public class App extends Application {

 

@Override

public void onCreate() {

super.onCreate();

Lazeeva.init(“APP SECRET GOES HERE”);

}
}

Set App as application class in manifest

<application

android:name=”.App”

Get user

User user = Lazeeva.get(context).getUser();

Get user logged in to Lazeeva app with this method.
This method can return null if user is not logged in.

Login

If user is not logged in, you can open Lazeeva Store app login activity.
This method can return null if user is not logged in.

Lazeeva.login(context);

If Lazeeva Store app is installed, this will open login activity.
You have to return the login result to Lazeeva SDK

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Lazeeva.get(context).onActivityResult(requestCode, resultCode, data);
super.onActivityResult(requestCode, resultCode, data);
}

Get pearls

You can get the amount of pearls for user with user.getPearls()

User user = Lazeeva.get(context).getUser();

int pearls = user.getPearls();

Spend pearls

Spend pearls by calling this method – user for purchases inside publisher app (in app purchase).

Lazeeva.get(context).buyItem(activity, “KEY”, “Description”, amount);

The library will try to communicate with Lazeeva Store app and make a purchase.

Buy pearls

Lazeeva.get(context).buyPearls(activity, amount);

This method will open Lazeeva pearls packages activity. Should be used in case user has not enough Pearls on his account in order to do purchase inside publisher app (in app purchase).

Callbacks

You can get callbacks from previous two methods in onActivityResult.

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
boolean lazeevaResult = Lazeeva.get(this).onActivityResult(requestCode, resultCode, data);
if (lazeevaResult) {
if (requestCode == Lazeeva.REQ_USER_LOGIN) {
mUser = Lazeeva.get(this).getUser();
updateUI();
}
if (requestCode == Lazeeva.REQ_BUY_PEARLS) {
mUser = Lazeeva.get(this).getUser();
updateUI();
}
if (requestCode == Lazeeva.REQ_BUY_ITEM) {
mUser = Lazeeva.get(this).getUser();
updateUI();
}
return;
}
super.onActivityResult(requestCode, resultCode, data);
}

For in-app purchases, in callback result Intent data you will get extra bundle with these keys

» error_code
» error_message
» app_secret
» product_key
» product_description
» amount

Check our library documentation for more details.

IMPORTANT

 

In case of new/ updated versions of your Apps (new .APK) please make sure to increase the embedded Version Code. The Lazeeva System does not accept two versions with the same Version Code (same as on Google Play Store).