Huvle API Document1. Noti-bar Setup1-1. Noti-bar On/Off1-2. Noti-bar Lock Screen Setup1-3. Custom Noti-bar1-3-1. Icon Modification1-3-2. Text Modification1-3-2. Layout Setup1-3-4. Event Setup2. Huvle Browser2-1. Browser Integration API3. Approval Window Modification3-1. Image Modification3-2. Layout Structure Modification 3-3. Approval Window Output Setup
Huvle SDK provides API to enable the partner app to develop Huvle Noti-bar On/Off function from its setup menu
Noti-bar On API
public static void notiUpdate(Context context)
Noti-bar Off API
public static void notiCancel(Context context)
Noti-bar Status API
public static boolean isNotiBarState(Context context)
true: Noti-bar On (Default)
false: Noti-bar Off
If you need to provide Huvle Noti-bar On/Off function via your setup menu, Please checke Huvle Noti-bar status info and then implement On/Off toggle as below
Example Code
x... boolean currentStatus = Sap_Func.isNotiBarState(this);if(currentStatus) { Sap_Func.notiCancel(this);} else { Sap_Func.notiUpdate(this);}...
Below API info manage the status info which can set whether Huvle SDK's Noti-bar is exposed or not on the lock screen
Lock Screen Setup API
public static void setNotiBarLockScreen(Context context, boolean state)
Lock Screen Status Information API
public static boolean isNotiBarLockScreen(Context context)
true: Lock Screen Exposure (Default)
false: Lock Screen Non-exposure
You can set the lock screen status info as false as below only when you want
that Huvle Noti-bar won't be outputted on the lock screen
Example Code
...public void onResume() { super.onResume(); if(checkPermission()) { //-- Check the Lock Screen Setup Sap_Func.setNotiBarLockScreen(this, false); //-- Huvle Integration API Sap_act_main_launcher.initsapStart(this, "bynetwork", true, true); }}...
To implement
setNotiBarLockScreen( )method correctly, you must callsetNotiBarLockScreen( )method before calling Huvle SDK Integration APISome devices' above setup info might not work well because of difference between each cell phone manufacturer
Huvle SDK provides Custom Noti-bar function to create optimized Noti-bar for partner app. Basic shape of Noti-bar is as below. If you want to customize Huvle Noti-bar by yourselves, you can modify 'Icon', 'Text', 'Event info'

Huvle Noti-bar Icon Path of Huvle SDK is as below
Detail Path : ../Stealthaddplatformbrowser_lib/src/main/res/drawable-xxhdpi
Make the Icon images that you want to use and then overwrite them as
notibar_icon_1 ~ notibar_icon_5

The sixth erea of Noti-bar is the unique erea of Huvle SDK. DO NOT CHANGE notibar_icon_6 image
Example
For example, if you make new notibar_icon_1 image and then overwrite it,
Noti-bar icon can be changed
Ex ) Overwrite

EX ) Result Screen

You can modify string.xml file to change the text at the bottom of Noti-bar
Huvle Library supports
ENGLISH,KOREAN,CHINESE,VIETNAMESE,JAPANESE. You can modify string.xml file from values of res folder in Huvle LibraryDefault Language is
ENGLISH

The item property info regarding Huvle Noti-bar are noti_icon_1 ~ noti_icon_5
as below
If you modify each item's text, the text of Huvle Noti-bar will be changed
...<!-- Custom NotiBar --><string name="noti_icon_1">Call</string><string name="noti_icon_2">Camera</string><string name="noti_icon_3">Calculator</string><string name="noti_icon_4">Calendar</string><string name="noti_icon_5">Alarm</string>...
Example
For example, if you want to change the first item's text of Huvle Noti-bar, you can modify as below
...<!-- change the text from Call into Huvle App --><string name="noti_icon_1">Huvle App</string><string name="noti_icon_2">Camera</string><string name="noti_icon_3">Calculator</string><string name="noti_icon_4">Calendar</string><string name="noti_icon_5">Alarm</string>...

If you changed the text of Huvle Noti-bar, please modify all language files -
ENGLISH,KOREAN,CHINESE,VIETNAMESE,JAPANESE- supported by Huvle SDK to prevent errorWhen you changed the text, you must modify all stirng.xml files of all languages(English, Korean, Chinese, Vietnamese, Japanese)
If you need to modify a gap or a background image of Huvle Noti-bar. you can modify lay_sap_act_noti.xml
file so that can get Huvle Noti-bar arrangement which you want
Detail Path : ../Stealthaddplatformbrowser_lib/src/main/res/layout/lay_sap_act_noti.xml

DO NOT CHANGE the id info. The id processes the event by being referred from class file
Sap_act_middle.class file processes the event of Huvle Noti-bar
When you select each button of Noti-bar, Sap_act_middle.class will be
implemented and NT_001 ~ NT_005 will be delivered to distinguish
each button

If you Click the button of Huvle Noti-bar, startPackage( ) method defined by
Sap_act_middle.class will be called. You can change the Action info as you want
to execute by modifying switch inquiry method info
startPackage( )
case
NT_001: Code location when you select the first icon of Noti-Barcase
NT_002: Code location when you select the second icon of Noti-Barcase
NT_003: Code location when you select the third icon of Noti-Barcase
NT_004: Code location when you select the fourth icon of Noti-Barcase
NT_005: Code location when you select the fifth icon of Noti-Bar
/** * Setting Custom Notification Bar * @param intent */ private void startPackage(Intent intent) { try { if(intent!=null) { String NT_NUMBER = intent.getStringExtra(EXTRA_START_NUMBER); if(NT_NUMBER!=null && NT_NUMBER.isEmpty()==false) { switch (NT_NUMBER) { //-- Custom case NT_001: startCustom(getPackageName(), "com.byappsoft.sap.browser.Sap_MainActivity"); break; //-- Camera case NT_002: startCamera(this, NT_002); break; //-- Calendar case NT_003: startCalendar(this, NT_003); break; //-- Alarm case NT_004: startAlarm(this, NT_004); break; //-- Settings case NT_005: startSetting(this, NT_005); break; default: clearMiddle(this); break; } } else { clearMiddle(this); } } else { clearMiddle(this); } }catch (Exception e){ clearMiddle(this); } } ...
Please redefine the action as you want to execute when you click the
icon(button)of Huvle Noti-barNote: The sixth icon is unique erea for Huvle browser execution. You can't modify it
Sap_MainActivity.class file is Main Activity Info for Huvle browser execution
If you want to execute Huvle browser from your app, you can do it by creating
Intent info to execute Sap_MainActivity.class
Example Code
x
... Intent intent = new Intent(MainActivity.this, Sap_MainActivity.class);intent.putExtra("search_keyword", "https://www.google.com/");intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);startActivity(intent);...
If you want to load certain URL by Huvle browser execution, Please include the
search_keywordinfo inintentinfo and then deliver
Like below 'By Pet App', if you make browser shortcut inside your app, it will get a more favorable position to expose ads

When you use the shortcut, you will make your UI by yourselves
Because Huvle SDK supports ENGLISH, KOREAN, CHINESE,
VIETNAMESE, JAPANESE, there are five approval window image files.
Detail path of approval window is as below
../Stealthaddplatformbrowser_lib/src/main/res/drawable-xxhdpi
Englishfile name : res_sap_notiba_img_en.png
Koreanfile name : res_sap_notiba_img_ko.png
Chinesefile name : res_sap_notiba_img_cn.png
Vietnamesefile name : res_sap_notiba_img_vi.png
Japanesefile name : res_sap_notiba_img_ja.png
After made each language's window image icon, overwrite them as below
lay_sap_act_pop.xml file is xml file which is used for Huvle approval window
dialog
If you wand to change the layout structure of approval window, you can modify lay_sap_act_pop.xml
file
Detail Path : ../Stealthaddplatformbrowser_lib/src/main/res/layout/llay_sap_act_pop.xml
Because the Sap_act_main_laucher.class called for integration is provided as the
open source format, you can modify the source as you want on your end
Initial Approval Window Output API
public static void isNotibarPopState(Context context)
Sap_Fun.isNotibarPopState( ) method can check whether initial approval window is
outputted for initial user. Only when the window couldn't be outputted, it can create
dialog to output the approval window
If you want to execute Huvle API from your app directly and without approval window, you can
comment the codes regarding dialog creation and then directly call the
initSapstartapp method of Sap_act_main.class as below example code
Example Code
... Sap_act_main.initSapStartapp(context, sAgkey, Sap_Func.isNotiBarState(context), URLSEARCH);...
You must call Sap_act_main.initSapStartapp( ) method