Blacklisted & Whitelisted views
Pre API 2.0
// Register sensitive view(s)
Smartlook.registerBlacklistedView(view: View)
Smartlook.registerBlacklistedViews(views: List<View>)
// Register whitelisted view(s)
Smartlook.registerWhitelistedView(view: View)
Smartlook.registerWhitelistedViews(views: List<View>)
// Unregister sensitive view(s)
Smartlook.unregisterBlacklistedView(view: View)
Smartlook.unregisterBlacklistedViews(views: List<View>)
// Register blacklisted view(s)
Smartlook.registerBlacklistedView(View view);
Smartlook.registerBlacklistedViews(List<View> views);
// Register whitelisted view(s)
Smartlook.registerWhitelistedView(View view);
Smartlook.registerWhitelistedViews(List<View> views);
// Unregister blacklisted view(s)
Smartlook.unregisterBlacklistedView(View view);
Smartlook.unregisterBlacklistedViews(List<View> views);
<View>
<tag android:id="@id/smartlook_blacklisted_view" android:value=""/>
</View>
API 2.0
There are no longer lists of "blacklisted" and "whitelisted" View
s. Sensitivity is explicitly set using a Boolean
value.
sampleView.isSensitive = true|false|null
Smartlook.getInstance().getSensitivity().setViewInstanceSensitivity(sampleView, true|false|null);
<View>
<tag android:id="@id/sl_sensitivity" android:value="true|false"/>
</View>
The "mapping" of the older APIs to the 2.0 is as follows:
- registering
View
as "blacklisted" is equivalent to setting theView
sensitivity totrue
. - registering
View
as "whitelisted" is equivalent to setting theView
sensitivity tofalse
. - unregistering
View
from "blacklisted" is equivalent to setting theView
sensitivity tonull
.
Blacklisted classes
Pre API 2.0
// Register sensitive class(es)
Smartlook.registerBlacklistedClass(class: Class)
Smartlook.registerBlacklistedClasses(classes: List<Class>)
// Unregister sensitive class(es)
Smartlook.unregisterBlacklistedClass(class: Class)
Smartlook.unregisterBlacklistedClasses(classes: List<Class>)
// Register sensitive class(es)
Smartlook.registerBlacklistedClass(Class class);
Smartlook.registerBlacklistedClasses(List<Class> classes);
// Unregister sensitive class(es)
Smartlook.unregisterBlacklistedClass(Class class);
Smartlook.unregisterBlacklistedClasses(List<Class> classes);
API 2.0
There is no longer list of "blacklisted" classes. Sensitivity is explicitly set using a Boolean
value.
TextView::class.isSensitive = true|false|null
Smartlook.getInstance().getSensitivity().setViewClassSensitivity(TextView.class, true|false|null);
The "mapping" of the older APIs to the 2.0 is as follows:
- registering
Class
as "blacklisted" is equivalent to setting theClass
sensitivity totrue
. - unregistering
Class
from "blacklisted" is equivalent to setting theClass
sensitivity tonull
.
No rendering
Pre API 2.0
Smartlook.setRenderingMode(RenderingMode.NO_RENDERING)
Smartlook.setRenderingMode(RenderingMode.NO_RENDERING);
API 2.0
Smartlook.instance.preferences.renderingMode = RenderingMode.NO_RENDERING
Smartlook.getInstance().getPreferences().setRenderingMode(RenderingMode.NO_RENDERING);