Note: Android version >= 7.0 Webview component version >= 53
<code><uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</code>
<code> SaleSmartyInit.init(Context context,String scriptUrl);
</code>
scriptUrl is the inserted js, such as https://assets.salesmartly.com/js/project\_xxxxx.js
<code> SaleSmartyInit.initSaleSmartyView(Activity activity);
</code>
Note: Initialize the browser as early as possible in the Activity
<code> SaleSmartyInit.addSaleSmartyView(ViewGroup viewGroup);
</code>
Note: The Activity where the added parent layout is located must be consistent with the Activity that executes the initialization of the salesmarty web page
<code> SaleSmartyInit.uploadUserMessage(String user_id,
String user_name,
String language,
String phone,
String email,
String description,
String[] label_names);
</code>
Note: Uploading user information does not support callbacks at the moment, user_id and user_name are required
<code> SaleSmartyInit.openSaleSmartyView();
</code>
<code> SaleSmartyInit.closeSaleSmartyView();
</code>
<code> SaleSmartyInit.setUnReadMessagesListener(c var0);
</code>
Note: The parameter c interface will return an int value, which is the number of unread messages.
<code> SaleSmartyInit.upLoadFiles(int requestCode,Intent var0);
</code>
Note: SaleSmartyInit should be called in the onActivityResult of the Activity that initializes the salesmarty web page
<code> SaleSmartyInit.setOnReadyListener(c var0);
</code>
<code> SaleSmartyInit.setOnOpenSaleSmartyViewListener(c var0);
// 1.2.0版本默认执行打开操作
</code>
<code> SaleSmartyInit.setOnCloseSaleSmartyViewListener(c var0);
</code>