Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// build.gradle
android {
    ...
    ...
}

dependencies {
   // implementation files('libs/캐시버튼_SDK_파일명.aar')
    implementation files('libs/avatye_cashbutton_v1.2.0.aar')
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0-alpha03'
    implementation 'com.google.android.gms:play-services-basement:17.4.0'
    implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
    implementation 'joda-time:joda-time:2.10.5'
    implementation 'com.google.zxing:core:3.4.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    /** Buzzvill sdk */
    implementation("com.buzzvil:buzzad-benefit:2.9.1") {
        exclude group: 'com.buzzvil', module: 'buzzad-benefit-pop'
        exclude group: 'com.buzzvil', module: 'buzzad-benefit-notification'
    }
    /** mobon sdk */
    implementation('com.mobon.sdk:com.mobon.sdk:1.0.4.18') {
        transitive = true
        exclude group: 'com.google.android.gms'
    }
    /** service-channeltalk */
    implementation ('com.zoyi.channel:plugin-android:7.2.0'){
        exclude group: "androidx.gridlayout", module: 'gridlayout'
    }
    
    /** igaworks ssp sdk & mediation */
    implementation 'com.igaworks.ssp:IgawAdPopcornSSP:2.4.2'

    /** ad-mediation-group (unityads,adcolony,vungle,fyber,facebook) */
    implementation 'com.unity3d.ads:unity-ads:3.4.8'
    implementation 'com.adcolony:sdk:4.2.2'
    implementation 'com.vungle:publisher-sdk-android:6.7.1'
    implementation "com.fyber.vamp:core-sdk:7.7.2"
    implementation "com.fyber.vamp:video-kit:7.7.2"
    implementation "com.fyber.vamp:mraid-kit:7.7.2"
    implementation 'com.facebook.android:audience-network-sdk:6.2.0'
    implementation "com.kakao.adfit:ads-base:3.4.0"

    /** androidx.appcompat:appcompat:x.x.x 을 사용하고 있지 않을 경우 추가 필요 */
    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
}

...

항목

정보

org.jetbrains.kotlin:kotlin-stdlib-jdk7

Kotlin 언어 모듈

com.google.android.material:material

Material components for Android from google

com.google.android.gms:play-services-basement

google play service
google advertise identifier service

com.google.android.gms:play-services-ads-identifier

joda-time:joda-time

Joda-Time providers a quality replacement for the java date and time classes.

com.google.zxing:core

barcode image processing library

com.github.bumptech.glide:*.*

image loading framework

com.zoyi.channel:plugin-android

캐시 버튼 실시간 문의 대응 모듈

com.buzzvil:buzzad-benefit

AD NETWORK

com.unity3d.ads:unity-ads

com.adcolony:sdkcom.vungle:publisher-sdk-android

androidx.localbroadcastmanager:localbroadcastmanager

androidx.appcompat:appcompat

Info

위 패키지를 사용하지 않을 경우만 추가 합니다.

...

항목

코드

호출위치

세부내용

캐시버튼 SDK 초기화

  • CashButtonConfig.initialize()

  • CashNotifyModel()

CashButtonConfig.initializer(
Application application,
CashButtonPosition position,
CashNotifyModel notifyModel
)

  • Application Class

    • onCreate()

Note

Application Class를 사용하고 있지 않았다면, 캐시버튼 SDK 연동을 위해 AndroidManifest.xml에 해당 Application Class를 생성하고 등록해야 합니다.

  • parameters

    • application : Application context를 this로 입력합니다.

    • position : 캐시 버튼의 위치

      • CashButtonPosition.END : 오른쪽

      • CashButtonPosition.START : 왼쪽

    • notifyModel : 노티바 설정값 (아래 CashNotifyModel 참고)

CashNotifyModel(
Context context,
boolean allowNotify,
String name,
int appIconResourceId,
int statusIconResourceId
)

  • Application Class

    • onCreate()

      • CashButtonConfig.initialize()

CashButtonConfig.initialize() 함수에 들어가는 데이터 클래스

  • parameters

    • context : activity context를 this로 입력합니다.

    • allowNofity : 노티바 노출을 설정합니다.

      • true : 노티바 노출

      • false : 노티바 미노출

    • name : 앱의 이름을 입력합니다.

    • appIconResourceId : 노티바 아이콘 리소스 id

      • 0 → 캐시버튼의 기본 아이콘 노출

    • statusIconResourceId : 상단 상태바 아이콘 리소스 id

      • 0 → 캐시버튼의 기본 아이콘 노출

캐시버튼 SDK 시작

  • CashButtonLayout.init()

CashButtonLayout.init(
Activity activity,
ICashButtonListener callback
)

  • 앱의 메인 액티비티에 추가

  • MainActivity

    • onCreate()

  • parameters

    • activity : activity를 this로 입력합니다. (별도 변수로 전달 해도 무방)

    • callback : 결과 Interface

      • onSuccess(CashButtonLayout cashbuttonLayout)

Info

onCreate() → setContentView(…) 후에 위치해야 하며, 해당 함수 마지막에 위치 바랍니다.

캐시버튼 Dock 상태

  • CashButtonLayout.init() → cashButtonLayout View

boolean cashButtonLayout.getDockState()

  • CashButtonLayout.init()

    • callback 으로 전달된 cashbuttonLayout

  • return type - boolean

    • true → EXPANDED(확장)

    • false → HIDDEN(감춤)

void cashButtonLayout.setDockState(boolean isExpanded)

  • parameters - boolean

    • isExpanded

      • true → EXPANDED(확장)

      • false → HIDDEN(감춤)

캐시버튼 Visibility

  • CashButtonLayout.init() → cashButtonLayout View

void setCashButtonHide()

  • CashButtonLayout.init()

    • callback 으로 전달된 cashbuttonLayout

CashButton → Visible.Gone

void setCashButtonShow()

CashButton → Visible.View

...

Code Block
languagejava
// App
public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        ...
        /** cash-button initializer */
        CashNotifyModel notifyModel = new CashNotifyModel(this, true, "앱명", 0, 0);
        CashButtonConfig.initializer(this, CashButtonPosition.END, notifyModel);
    }
}
// AndroidManifest.xml
<manifest ... >
    <application
          android:name=".App"
          ...
          ...
</manifest>

...