Huvle SDK Integration Manual1. Android Studio1-1. Library Module Import1-2. Library Path Setup2. AndroidManifest Setup2-1. Single Instance2-2. usesCleartextTraffic2-3. Permission2-4. Application3. Proguard Setup4. Huvle SDK Integration4-1. Huvle SDK Integration API4-2. Huvle SDK Integration API Call4-3. Huvle SDK Execution 5. Video Guide

Huvle SDK Integration Manual

1. Android Studio


1-1. Library Module Import


 

 

 

 

 

 

 

 

 

 

 

1-2. Library Path Setup


If AndroidManifest.xml and MainActivity can not refer to the Huvle Library Project even if Huvle Library Project has been imported normally and implemented into dependencies ,

Please add the path of jar used by Huvle Library Project of dependencies in build.gradle(Module:app) file

 

Example Library Path Setup [build.gradle(Module:app)/dependencies]


 

You should set the Library Path in accordance with your app's folder structure and Library version

 

2. AndroidManifest Setup


2-1. Single Instance


If you execute your app without exiting Huvle browser after executed the browser, the Huvle browser will be executed instead of your MainActivity

 

EX ) When Sigle Instance and clearTaskOnLaunch Properties aren't applied

  1. Execute Huvle browser
  2. Select home button
  3. Execute your App
  4. Huvle browser will be executed instead of your app

 

To execute your app always, please add android:launchMode="singleInstance" and android:clearTaskOnLaunch="true" info to MainActivity

 

Example Code [AndroidManifest.xml]


 

Add above codes into Activity which is executed as <action android:name="android.intent.action.MAIN" />

 

 

2-2. usesCleartextTraffic


If your application has Target SDK Version above '26', when Huvle browser is executed, it can't load http web page, not https . To solve the problem, you must set android:userCleartextTraffic property of the application property info in the AndroidManifest.xml file as true

 

Example Code [AndroidManifest.xml]


 

 

2-3. Permission


Huvle Browser Permissions are as below, You must add all permissions info

 

Example Code [AndroidManifest.xml]


 

 

2-4. Application


Huvle SDK's Component info are as below

You must add all Component info into <application> of AndroidManifest.xml

 

From version 3.0.17, some of application's contents has been changed

When you try to update your app, Please check the changed things

 

Example Code [AndroidManifest.xml]


 

 

3. Proguard Setup


If you use proguard in your app project, Please make Huvle SDK in the proguard-rules.pro file be the exception as below

 

Example Code [proguard-rules.pro]


 

 

4. Huvle SDK Integration


4-1. Huvle SDK Integration API

Type Definition
Context this
You must specify the context information as this, not getApplicationContext().
String Agent Key
If you contract with Huvle through the network company, please contact them to ask about the Agent Key. If you contract directly, please use the same Agent Key that was created when you joined agent.huvle.com
Boolean Notibar Status
This is the setting value to specify whether to use Huvle Notification Bar in the notification area (Default : true)
Boolean Searchbar Status
This is setting value to specify whether to use the Huvle Browser’s Search Box (Default :true)

 

 

4-2. Huvle SDK Integration API Call


To call Huvle SDK Integration API, you must acquire Read and Write files permission as essential

Example Code[MainActivity.java]


 

Why is the Read and Write files permission essential ?


To prevent Huvle Noti-bar from output overlap when one device has many apps integrated with Huvle SDK, The integrated Package info has been managed as files

Also, Huvle browser setup info has been managed as files to provide same browser setup info to users if they change the setup info of Huvle browser

 

 

4-3. Huvle SDK Execution


When your app is executed after integrated with Huvle Library, Huvle SDK Noti-bar will be created as following scenario

 

 

4-3-1. Acquisition Process of Permissions[MainActivity:onCreate( )]


 

 

 

4-3-2. Approval Window Output After Acquired Permissions[MainActivity:onResume( )]


 

If above approval window can't be outputted normally, Please refer Huvle Approval Window Error Page from the 'Solve the Error' page

 

 

4-3-3. Huvle Noti-bar Output


 

If above approval window is outputted normally and then an user checks the 'allow' but Huvle Noti-Bar can't be outputted normally, Please check the below

 

 

 

4-3-4. Huvle Browser Execution


Once Huvle Noti-bar is outputted normally, push Web Search button of Huvle Noti-bar to check whether Huvle Browser is executed normally

 

 

 

 

If Huvle browser is executed but the web page info can't be found as below, Please check whether Integration Manual 3-2.  useCleartextTraffic Property is set correctly

 

You must test on the device which has OS above 28, and then check whether the web page is loaded normally

 


 

 

5. Video Guide