Installing Android SDK video: Installing Android SDK requires several very easy steps. Xcopy Android SDK uses OpenUDID (which comes ready with the zip file). First, you need to make sure that OpenUDID requirements are met, following the steps below:

1 Add OpenUDID_manager.java and OpenUDID_service.java to your project under Eclipse.

Add this to your manifest:

    <service android:name="org.openudid.OpenUDID_service">
            <intent-filter>
            <action android:name="org.openudid.GETUDID" />
            </intent-filter>
    </service>

2 Add main Xcopy SDK to your project using steps below:

Add Xcopy.java to your project under Eclipse. Rename package names in OpenUDID_manager.java, OpenUDID_service.java and XCopy.java for your needs.

Call

    Xcopy.sharedInstance().init(context, "https://app.xcopy.co", "YOUR_APP_KEY")

in

    onCreate method

which requires your App key.

XCopy provides very flexible possibilities to use its model.

1 One of the common and popular use - is to start using our service from the very start of your app. For that puprose create another activity and set it as main, so that when your app starts, this activity appears first. Create any layout you like in this activity, any look-and-feel and style. The only requirement is to ask user to enter an APIKEY or to get one. The APIKEY being entered will be checked via service.

For that purpose you should call a function

    checkKey(APIKEY)

which is located in

    XCopy.java file. 

Function returns false if user entered incorrect apikey or true if apikey is valid. If the apikey is correct you should start your main activity, closing the activity of checking.

For that purpose you call

    Xcopy.sharedInstance().onStart()

in

onStart event of your app's activity. 

Since that time the timer started.

Also call

    Xcopy.sharedInstance().onStop()

in

    onStop event of your app's activity 

to stopc the timer.

The example of such checking activity can be found in our sdk.

The file of the activity

    GetApiKeyActivity.java

and it's layout

    get_api_key.xml

2 Another usage of our sdk can be in such case: a user plays, for example, a game, without asking for any apikeys. But when he achieves or passes some level, a windows for entering APIKEY appears. And user cannot continue playing without entering a correct apikey.

For that purpose call

    Xcopy.sharedInstance().onStart()

in any place of your app (where the level ends or achievement got etc...).

And don't forget to call Xcopy.sharedInstance().onStop()

in

    onStop event of your app's activity 

to stop the timer.

3 You may also use our model in situations, when you might want the user to take some slow actions. For example, a user plays a game, our sdk is implemented by 1-st type. But when a player passes some level, he, for example, goes into in-app shop to buy some stuff. In this case you may want to stop timer not hurry user.

Just call

    Xcopy.sharedInstance().onStop()

in such situation.

Call

    Xcopy.sharedInstance().onStart()

again when a user quits shop.

In any case make sure that INTERNET permission is set if there's none in your manifest file!

Note:

Make sure you use App Key (found under Management -> Applications) and not API Key. Entering API Key will not work.

Note2:

Call init only once during onCreate of main activity. After that, for each onStart and onStop for each activity, call Xcopy onStart and onStop.