This document provides a guide to applying and integrating Surffy NetFUNNEL Agent in the Android OS (AOS) environment.
Add code where the NetFUNNEL service is required.
Apply the code recommended in this guide to the communication part of your user code, and you can use the Surffy service through external URL input.
This class manages the overall flow.
As it is made of a singleton, you can reuse it by setting only the information that has changed since the initial information input as a setter.
Users must enter the properties below:
- AppName: The client's application name
- Activity: The current Activity that NetFUNNEL is to be applied
- Context: Context for getting device internal information (If it is null, it gets Activity's Context value.)
- TenantAPIURL: Tenant API server address
- TenantNFURL: Tenant NetFUNNEL server address
- eumURL: End User Monitoring server address
- SettingURL: Server address for NetFUNNEL setting
The TenantAPIURL, TenantNFURL properties can be entered from the console's AOS installation guide.
After registering all input properties and AgentInterface, calling the nfStart() method starts NetFUNNEL (Checking the queue).
After the NetFUNNEL action, you can record the next action in the onSuccess method of AgentInterface. AgentInterface will be explained later in detail.
An interface that defines functionally for use by users.
In AgentInterface, functions are defined by overriding the following functions. If not defined, there is no action.
- public void onSuccess() *required
- It defines the action after NetFUNNEL action. Put the actual working code in this part.
- public void onCancel()
- Defined to prepare for situations where actions such as cancellation occur during NetFUNNEL action.
Recommend not to insert the code that may affect the action from the next line that performs nfStart() method of NetFunnel class.
As all methods perform as callbacks, recommend not to use functions that can cause problems, such as Activity, for functions of AgentInterface.
Surffy-NetFUNNEL-Agent has a structure that the client within the WebView communicates with the server after showing the waiting room to the WebView.
If NetFUNNEL performs successfully, the user's EUM information starts to be collected, and when the NetFUNNEL ends, the collected information is sent to the server.
The minimum required specifications are:
- JAVA: JDK 1.8 and above
- Android: Android Agent 23 (Marshmallow) and above
- VWR (Virtual Waiting Room)
- EUM (End-User Monitoring)
Anomaly Action Defense
No Internet connection
Add the defense logic that leads to the 'cancel' action when there is no internet connection.
Sometimes bypass access (unauthorized access) is attempted through airplane mode. The defense against this is:
- If airplane mode is on, we stop the communication and proceed to AgentInterface's onCancel method to defend the main flow.
Sometimes bypass access (unauthorized access) is attempted through the go-back button or the cancel button. The defense against this is:
- If the cancel button is entered in the WebView, we stop the communication and proceed to onCancel method of AgentInterface to defend the main flow.
- If the go-back button is entered, we proceed to onCancel method of AgentInterface by using the onBackPressed listener to defend the main flow.
Fast iteration input
Events that NetFUNNEL performs (onClick, etc.) are the user's domain, and NetFUNNEL can be repeatedly called when inputting (touching) quickly and repeatedly according to the implemented logic.
- When the nfStart() function is called, the same service URL request is repeatedly checked for 1 second.
Download the aar file in the attached file and add it to the app unit gradle.
e.g. 'aar' file under 'libs' directory
Response Status Code
Regardless of the 200 code in the server, it permits to enter
Blocked from the server
The IP is blocked on the server
Regardless of the queue, it counts as Success immediately
The user cancels
The cancel button in the NetFUNNEL WebView UI
The key has already expired
The key doesn't exist
NetFUNNEL server not working
NetFUNNEL server not working
Library usage example
Connection communication example
🏄♂️ Any other questions or feedback on Surffy docs? E-mail us at firstname.lastname@example.org.