yagmurerdogan / Meshkraft-Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meshkraft-Android

Platform

ART Labs introduces tailor-made AR-commerce. A specially designed, effortless, 3D-powered boost for eCommerce.

Installation

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
dependencies {
        implementation 'com.github.ARTLabs-Engineering.Meshkraft-Android:meshkraft:1.3.0'
	}

Usage

Kotlin

  1. Add The Following Application class.
class MyApplication:Application() {
    override fun onCreate() {
        super.onCreate()
         Meshkraft.setApiKey("YOUR_API_KEY")
    }

}

Make sure to replace YOUR_API_KEY with your application token.

AR Session

 Meshkraft.startArSession(
 context,
 "productSKU",
 mode, // not required
 listener=object:IMeshkraftState{
    override fun onLoading() {
        // on loading
    }

    override fun onFail(message: String) {
        // any fail on session
    }

    override fun onFinish() {
        // session done. started intent
    }
 }

or can use basic starter

 Meshkraft.startBasicArSession(context, "productSKU")

Java

  1. Add The Following Application class.
public class MainActivity extends Activity  {
        @Override
        protected void onCreate(@Nullable Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

            Meshkraft.INSTANCE.setApiKey("YOUR_API_KEY");
        }
}

Make sure to replace YOUR_API_KEY with your application token.

AR Session

Meshkraft.INSTANCE.startArSession(
                context,
                "productSKU",
                mode,// nullable
                new IMeshkraftState() {
                    @Override
                    public void onLoading() {
                        // Loading State
                    }

                    @Override
                    public void onFail(@NonNull String message) {
                        // onFail state
                    }

                    @Override
                    public void onFinish() {
                        // finish session
                    }
                }
        );

or can use basic starter

    Meshkraft.INSTANCE.startBasicArSession(context,"productSKU");

About


Languages

Language:Kotlin 91.3%Language:Java 8.7%