Last active
March 19, 2018 10:08
-
-
Save rvi/36f84451f6cbc53fba4871803fd6c96e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity(), OnvifListener { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
currentDevice = OnvifDevice("IP_ADDRESS:PORT", "login", "pwd") | |
currentDevice.listener = this | |
currentDevice.getServices() | |
} | |
override fun requestPerformed(response: OnvifResponse) { | |
Log.d("ONVIF","Request ${response.request.type} performed.") | |
Log.d("ONVIF","Succeeded: ${response.success}, | |
message: ${response.parsingUIMessage}”) | |
if (response.request.type == GetServices) { | |
currentDevice.getDeviceInformation() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment