How to integrate the fraud prevention profiler on Android.
nethonesdk-android-{your_company_name}
repository.https://nethone.jfrog.io/artifactory/nethonesdk-android-{your_company_name}
nethonesdk-android-{your_company_name}
repository.library-{version}.aar
.{your_app_module's_directory}/lib
.android.os.Process.isIsolated()
method.
Profiler.initialize()
.
The initialize method can only be called once. Any subsequent calls will throw an exception.
attemptReference
is a unique, single-use identifier used to identify a specific profiling attempt which is generated automatically by the SDK. Your server will use this reference to enquire Nethone about the status of the attempt.
On mobile platforms, it starts with a mznx-
prefix, for example mznx-8c00d909-9f92-4b83-a5b2-7b65b07c704f
.
Profiler.begin(ProfilerOptions options)
method. Calling this method results in Listener.onBegin(String attemptReference)
being called.
In addition, you can add the class ProfilerOptions
allows you to customize the profiling session with the available version options differ per version.
Profiler.finish()
method makes sure that the necessary data has reached us and ends the attempt. Calling this method results in Listener.onSuccess(String attemptReference)
being executed.
Profiler.cancel()
method immediately cancels the current profiling attempt. Calling this method results in Listener.onCancel()
being executed.
RegisterMode.SENSITIVE
mode.TextView
data will be gathered during the profiling session.
To register a TextView
, you need to use the registerTextView
and add the following arguments:
textView
– the TextView’s object name.mode
type
– type of the TextView format.Profiler.dispatchTouchEvent(ev)
method.
Profiler.setLogLevel(int level)
method. It supports the following values:
0
– Off1
– Fatal2
– Error3
– Warn4
– Info5
– DebugACCESS_COARSE_LOCATION
– Data from the most battery-efficient non-GPS provider available.ACCESS_FINE_LOCATION
– GPS data in reporting user location.manifest
requestPermissionLauncher
variable in your activity.
manifest
tag:
requestPermissionLauncher
variable in your activity.
Listener.onBegin(String attemptReference)
passes the attempt reference through the listener after the profiling session is created.Listener.onSuccess(String attemptReference)
queries the server to provide results after the profiling attempt is finalized.Listener.onCancel()
aborts the listener of the current profiling attempt.Listener.onError(String attemptReference, String message)
is executed after an error occurs in the profiling attempt. The message
argument contains information about the error.