한국어   English

Huvle SDK Install Guide

You can easily integrate your app with Huvle SDK by using the sample code. You can also integrate your app with Huvle SDK in Flutter or Unity 3D development environment 
The latest version of Huvle SDK is 4.1.1 You can check all contents once you download "Sample App" at the bottom of this page

Shortcuts

Manifest

- If you target Android 10 (API 29) or higher, set the value of android:requestLegacyExternalStorage to true

<application
	android:allowBackup="true"
	android:requestLegacyExternalStorage="true"
	android:icon="@mipmap/ic_launcher"
	android:label="@string/app_name"
	android:roundIcon="@mipmap/ic_launcher_round"
	android:supportsRtl="true"
	android:theme="@style/AppTheme">

- Add launchMode and clearTaskOnLaunch

<activity
	android:name=".MainActivity"
	android:launchMode="singleInstance"
	android:clearTaskOnLaunch="true">

build.gradle(Project)

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            name "Huvle"
            url "https://sdk.huvle.com/repository/internal"
        }
    }
}

build.gradle(app)

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'com.google.android.gms:play-services-ads:20.4.0'
    implementation 'com.byappsoft.sap:HuvleSDK:4.1.1'
}

- Using Android Studio 4.1(com.android.tools.build:gradle:4.1.0), please add ‘native-debug-symbols.zip’ on Automatic Generation and refer to the URL below for the lower versions

buildTypes {
	...
    debug {
        ndk {
            debugSymbolLevel 'SYMBOL_TABLE'
        }
    release {
        ndk {
            debugSymbolLevel 'SYMBOL_TABLE'
        }
	...
}
Updating the app, how to process an Alert(warning sign) related with Native Conflict
  - When you apply it like the code above, ‘project\app\build\outputs\native-debug-symbols\debug\native-debug-symbols.zip’ to be generated. - When you update the app on Google Console, please upload the file ‘app bundle seeker > copyrights > native-debug-symbols > native-debug-symbols.zip’ of the app - Reference : https://developer.android.com/studio/build/shrink-code?hl=ko#native-crash-support

MainActivity(Your main activity)

- onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate( savedInstanceState );
	setContentView( R.layout.activity_main );

	if(!checkPermission()){
		requestSapPermissions();
	}
}

- onResume

@Override
public void onResume() {
	super.onResume();

	if(checkPermission()){
		Sap_Func.setNotiBarLockScreen(this, false);
		Sap_act_main_launcher.initsapStart(this, "bynetwork", true, true);
	}
}
Sap_act_main_launcher.initsapStart(this, "Agentkey", true, true); You can ask Agent key info to the network company or if you run an independent company, just enter the same ID you used to register at http://agent.huvle.com

- Add Permission settings

private boolean checkPermission(){
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
		return checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED && checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
	}
	return true;
}

private void requestSapPermissions() {
	try{
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
		  requestPermissions(new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE}, 0);
	}catch (Exception ignored){
	}
}

proguard-rules.pro

-keep class com.byappsoft.sap.**{*;}
-dontwarn com.byappsoft.sap.**

Download Sample App

You can check all contents in this page from sample apps.
- Basic SDK sample : http://api.huvleview.com/ko/downloads/HuvleSDK.zip
- Flutter sample : http://api.huvleview.com/ko/downloads/huvleflutter.zip
- Unity3D sample : http://api.huvleview.com/ko/downloads/huvleunity.zip

When you customize Notification-bar/Approval window(It is applied in the sample app, when you do not customize, the process below is not necessary.)

- Add com\byappsoft\sap\CustomNotibarConfig.java into your app and then change
  (When you use normal mode, all comment out or do not add it.)
​
- Method regarding to Approval window
	getNotibarPopupBg()
​
- Method regarding to Notification-bar
	Notification-bar icon : getNotibarIcon() ~ getNotibarIcon5()
	Notification-bar text : getNotibarString1() ~ getNotibarString5()
	Corresponding action : callNotibar1() ~ callNotibar5()
[See Previous Guide Page]