dependencies {
implementation 'com.google.android.gms:play-services-appset:16.0.2'
//Get the latest version from https://mvnrepository.com/artifact/com.igaworks.dfinery/android-sdk
implementation 'com.igaworks.dfinery:android-sdk:HERE_LATEST_VERSION'
}
dependencies {
implementation("com.google.android.gms:play-services-appset:16.0.2")
//Get the latest version from https://mvnrepository.com/artifact/com.igaworks.dfinery/android-sdk
implementation("com.igaworks.dfinery:android-sdk:HERE_LATEST_VERSION")
}
SDK 초기화
초기화 하기
앱에서 DFINERY SDK를 초기화하려면 다음 단계를 완료하세요.
1. Application을 상속한 객체를 생성합니다. 상속한 객체가 이미 있을 경우 해당 객체를 사용합니다.
public class BaseApplication extends Application
class BaseApplication: Application()
@Override
public void onCreate() {
super.onCreate();
}
override fun onCreate() {
super.onCreate()
}
3. onCreate() 메소드 내에 다음 코드를 작성합니다.
Dfinery.getInstance().init(this, "SERVICE_KEY");
Dfinery.getInstance().init(this, "SERVICE_KEY")
다음 코드 스니펫은 초기화 작성 완료 시의 예를 보여줍니다.
public class BaseApplication extends Application{
@Override
public void onCreate() {
super.onCreate();
Dfinery.getInstance().init(this, "SERVICE_KEY");
}
}
class BaseApplication: Application(){
override fun onCreate() {
super.onCreate()
Dfinery.getInstance().init(this, "SERVICE_KEY")
}
}