Ezviz Studio

The EZVIZ Studio makes it easy to manage your camera remotely from across the globe. It allows you to easily view and check in on your homes, pets, loved ones or businesses,any time, anywhere. With the advance instant alert feature you can receive immediate motion detection alerts by text, and take necessary actions to ensure the safety of. Open the EZVIZ app and sign into your account; Tap on the camera you would like to configure; Tap on the gear (settings icon top right corner) Scroll down to audio and turn the audio on.By default the audio switch/Audio recording for my device is turned off. EZVIZ PC Studio Software. Windows PC Software. Mp4 Video Player. DB1 - Smart Doorbell. C6CN - Smart Pan/Tilt. C3A+W2D Detailed Description. EZVIZ – Security Video For Smart Life The EZVIZ app is designed to work with our series of security NVRs, DVRs and cloud cameras. By using this app, it is so easy to manage your camera and other smart home devices remotely from across the globe any time.

Using Ezviz for PC studio software is easy to manage than using a smartphone. So, are you trying to install the Ezviz camera app for PC and not find a setup file? In this article, we provide the best solution to download the Ezviz camera setup for the computer. For safety, we would like to set up security cameras for our home or office. Even installed best cameras, the controller is the critical thing that helps manage the cameras as user needs. Ezviz app provides an excellent service for users. By using smartphones, we can use a small screen to control the features and options. But if you can download the Ezviz security camera on Windows or Mac computer, it will be a great solution to get the best service. This article guides you to download Ezviz for PC, Windows, and Mac to manage the security cameras from your computer.

What is Ezviz App

Ezviz security camera app uses to control NVRs, DVRs, and Ezviz cloud cameras from mobile devices and computers. So, you can access all cameras with the help of cloud services from any time anywhere. Ezviz camera app was established in 2001 with the subsidiary of the Hikvision app. Also, Ezviz is a high tech security tool for smart homes using cloud-based platforms, and AI technology provides comfort to all users. There are many more Ezviz features that include controlling the system in smart ways.

Ezviz App Features

The Ezviz app becomes a top-rated security camera management app among all security camera apps. Apart from it, you can control many smart home devices to make your home secure. Such as indoor Wi-Fi cameras, outdoor Wi-Fi cameras, wire-free cameras, a video doorbell, and more. You can control all of these security cameras and access their data from any time and anywhere. All cameras offer live-stream and high-quality videos to view with more details. Hence, Ezviz gives more connectivity to different parts to ensure their comfort and safety.

  • It provides high definition and lives streaming videos for getting more details on videos.
  • Supports two-way talk audio system to have a conversation with the camera.
  • Motion detecting features are supporting. When the object is moving, then you will get alert about it. Also, users can customize the detection zone and sensitivity.
  • The dark mode supports recording and viewing the live stream views in the dark with IR features.
  • Using the Ezviz cloud, you can save all recorded videos on cloud sever. Also, NVR/DVR or SD cards are supporting.
  • Users have options to schedule the record videos according to time.
  • Multiple languages support to understand the worldwide app users.

How to install Ezviz For PC – Windows 7, 8, 10 and Mac

Moreover, you can get more features with Ezviz App than we mentioned above. To download Ezviz for Windows and Mac, you need to use an android emulator. Many android emulators are available to download for computers. So, we are using Bluestacks emulator for installing Ezviz App for PC Windows and Mac. So, you can follow the instructions below.

Ezviz Studio Hikvision

1.First of all, download Bluestacks android emulator for the computer. Use this official link to download it for Windows and Mac computers.

2.Once the setup files are downloaded to your computer, install the computer Bluestacks android emulator. If you are new to installation, read our Bluestacks android emulator installation guide.

3.Once the Bluestacks installed on your computer, a desktop shortcut will appear to run the Bluestacks. Then click on it and run the Bluestacks emulator.

4.On the Bluestacks emulator home screen, find the search box on the top right corner. Type Ezviz and click on the search icon to start the search.

5.With the search result, you will get the Ezviz app on there. Then click on it to get more details. Find an install button on there and click on it to start the installation Ezviz camera app.

6.After the installation, the Ezviz security camera app shortcut will be visible on Bluestack’s home screen. So, click on it and start using Ezviz App for Windows and Mac. Now you can connect all wireless cameras to your app.

Can I watch Ezviz on computer?

Ezviz can watch on the computer with the help of an android emulator. Android apps cannot directly run on Windows or Mac. Hence, use Bluestacks android emulator and watch Ezviz on a computer.

How do I get Ezviz on my computer?

Ezviz is an android application. So, you cannot download it directly on a computer. Therefore, get help from android and install it on the computer. There are many android emulators support windows and Mac. Use Bluestacks emulator, and it offers excellent service.

Is the Ezviz app free?

The Ezviz camera app is free to use. So the app can be download from Google Playstore and Apple Appstore. All features are mentioned above gets for free.

How do I add users to Ezviz?

Follow the below instructions to add users to Ezviz.

  • Login to Ezviz camera app
  • Select the camera you want to share, then tap on the top right corner share icon.
  • Now enter the other user valid email/phone number register Ezviz
  • Click on the OK setting

Is Ezviz secure?

Ezviz is safe to use in your home because it uses cloud storage to save videos. Also, Ezviz uses bank-level encryption, and your data stays very securely on Ezviz cloud storage.

Is the Ezviz camera wireless?

Yes. All of the cameras are using Wi-Fi technology to connect with apps and cloud storage. It is fast and easy to access from anywhere anytime.

How do I install Ezviz on Windows 10?

Ezviz can install on any windows version with the help of an android emulator. Download Bluestacks android emulator to the windows computer and install Ezviz through an emulator. Then you can install Ezviz on windows 10.

Is Ezviz a good brand?

Even the Ezviz is not more popular, But Hikvision trendy brand in the world. So, Ezviz’s parent company is Hikvision. Then you can get an idea about the Ezviz brand.

Ezviz App helps to remote control the cameras from anywhere. When you are not at home and want to see what’s happening there, you can use this Ezviz camera App to see what’s happening there. Also, you will get the alert when the motion-detecting inside the house. Even this app comes for a smartphone. You can install Ezviz for Windows and Mac with the help of an android emulator. We recommend using the Bluestacks android emulator because it offers brilliant service to run android apps and APK apps on computer.

Open EZVIZ Platform SDKUser Manual (Android)

Overview

Thisdocument introduces the APIs' definition and calling sequence of Open EZVIZPlatform SDK (Android).

Glossary

Term

Description

accessToken

Access token, used for client software authentication, which is returned by server

AppKey

Applying for AppKey from EZVIZ open platform

deviceSerial

Device serial No.

CameraNo

Device channel No.

deviceSerial+CameraNo

Camera ID

OSD

Video's current time

PTZ

PTZ control. You can control the device to pan, tilt, or zoom via other terminals.

Functions

Function

Description

Account operations (authorize to login, log in via SDK API)

Authorize to Open EZVIZ Platform and reuse the capability

Camera List

Get devices in the account

Live View

View the live video. You can set the resolution.

Playback (video stored in SD card or Cloud Storage)

View the recorded video files.

Two-Way Audio

Two-way audio, including half-duplex and full-duplex.

Device Settings

API for device settings.

Device Control API (PTZ, Image)

PTZ Control

Wi-Fi Configuration

Wi-Fi settings of the device.

Record during Live View and Playback

Record the video files when playing the live video and recorded videos.

Capture during Live View and Playback

Capture the images when playing the live videos and recorded videos.

Alarm Information

Get alarm information.

Project Configuration

EnvironmentSupports Android Studio 1.4 and aboveSupports JDK 7.0 and aboveSupports Android system version 4.0 and above

1. Apply for appKey

Firstly,you should apply to us about developer appkey.

2. Install SDK

SDKInstallation Steps

Get SDK via Gradle

Ifyou have installed by directly downloading in the previous, you should deletethe previously copied.so library file and .jar packet.

dependencies {

compile 'com.hikvision.ezviz:ezviz-sdk:4.8.6.2'

}

Get SDK via Repository inMaven

Ifyou have installed by directly downloading in the previous, you should deletethe previously copied.so library file and .jar packet.

<dependency>

<groupId>com.hikvision.ezviz</groupId>

<artifactId>ezviz-sdk</artifactId>

<version>4.8.6.2</version>

</dependency>

Directly Download

1.Copythe .so file in the directory of /libs/armeabi-v7a to the correspondingdirectory of your own project.2.Copy the .jar package in the directory of /libs to the correspondingdirectory of your own project (including .jmdns and .gson).

3. Configure Project

Configure AndroidPermission

Addin the file AndroidMainfest.xml:

//Network Permission

<uses-permission android:name='android.permission.INTERNET'/>

<uses-permission android:name='android.permission.ACCESS_NETWORK_STATE'/>

<uses-permission android:name='android.permission.RECORD_AUDIO'/>

<uses-permission android:name='android.permission.READ_PHONE_STATE'/>

//Storage Permission

<uses-permission android:name='android.permission.WRITE_EXTERNAL_STORAGE'/>

//Wi-Fi Status Permission

<uses-permission android:name='android.permission.ACCESS_WIFI_STATE'/>

<uses-permission android:name='android.permission.CHANGE_WIFI_STATE'/>

<uses-permission android:name='android.permission.CHANGE_WIFI_MULTICAST_STATE'/>

Configure build.gradle

defaultConfig {

...

ndk {

abiFilters 'armeabi-v7a'//Only supports v7a

}

}

sourceSets {

main {

jniLibs.srcDirs = ['libs']

}

}

Note: Currently onlysupports v7a. It can only be used in armeabi-v7a.

ndk{

abiFilters 'armeabi-v7a'//Only supports 32-bit.

}

Forpermission android.permission.READ_PHONE_STATE, you are not required to add itif not necessary.

ConfigureAndroidManifest.xml

Addthe activity definition as follows, including login, enabling cloud storage,etc.

<activity

android:name='com.videogo.main.EzvizWebViewActivity'

android:screenOrientation='portrait'

android:configChanges='orientation|keyboardHidden'>

</activity>

Ezviz

Addthe following broadcast receiver, which is used for receiving the networkchanges to refresh the SDK network status, for receiving the login succeededmessage to enable other pages. Replace ##you_BroadcastReceiver as the broadcastreceiver you defined in the code.

<receiver

android:name='you_BroadcastReceiver'

android:exported='false' >

<intent-filter>

<action android:name='com.videogo.action.OAUTH_SUCCESS_ACTION'/>

</intent-filter>

</receiver>

4. Initialize Code

Itis recommended to initialize the code in the application.

/** * Enable/Disable SDK logs. */

EZGlobalSDK.showSDKLog(true);

/** * Supports P2P streaming or not. See theAPI for details. */

EZGlobalSDK.enableP2P(false);

/** * Replace the APP_KEY as the one youapplied. */

EZGlobalSDK.initLib(this,APP_KEY);

5. Code Obfuscation

Add the following contentwhen packaging.

-dontwarn com.ezviz.**

-keep class com.ezviz.** { *;}

-dontwarn com.hik.**

-keep class com.hik.** { *;}

Ezviz Studio Manual

-dontwarn com.hikvision.**

-keep class com.hikvision.** { *;}

-dontwarn com.videogo.**

-keep class com.videogo.** { *;}

-dontwarn org.MediaPlayer.PlayM4.**

-keep class org.MediaPlayer.PlayM4.** { *;}

-dontwarn com.sun.jna.**

-keep class com.sun.jna.**{*;}

# Gson Obfuscation

-keepattributes Annotation

-keep class sun.misc.Unsafe { *; }

-keep class com.idea.fifaalarmclock.entity.*

-keep class com.google.gson.stream.* { *; }

#xlog Obfuscation of mars

-keep class com.tencent.mars.** {

publicprotected private *;

}

SDK Initialization

1. InitializeAuthorization Process

For Authorized User:

Oversea:

1. The third-party servergets accessToken and expiry time via server API. accessToken is used forauthorization, expiry time is used for scheduled refresh.

2. The third-party serversends the accessToken to the third-party application (integrated with SDK). Thethird-party application calls setAccessToken (String accesstoken) to finishauthorization.

3. EZGlobalSDK.getInstance().setAccessToken(StringaccessToken);

4. Call after logoutLogout

5. EZGlobalSDK.getInstance().logout();

Or

EZGlobalSDK.getInstance().setAccessToken(null);

For the users who wantsto call the SDK login page for authorization:

1. Get area list by callingEZGlobalSDK.getInstance().getAreaList(). Select the current area's areaId andenter the login H5 page by calling EZGlobalSDK.getInstance().openLoginPage(StringareaId). You can log in to the account in this page.

2. EZGlobalSDK.getInstance().getAreaList();

3.

4. EZGlobalSDK.getInstance().openLoginPage(StringareaId)

5. After login, it will sendbroadcast. If the action is Constant.OAUTH_SUCCESS_ACTION, it indicates loginsucceeded. After login, you can perform further operation in the App and callthe EZGlobalSDK API, and the EZGlobalSDK will automatically complete the configurationof accessToken authorization.

6. The EZGlobalSDK can cachethe accessToken. When you open the App next time, the authorization will becompleted during initialization.

7. If you the accessToken isauthenticated via H5 page, EZGlobalSDK can refresh the accessTokenautomatically, and it will not be expired or invalid.

8. To get the accessTokencached by EZGlobalSDK, call EZGlobalSDK.getInstance().getEZAccessToken() andyou will get EZAccessToken, which includes accessToken and its expiry time. Youshould consider accessToken's expiry time if you call the EZVIZ API byaccessToken.

9. EZGlobalSDK.getInstance().getEZAccessToke();

2. Live View

1. Steps:

1. Create player

2. Set handle callback anddisplay area. If the device is configured with stream encryption, you shouldset the encryption key (by default, key is the device's 6-bit verificationcode)

3. Start live view

4. Stop live view

5. Release the player

ExampleCode:

EZPlayerplayer =EZGlobalSDK.getInstance().createPlayer(String deviceSerial,intcameraNo);

//Seta handle for transmitting message from player to handle.

player.setHandler(mHandler);

//Setthe display parameter of the player

player.setSurfaceHold(mHolder);

/**

*For the device whose stream is encrypted, the encryption key is required.

*The stream encryption key is used for decrypting the encrypted video. This APIcan be called when receiving error callback of ERROR_INNER_VERIFYCODE_NEED orERROR_INNER_VERIFYCODE_ERROR.

* @paramverifyCode Stream encryption key (by default, key is the device's 6-bitverification code).

*/

player.setPlayVerifyCode(String verifyCode);

//Startlive view

player.startRealPlay();

//Stoplive view

player.stopRealPlay();

//Releaseresource

player.release();

2. Notes:

1. During live view, you canperform the following operations: recording, capture, image flipping, two-wayaudio, PTZ control, audio control, and digital zoom. For details, refer toEZPlayer of API. The APIs which control the PTZ, lens, and two-way audio are restrictedAPIs. You should call them based on the device capability. For the devicecapability, refer to the attribute value of EZDeviceInfo.

//StartRecording. recordFile:The local saving path of the recorded video files. Forexample: Environment.getExternalStorageDirectory().getPath()+'/abc'

player.startLocalRecordWithFile(String recordFile)

//Stop Recording. It is used with startLocalRecordWithFile.

player.stopLocalRecord()

//Capture

player.capturePicture()

//ImageFlipping

EZGlobalSDK.getInstance().controlVideoFlip(deviceSerial,cameraNo,EZConstants.EZPTZDisplayCommand.EZPTZDisplayCommandFlip)

//AudioControl

player.openSound();

player.closeSound();

/**

* APIfor PTZ Control

* TheAPI is long-running. Call it in the thread.

* @paramdeviceSerial Device Serial No.

* @paramcameraNo Channel No.

* @paramcommand PTZ Control Command

* @paramaction Start/Stop

* @paramspeed Speed level (0 to 2)

* @returnreturn Operation succeeded or failed (returning with error code)

*/

EZGlobalSDK.getInstance().controlPTZ(String deviceSerial,intcameraNo, EZPTZCommand command, EZPTZAction action, intspeed)

1. Set the video's definition(videoLevel) by setVideoLevel of EZGlobalSDK. Adjust it before or during liveview. During live view, if you set the video definition, stop live view(stopRealPlay) first and then start live view again (startRealPlay) so that thesettings will take effect.

2. EZGlobalSDK.getInstance().setVideoLevel(StringdeviceSerial,int cameraNo, intvideoLevel);

3.

Ezviz Studio

4. //Configured

5. // Stop live view

6. stopRealPlay();

7. // Start Live View

8. startRealPlay();

9. After starting live view,you will receive the following messages in the callback message.

a.Succeeded Message: 102 (EZRealPlayConstants.MSG_REALPLAY_PLAY_SUCCESS).b. Succeeded Message: 134 (EZConstants.MSG_VIDEO_SIZE_CHANGED).c. Failed Message: 103 (EZRealPlayConstants.MSG_REALPLAY_PLAY_FAIL). Check error code (errorCode) if failed.If the error code is 400035 (verification code required) or 400036(verification code error), the developer should ask the user to enter theverification code again, and call setPlayVerifyCode to set the password, andthen start live view again.

@Override

public void handleMessage(Messagemsg) {

switch(msg.what) {

caseEZConstants.EZRealPlayConstants.MSG_REALPLAY_PLAY_SUCCESS:

//Playing succeeded.

break;

caseEZConstants.EZRealPlayConstants.MSG_REALPLAY_PLAY_FAIL:

//Playing failed with error information.

ErrorInfo errorinfo = (ErrorInfo) msg.obj;

//Returned with error code for playing failed.

intcode = errorinfo.errorCode

// Returned with error code for playing failed module.

String codeStr = errorinfo.moduleCode

//Returned with description for playing failed.

String description = errorinfo.description

//Returned with resolution for playing failed.

String description = errorinfo.sulution

break;

Ezviz studio for windows 7

caseEZConstants.MSG_VIDEO_SIZE_CHANGED:

// Parsed image resolution and callback

try {

String temp = (String) msg.obj;

String[] strings = temp.split(':');

int mVideoWidth = Integer.parseInt(strings[0]);

int mVideoHeight = Integer.parseInt(strings[1]);

//Parsed image resolution

} catch (Exception e) {

e.printStackTrace();

}

break;

default:

break;

}

}

3. Playback

1. Steps

1. Create player.

2. Set handle callback anddisplay area. If the device is configured with stream encryption, you shouldset the encryption key (by default, key is the device's 6-bit verificationcode).

3. Start playback.

4. Stop playback.

5. Release player.

ExampleCode:

EZPlayer player =EZGlobalSDK.getInstance().createPlayer(String deviceSerial,intcameraNo);

//Set a handle, which is used for transmitting message from player to handle

player.setHandler(mHandler);

//Setthe display parameter of the player

player.setSurfaceHold(mHolder);

/**

* Forthe device whose stream is encrypted, the encryption key is required.

* Thestream encryption key is used for decrypting the encrypted video. This API canbe called after receiving error callback of ERROR_INNER_VERIFYCODE_NEED orERROR_INNER_VERIFYCODE_ERROR.

* @paramverifyCode Stream encryption key (by default, the key is the device's 6-bitverification code).

*/

player.setPlayVerifyCode(String verifyCode);

/**

*Start Playback (Stored in Cloud Storage)

* @paramcloudFile Video files stored in Cloud Storage. See Search Video Files in CloudStorage below.

* @return true-success, false-failure

*/

player.startPlayback(EZCloudRecordFile cloudFile)

//Or

/**

*Start Playback (Stored in SD Card)

* @paramdeviceFile Video files stored in SD card. See Search Video Files in SD Cardbelow.

* @return true-success, false-failure

*/

player.startPlayback(EZDeviceRecordFile deviceFile)

//Or

/**

*Start Playback (Stored in SD Card) By Time

* @paramstartTime Start time

* @paramstopTime End time

* @return true-success, false-failure

*/

player.startPlayback(Calendar startTime, Calendar stopTime)

/**

* Stop Playback

*/

player.stopPlayback()

2. Notes:

1. Search Video Files inCloud Storage

/**

*Search Video Files in Cloud Storage

*The API contains network operation. Call it in the thread.

* @paramdeviceSerial Device serial No.

* @paramcameraNo Camera No.(EZCameraInfo.cameraNo)

* @paramstartTime Start time of search

* @paramendTime End time of search

* @returnVideo file list in cloud storage

* @throwsBaseException

*/

EZGlobalSDK.getInstance().searchRecordFileFromCloud(String deviceSerial,int cameraNo, Calendar startTime, CalendarendTime)

1. Search Video Files in SDCard

/**

*Search Video Files in SD Card

*If the device is linked with an NVR, it will search the video files stored inthe NVR instead of searching in the device SD card.

*The API is long-running. Call it in the thread.

*/

EZGlobalSDK.getInstance().searchRecordFileFromDevice(StringdeviceSerial, int cameraNo, Calendar startTime,Calendar endTime)

1. During playback, you canperform the following operations: clipping, capture, audio control, digitalzoom, and timeline control (seekPlayback). For details, refer to EZPlayer ofAPI.

/**

* Playback Based on Offset Time

* Call this API when dragging the progressbar. Stop playback first and set the offset time as the start time to startplayback.

* Replace this API with stopPlayback +startPlayback (offsetTime, stopTime)

* @param offsetTime Recording Offset Time

*/

player.seekPlayback(Calendar offsetTime)

1. getOSDTime: Get thecurrent time in the video for playback. If the start time is 8:00, end time is9:00, getOSDTime is 8:30, then the playing progress is 50%.

2. During playback, callpausePlayback to pause playback and call resumePlayback to resume playback.

/**

* PausePlayback

*/

player.pausePlayback()

/**

* Resume Playback

*/

player.resumePlayback()

1. After starting playback,you will receive the following messages in the callback message.

a.SucceededMessage:205(EZConstants.EZPlaybackConstants.MSG_REMOTEPLAYBACK_PLAY_SUCCUSS).b. Failed Message: 206 (EZConstants.EZPlaybackConstants.MSG_REMOTEPLAYBACK_PLAY_FAIL).Check error code (errorCode) if failed. If the error code is 400035(verification code required) or 400036 (verification code error), the developershould ask the user to enter the verification code again, and callsetPlayVerifyCode to set the password, and then start playback again.c. Video Resolution Callback: 134 (EZConstants.MSG_VIDEO_SIZE_CHANGED)

4. Two-Way Audio

1. Steps:

1. Create two-way audioplayer

2. Set handle callback anddisplay area. If the device is configured with stream encryption, you shouldset the encryption key (by default, key is the device's 6-bit verificationcode)..

3. Start two-way audio.

4. Stop two-way audio.

5. Release two-way audioplayer.

ExampleCode

EZPlayer talk =EZOpenSDK.getInstance().createPlayer(String deviceSerial,intcameraNo);

//Set a handle, which is used for transmitting message from player to handle.

talk.setHandler(mHandler);

/**

*For the device whose stream is encrypted, the encryption key is required.

*The stream encryption key is used for decrypting the encrypted video. This APIcan be called when receiving error callback of ERROR_INNER_VERIFYCODE_NEED orERROR_INNER_VERIFYCODE_ERROR.

* @paramverifyCode Stream encryption key (by default, the key is the device's 6-bitverification code).

*/

talk.setPlayVerifyCode(String verifyCode);

//StartTwo-Way Audio

talk.startVoiceTalk();

//StopTwo-Way Audio

talk.stopVoiceTalk();

//Forhalf-duplex two-way audio, you should call the above API to start two-wayaudio.

//Afterstarting two-way audio, you can perform the following operations(setVoiceTalkStatus) to hear sound from the device or phone.

//Listenon Device and Speak on Phone

talk.setVoiceTalkStatus(true);

//Listen on Phone and Speak on Device

talk.setVoiceTalkStatus(false);

2. Notes:

1. The two-way audiooperations are different according to the device capability. Get the devicetwo-way audio capability by isSupportTalk in EZDeviceInfo. 0: Not Supported. 1:Supports Full-Duplex Two-Way Audio. 3: Supports Half-Duplex Two-Way Audio. Forone device, if you want to enable different functions (live view, playback, ortwo-way audio), you should create a player for each function, respectively.

2. If the video containssound, you should mute the video sound (closeSound) before starting two-wayaudio. After stopping two-way audio, turn on the video sound (openSound). Fordetails, see the demo.

3. After starting two-wayaudio, you will receive the following messages in the callback message.

a.Succeeded Message: 113 (RealPlayMsg.MSG_REALPLAY_VOICETALK_SUCCESS).b. Failed Message: 114 (RealPlayMsg.MSG_REALPLAY_VOICETALK_FAIL). Check error code (errorCode) if failed.If the error code is 400035 (verification code required) or 400036(verification code error), the developer should ask the user to enter theverification code again, and call setPlayVerifyCode to set the password, andthen start two-way audio again.

5. Add Device

1. The object aftersearching the device information (API is probeDeviceInfo) is EZProbeDeviceInfo.If it returns device information object, it indicates searching succeeded. Youcan add the device.

try {

EZProbeDeviceInfo mEZProbeDeviceInfo = EZGlobalSDK.getInstance().probeDeviceInfo(StringdeviceSerial);

//Searching completed. Call the API to add device

} catch (BaseException e) {

e.printStackTrace();

//Searching failed.

int code = e.getErrorCode();

//Code Value

120020 Device is online and is addedby the current account (withprompt)

120022 Device is online and is added by other account (withprompt).

120023 Device is offline and is not added by any accounts (callAPI for Wi-Fi settings)

120002 Device does not exist and is not added by any accounts (callAPI for Wi-Fi settings)

120024 Device is offline and is added by other account (withprompt).

120029 Device is offline and isadded by the current account (withprompt).

Other (with prompt)

}

1. Searching completed. Addthe device.

// Searching completed. Add the device.

//deviceSerial: Device serial No.;

//mVerifyCode Device verification code which is on the devicelabel and contains 6 uppercase letters.

try {

boolean ret =EZGlobalSDK.getInstance().addDevice(String deviceSerial, String mVerifyCode);

if (ret) {

//Added.

}

} catch(BaseException e) {

e.printStackTrace();

}

1. Call API for Wi-Fisettings. The startConfigWifi should be used with stopConfigWifi. Afterstarting Wi-Fi configuration, you can define a timer to call stopConfigWiFi tostop the configuration. If you want to use sound wave to set Wi-Fi, thedevice should also support this function. This API supports batchconfiguration. Set deviceSerial as “null” to realize batch configuration.

/**

* StartWi-Fi Settings

* @paramcontext Apply activity context

* @paramdeviceSerial Configure device serialNo.

* @paramssid Wi-Fi SSID

* @parampassword Wi-Fi password

Studio

* @paramback Configure Callback

*/

EZGlobalSDK.getInstance().startConfigWifi(Context context,StringdeviceSerial, String ssid, String password,EZOpenSDKListener.EZStartConfigWifiCallback back);

/**

*Start Wi-Fi Settings

* @since4.8.3

* @paramcontext Apply activity context

* @paramdeviceSerial Configure device serialNo.

* @paramssid Wi-Fi SSID

* @parampassword Wi-Fi password

* @parammode Configuration mode. Combine themodes listed in EZWiFiConfigMode (EZWiFiConfigMode.EZWiFiConfigSmart-NormalMode. EZWiFiConfigMode.EZWiFiConfigWave-Sound Wave Mode). E.g.,EZWiFiConfigMode.EZWiFiConfigSmart|EZWiFiConfigMode.EZWiFiConfigWave

* @paramback Configure Callback

*/

EZGlobalSDK.getInstance().startConfigWifi(Context context,StringdeviceSerial, String ssid, String password, intmode,EZOpenSDKListener.EZStartConfigWifiCallback back);

/**

*Stop Wi-Fi Settings

Ezviz Studio Free Download

*/

EZGlobalSDK.getInstance().stopConfigWiFi();

/**

*Configure Callback

*/

EZOpenSDKListener.EZStartConfigWifiCallback mEZStartConfigWifiCallback =

newEZOpenSDKListener.EZStartConfigWifiCallback() {

@Override

public void onStartConfigWifiCallback(StringdeviceSerial,finalEZConstants.EZWifiConfigStatus status) {

AutoWifiConnectingActivity.this.runOnUiThread(newRunnable() {

@Override

public void run() {

if(status EZConstants.EZWifiConfigStatus.DEVICE_WIFI_CONNECTED) {

//Device connected to Wi-Fi.

} else if(status EZConstants.EZWifiConfigStatus.DEVICE_PLATFORM_REGISTED) {

// Device registered to theplatform. Call the adding device API to add it.

}

}

});

}

};

Note:During the process of deleting device from the account, configuring the Wi-Fi,and then adding the device, please wait for two minutes after resetting thedevice and then call the APIs for Wi-Fi configuration, which can increase thesuccess rate (as the platform can get the device offline status in two minutesafter resetting the device. If the platform gets the device offline status, theWi-Fi configuration success rate will be high.)

Note1: Thestatus reported by DEVICE_WIFI_CONNECTED and DEVICE_PLATFORM_REGISTED may belost. If lost, search the device status by calling probeDeviceInfo and performfurther operations according to the device status.

Note2: For Hikvision device, you may need to activate it before adding it. Searchthe device in LAN and check if the device is activated (activation is notrequired for EZVIZ device). If it is inactive, call the API to activate it.

//sadp Search Device in LAN

EZHCNetDeviceSDK.getInstance().startLocalSearch(newEZHCNetDeviceSDK.SadpDeviceFoundListener() {

@Override

public void onDeviceFound(finalEZSADPDeviceInfo sadp_device_info) {

LogUtil.d(TAG,

'onDeviceFound ' +sadp_device_info.getDeviceSerial() + ' ' +sadp_device_info.getDeviceSerial());

//Findthe device.

//Checkif the device is activated.

booleanisActivied = sadp_device_info.isActived();

}

});

//sadp Disable Searching Device in LAN

EZHCNetDeviceSDK.getInstance().stopLocalSearch();

//sadp Activate Device in LAN

new Thread(newRunnable() {

@Override

public void run() {

final int result= EZHCNetDeviceSDK.getInstance().activeDeviceWithSerial(deviceSerial,mPassword);

if (result 1){

//TODO: 2017/8/15 Activation successful

return;

}else {

//TODO: 2017/8/15 Activationfailed

runOnUiThread(newRunnable() {

@Override

public void run() {

if(result 2020){

//TODO: 2017/8/16 Weak password.

}else{

//TODO: 2017/8/16 Activating failed.

}

}

});

}

}

}).start();

c