### Preview Configuration Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Examples of starting a preview stream with basic and advanced configurations. ```java // Basic preview setup InstaCameraManager.getInstance().startPreviewStream( PreviewStreamResolution.STREAM_1440_720_30FPS, InstaCameraManager.PREVIEW_TYPE_NORMAL ); // Advanced configuration PreviewParamsBuilder builder = new PreviewParamsBuilder() .setStreamResolution(PreviewStreamResolution.STREAM_1440_720_30FPS) .setPreviewType(InstaCameraManager.PREVIEW_TYPE_LIVE) .setAudioEnabled(true); InstaCameraManager.getInstance().startPreviewStream(builder); ``` -------------------------------- ### Log Setup in Application Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example of setting up logging within an Android Application class, including initializing the SDK and configuring the log path and dumper. ```java public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); InstaCameraSDK.init(this); setupLogging(); } private void setupLogging() { // Get internal cache directory String logPath = getFilesDir().getAbsolutePath() + "/logs"; // Create directory if needed File logDir = new File(logPath); if (!logDir.exists()) { logDir.mkdirs(); } // Configure logging LogManager.instance.setLogRootPath(logPath); LogManager.instance.startLogDumper(); Log.d("MyApp", "Logging configured at: " + logPath); } } ``` -------------------------------- ### Video Playback Parameters Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example of configuring parameters for video playback. ```java VideoParamsBuilder builder = new VideoParamsBuilder() // Playback .setAutoPlayAfterPrepared(true) .setIsLooping(true) .setLrvEnable(false) // Rendering .setRenderModel(RenderModel.PLANE_STITCH) .setDynamicStitch(true) .setImageFusion(true) // Effects .setDePurpleFilterOn(false) .setColorPlusEnable(true) .setColorPlusFilterIntensity(1.0f) // Stabilization .setStabType(InstaStabType.STAB_TYPE_OFF) // Caching .setCacheWorkThumbnailRootPath(getCacheDir() + "/thumbnails") .setCacheCutSceneRootPath(getCacheDir() + "/cutscene"); mVideoPlayerView.prepare(workWrapper, builder); ``` -------------------------------- ### Image Playback Parameters Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example of configuring parameters for image playback. ```java ImageParamsBuilder builder = new ImageParamsBuilder() // Rendering .setRenderModel(RenderModel.PLANE_STITCH) // or FISHEYE, PERSPECTIVE .setDynamicStitch(true) .setImageFusion(true) // Stabilization .setStabType(InstaStabType.STAB_TYPE_OFF) // Viewport .setScreenRatio(2, 1) // Caching .setCacheWorkThumbnailRootPath(getCacheDir() + "/thumbnails") .setCacheStabilizerRootPath(getCacheDir() + "/stabilizer") .setCacheTemplateBlenderRootPath(getCacheDir() + "/template") .setCacheCutSceneRootPath(getCacheDir() + "/cutscene"); mImagePlayerView.prepare(workWrapper, builder); ``` -------------------------------- ### Camera Connection Best Practices Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example of connecting to a camera, including permission checks and error handling. ```java public class CameraManager { public void connectCamera(int connectionType) { // Check permissions first if (!hasRequiredPermissions()) { requestPermissions(); return; } // Perform connection on main thread runOnUiThread(() -> { try { InstaCameraManager.getInstance().openCamera(connectionType); } catch (Exception e) { showError("Connection failed: " + e.getMessage()); } }); } } ``` -------------------------------- ### Support List Methods Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example demonstrating how to get supported record resolutions. ```java List resolutions = InstaCameraManager.getInstance() .getSupportRecordResolutionList(CaptureMode.RECORD_NORMAL); ``` -------------------------------- ### Capture Parameter Defaults Query Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example of initializing support configuration and querying available capture modes and settings. ```java public class CaptureSetup { public void setupCapture() { // Initialize support configuration InstaCameraManager.getInstance().initCameraSupportConfig(success -> { if (success) { // Get available modes List modes = InstaCameraManager.getInstance().getSupportCaptureMode(); // Get settings for specific mode List settings = InstaCameraManager.getInstance() .getSupportCaptureSettingList(CaptureMode.CAPTURE_NORMAL); } }); } } ``` -------------------------------- ### Camera Integration Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of setting up the stream encode and player view listener after starting the preview stream. ```java @Override public void onOpened() { InstaCameraManager.getInstance().setStreamEncode(); mCapturePlayerView.setPlayerViewListener(new PlayerViewListener() { @Override public void onLoadingFinish() { InstaCameraManager.getInstance() .setPipeline(mCapturePlayerView.getPipeline()); } @Override public void onLoadingStatusChanged(boolean isLoading) {} @Override public void onFail(String desc) {} @Override public void onFirstFrameRender() {} }); mCapturePlayerView.prepare(createParams()); mCapturePlayerView.play(); } ``` -------------------------------- ### prepare() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of preparing the InstaCapturePlayerView with various configuration parameters. ```java CaptureParamsBuilderV2 builder = new CaptureParamsBuilderV2() .setWidth(1440) .setHeight(720) .setFps(30) .setImageFusionEnabled(true) .setGestureEnabled(true) .setStabCacheFrameNum(5) .setStabType(InstaStabType.STAB_TYPE_OFF) .setRenderModel(RenderModel.PLANE_STITCH) .setScreenRatio(2, 1); mCapturePlayerView.prepare(builder); ``` -------------------------------- ### Switching to Tiling Mode Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example demonstrating how to prepare and play with tiling mode parameters. ```java ImageParamsBuilder builder = new ImageParamsBuilder() .setRenderModelType(ImageParamsBuilder.RENDER_MODE_PLANE_STITCH) .setScreenRatio(2, 1); mImagePlayerView.prepare(workWrapper, builder); mImagePlayerView.play(); ``` -------------------------------- ### fetchCameraOptions Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of how to fetch and synchronize camera options, with callbacks for success, failure, and connection errors. ```java InstaCameraManager.getInstance().fetchCameraOptions(new ICameraOperateCallback() { @Override public void onSuccessful() { // Use cached parameters } @Override public void onFailed() {} @Override public void onCameraConnectError() {} }); ``` -------------------------------- ### Capture Parameters - Getters Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of how to get the exposure setting for a normal capture mode. ```java Exposure exposure = InstaCameraManager.getInstance() .getExposure(CaptureMode.CAPTURE_NORMAL); ``` -------------------------------- ### Gradle Build Settings Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Example Gradle build configuration for an Android project using the Insta360 SDK, specifying compile SDK, min/target SDK, and ABI filters for native libraries. ```gradle android { compileSdkVersion 33 // Or higher defaultConfig { minSdkVersion 23 targetSdkVersion 33 // Required for native libraries ndk { abiFilters 'arm64-v8a' // 64-bit only } } packagingOptions { // Exclude unnecessary files if needed exclude 'META-INF/proguard/androidx-*.pro' } } ``` -------------------------------- ### Example Usage of prepare() and play() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md An example demonstrating how to prepare a video for playback using VideoParamsBuilder and then play it. ```java VideoParamsBuilder builder = new VideoParamsBuilder() .setLoadingImageResId(R.drawable.loading) .setLoadingBackgroundColor(Color.BLACK) .setAutoPlayAfterPrepared(true) .setStabType(InstaStabType.STAB_TYPE_OFF) .setIsLooping(true) .setLrvEnable(false) .setDynamicStitch(true) .setImageFusion(false) .setOffsetType(OffsetType.ORIGINAL) .setDePurpleFilterOn(false) .setColorPlusEnable(false) .setColorPlusFilterIntensity(1.0f) .setRenderModel(RenderModel.PLANE_STITCH) .setScreenRatio(2, 1) .setGestureEnabled(true) .setCacheWorkThumbnailRootPath(cacheDir + "/thumbnails") .setCacheCutSceneRootPath(cacheDir + "/cutscene"); mVideoPlayerView.prepare(workWrapper, builder); mVideoPlayerView.play(); ``` -------------------------------- ### Batch Parameter Settings - commitSettingOptions() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example demonstrating how to use beginSettingOptions, set multiple parameters, and commit them. ```java InstaCameraManager.getInstance().beginSettingOptions(); InstaCameraManager.getInstance().setEv(mode, Ev.EV_0); InstaCameraManager.getInstance().setShutter(mode, Shutter.SHUTTER_1_2); InstaCameraManager.getInstance().setWB(mode, WB.WB_2200K); InstaCameraManager.getInstance().commitSettingOptions(); ``` -------------------------------- ### Start Capturing Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Examples for starting various capture modes including normal, HDR, super night, burst, interval shooting, and starlapse. ```Plain Text // Start Normal capture InstaCameraManager.getInstance().startNormalCapture(); // Start HDR capture InstaCameraManager.getInstance().startHDRCapture(); // Start super night scene InstaCameraManager.getInstance().startNightScene(); // Start burst capture InstaCameraManager.getInstance().startBurstCapture(); // Start Interval Shooting InstaCameraManager.getInstance().startIntervalShooting(); // Stop interval shooting InstaCameraManager.getInstance().stopIntervalShooting(); // Start starlapse shooting InstaCameraManager.getInstance().startStarLapseShooting(); // Stop starlapse shooting InstaCameraManager.getInstance().stopStarLapseShooting(); ``` -------------------------------- ### InstaImagePlayerView prepare() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of preparing an image for playback with various parameters. ```java ImageParamsBuilder builder = new ImageParamsBuilder() .setDynamicStitch(true) .setStabType(InstaStabType.STAB_TYPE_OFF) .setUrlForPlay(hdrImagePath) .setRenderModel(RenderModel.PLANE_STITCH) .setScreenRatio(2, 1) .setImageFusion(false) .setOffsetType(OffsetType.ORIGINAL) .setColorPlusEnable(false) .setColorPlusFilterIntensity(1.0f) .setGestureEnabled(true) .setCacheWorkThumbnailRootPath(cacheDir + "/thumbnails") .setStabilizerCacheRootPath(cacheDir + "/stabilizer") .setCacheTemplateBlenderRootPath(cacheDir + "/blender") .setCacheCutSceneRootPath(cacheDir + "/cutscene"); mImagePlayerView.prepare(workWrapper, builder); mImagePlayerView.play(); ``` -------------------------------- ### Maven Repository Setup Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Add the Insta360 SDK Maven repository to your project's root build.gradle file. ```groovy allprojects { repositories { // ... existing repositories maven { url 'MAVEN_REPOSITORY_URL' // From Insta360 SDK demo credentials { username = 'USERNAME' // From Insta360 SDK demo password = 'PASSWORD' // From Insta360 SDK demo } } } } ``` -------------------------------- ### Complete Usage Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/LogManager.md Complete usage example for LogManager. ```java public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); // Initialize SDK InstaCameraSDK.init(this); // Setup logging setupLogging(); } private void setupLogging() { // Get internal storage path String logRootPath = StorageUtils.getInternalRootPath() + "/log"; // Ensure directory exists File logDir = new File(logRootPath); if (!logDir.exists()) { logDir.mkdirs(); } // Configure log storage location LogManager.instance.setLogRootPath(logRootPath); // Start capturing logs LogManager.instance.startLogDumper(); Log.d("LogManager", "Logging started at: " + logRootPath); } } ``` -------------------------------- ### Basic SDK Initialization Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Initialize the SDK in your Application class. ```java public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); // Initialize Camera SDK InstaCameraSDK.init(this); // Optional: Setup logging setupLogging(); } private void setupLogging() { String logPath = StorageUtils.getInternalRootPath() + "/log"; LogManager.instance.setLogRootPath(logPath); LogManager.instance.startLogDumper(); } } ``` -------------------------------- ### activateCamera() Example Usage Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of how to use the activateCamera method with SecretInfo and a callback. ```java SecretInfo secretInfo = new SecretInfo("appid_value", "secretkey_value"); InstaCameraManager.getInstance().activateCamera(secretInfo, new InstaCameraManager.IActivateCameraCallback() { @Override public void onStart() {} @Override public void onSuccess() {} @Override public void onFailed(String message) {} } ); ``` -------------------------------- ### startLive() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts live streaming to an RTMP server. ```java public void startLive(String rtmp, String netid, ILiveStatusListener listener) ``` -------------------------------- ### Get Wifi Info Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of retrieving camera Wi-Fi connection information. ```java public WifiInfo getWifiInfo() ``` ```java WifiInfo wifiInfo = InstaCameraManager.getInstance().getWifiInfo(); String ssid = wifiInfo.getSsid(); String password = wifiInfo.getPwd(); ``` -------------------------------- ### destroy() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of calling the destroy() method when the activity is finishing. ```java @Override protected void onStop() { super.onStop(); if (isFinishing()) { mCapturePlayerView.destroy(); } } ``` -------------------------------- ### isCameraWorking Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of checking if the camera is currently working, both generally and for a specific capture mode. ```java boolean isWorking = InstaCameraManager.getInstance().isCameraWorking(); boolean isNormalCapturing = InstaCameraManager.getInstance() .isCameraWorking(CaptureMode.CAPTURE_NORMAL); ``` -------------------------------- ### Connection Type Constants Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Constants for different camera connection types. ```java int CONNECT_TYPE_NONE = 0 // Not connected int CONNECT_TYPE_USB = 1 // USB connection int CONNECT_TYPE_WIFI = 2 // Wi-Fi connection int CONNECT_TYPE_BLE = 3 // Bluetooth connection ``` -------------------------------- ### Start Playing Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Initializes the player with a WorkWrapper and playback parameters, then starts the playback. ```Java // Set WorkWrapper and playback parameters mImagePlayerView.prepare(workWrapper, new ImageParamsBuilder()); // Start playing mImagePlayerView.play(); ``` -------------------------------- ### Start Playing Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md This snippet shows how to prepare the video player with a WorkWrapper and VideoParams, and then start playback. ```java mVideoPlayerView.prepare(workWrapper, new VideoParamsBuilder()); mVideoPlayerView.play(); ``` -------------------------------- ### Getting WorkWrapper Instances Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Examples of how to obtain List from the camera or local directory, and how to create a WorkWrapper from media file URLs. ```Java // Get from the camera List list = WorkUtils.getAllCameraWorks(); // Get from local file List list = WorkUtils.getAllLocalWorks(String dirPath); // If you have the URL of the media file, you can also create WorkWrapper yourself String[] urls = {img1.insv, img2.insv, img3.insv}; WorkWrapper workWrapper = new WorkWrapper(urls); ``` -------------------------------- ### startSuperRecord Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts super recording mode. ```java public void startSuperRecord() ``` -------------------------------- ### Preview Type Constants Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Constants for different preview stream types. ```java int PREVIEW_TYPE_NORMAL = 0 // For preview/capture int PREVIEW_TYPE_RECORD = 1 // For recording only int PREVIEW_TYPE_LIVE = 2 // For live streaming ``` -------------------------------- ### SDK Dependencies Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Add the Camera SDK and Media SDK dependencies to your app module's build.gradle file. ```groovy dependencies { // Camera SDK implementation 'com.arashivision.sdk:sdkcamera:1.10.1' // Latest version // Media SDK (for playback/export) implementation 'com.arashivision.sdk:sdkmedia:1.10.1' } ``` -------------------------------- ### Supported Preview Resolutions Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Common resolutions supported for preview streams. ```java // Common resolutions PreviewStreamResolution.STREAM_368_368_30FPS PreviewStreamResolution.STREAM_1440_720_30FPS PreviewStreamResolution.STREAM_1440_720_60FPS PreviewStreamResolution.STREAM_2880_1440_30FPS // X4/X5 defaults: 2880x1440 // X3 options: 3840x1920, 1440x720 ``` -------------------------------- ### AndroidManifest.xml Registration Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Register your Application class in AndroidManifest.xml. ```xml > ``` -------------------------------- ### OkGo Conflict Resolution Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Exclude the OkGo library if it conflicts with other dependencies. ```groovy implementation('com.arashivision.sdk:sdkcamera:x.x.x') { exclude('com.github.jeasonlzy', 'okhttp-OkGo') } ``` -------------------------------- ### setConstraint() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of setting field of view and viewing distance constraints for the player. ```java mCapturePlayerView.setConstraint(45.0f, 180.0f, 90.0f, 1.0f, 10.0f, 5.0f); ``` -------------------------------- ### startPreviewStream Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts preview stream from camera. Requires Media SDK for display. ```java public void startPreviewStream(PreviewStreamResolution resolution, int previewType) public void startPreviewStream(PreviewParamsBuilder builder) ``` -------------------------------- ### startPureRecord Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts night scene video recording. ```java public void startPureRecord() ``` -------------------------------- ### startUpgrade() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/FwUpgradeManager.md Starts firmware upgrade process. Camera must be connected and battery level must be above 12%. ```java public void startUpgrade(String fwFilePath, FwUpgradeListener listener) ``` ```java String fwFilePath = "/sdcard/Download/InstaX4FW.bin"; FwUpgradeManager.getInstance().startUpgrade(fwFilePath, new FwUpgradeListener() { @Override public void onUpgradeProgress(double progress) { updateProgressBar((int)(progress * 100)); } @Override public void onUpgradeSuccess() { Toast.makeText(ctx, "Upgrade successful", Toast.LENGTH_SHORT).show(); } @Override public void onUpgradeFail(int errorCode, String message) { Log.e("FwUpgrade", "Error " + errorCode + ": " + message); Toast.makeText(ctx, "Upgrade failed: " + message, Toast.LENGTH_SHORT).show(); } @Override public void onUpgradeCancel() { Toast.makeText(ctx, "Upgrade cancelled", Toast.LENGTH_SHORT).show(); } } ); ``` -------------------------------- ### startTimeLapse Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts timelapse video recording. ```java public void startTimeLapse() ``` -------------------------------- ### getCameraType Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of retrieving the camera model type and converting it to a CameraType enum. ```java String cameraType = InstaCameraManager.getInstance().getCameraType(); CameraType type = CameraType.getForType(cameraType); ``` -------------------------------- ### Android Manifest Permissions Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Declare necessary permissions in your AndroidManifest.xml file. ```xml ``` -------------------------------- ### Video Recording - startBulletTime() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signature for starting bullet time recording. ```java public void startBulletTime() ``` -------------------------------- ### InstaImagePlayerView destroy() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Example of releasing resources for InstaImagePlayerView in onDestroy. ```java @Override protected void onDestroy() { super.onDestroy(); mImagePlayerView.destroy(); } ``` -------------------------------- ### Start BLE Scan Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Initializes and starts Bluetooth Low Energy device scanning. Requires Bluetooth permissions. ```java public void startBleScan() ``` ```java InstaCameraManager.getInstance().startBleScan(); ``` -------------------------------- ### startTimeShift Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts time shift recording. ```java public void startTimeShift() ``` -------------------------------- ### startSlowMotionRecord Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts slow motion recording. ```java public void startSlowMotionRecord() ``` -------------------------------- ### Runtime Permission Check Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Implement a check for critical permissions at runtime for Android 6.0+. ```java public class PermissionManager { private static final String[] REQUIRED_PERMISSIONS = { Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.BLUETOOTH, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH_CONNECT, Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE }; public static boolean hasAllPermissions(Context context) { for (String permission : REQUIRED_PERMISSIONS) { if (ContextCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) { return false; } } return true; } } ``` -------------------------------- ### Dependency between Capturing Properties Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example of setting PhotoHdrType and handling dependency checks via a callback. ```Java // The example only demonstrates setting PhotoHdrType; other property settings follow the same pattern; InstaCameraManager.getInstance().setPhotoHdrType(captureMode, photoHdrType, new InstaCameraManager.IDependChecker() { @Override public void check(List captureSettings) { // captureSettings:list of affected capturing properties // UI updates can be handled here } }); ``` -------------------------------- ### startLooperRecord Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts loop recording mode. ```java public void startLooperRecord() ``` -------------------------------- ### startSelfieRecord Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Starts selfie tracking mode. ```java public void startSelfieRecord() ``` -------------------------------- ### Video Recording - startNormalRecord() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signature for starting normal video recording. ```java public void startNormalRecord() ``` -------------------------------- ### Video Recording - startHDRRecord() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signature for starting HDR video recording. ```java public void startHDRRecord() ``` -------------------------------- ### PureShot Image Generation Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-StitchUtils.md Example of generating a PureShot image and using the output. ```java new Thread(() -> { workWrapper.loadExtraData(); String pureshotOutputPath = "/sdcard/DCIM/pureshot_output.jpg"; String algoFolder = "/sdcard/Android/data/com.myapp/cache/algo_models"; boolean isSuccessful = StitchUtils.generatePureShot( workWrapper, pureshotOutputPath, algoFolder ); if (isSuccessful) { // PureShot image ready for playback or export } }).start(); ``` -------------------------------- ### getSupportCaptureSettingList() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets capture settings/properties supported for given mode. ```java public List getSupportCaptureSettingList(CaptureMode mode) ``` -------------------------------- ### Get Singleton Instance Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Returns the singleton instance of InstaCameraManager. ```java public static InstaCameraManager getInstance() ``` ```java InstaCameraManager manager = InstaCameraManager.getInstance(); ``` -------------------------------- ### Photo Capture - startStarLapseShooting() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting starlapse shooting, with and without GPS data. ```java public void startStarLapseShooting() public void startStarLapseShooting(byte[] gpsData) ``` -------------------------------- ### play() Method Signature Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Method signature for starting the playback of the preview stream. ```java public void play() ``` -------------------------------- ### Get Camera Type Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Retrieves the type of the camera, for example, 'Insta360 X4'. It also shows how to get the corresponding enumeration for the camera type. ```Java // Get the camera type, such as: Insta360 X4 String cameraType = InstaCameraManager.getInstance().getCameraType(); // Get enumeration CameraType type = CameraType.getForType(cameraType); ``` -------------------------------- ### Firmware Upgrade Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example code for managing firmware upgrades. ```Java // Determine if an upgrade is in progress FwUpgradeManager.getInstance().isUpgrading(); // Cancel the upgrade FwUpgradeManager.getInstance().cancelUpgrade(); String fwFilePath = "/xxx/InstaOneXFW.bin"; // Upgrade firmware FwUpgradeManager.getInstance().startUpgrade(fwFilePath, new FwUpgradeListener() { @Override public void onUpgradeSuccess() { // Callback after successful upgrade } @Override public void onUpgradeFail(int errorCode, String message) { // Upgrade failure callback // Firmware error code } @Override public void onUpgradeCancel() { // Upgrade cancel callback } @Override public void onUpgradeProgress(double progress) { // Upgrade progress callback: 0-1 } }); ``` -------------------------------- ### getSupportedPreviewStreamResolution() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets supported preview resolutions for a given preview type. ```java public List getSupportedPreviewStreamResolution(int previewType) ``` -------------------------------- ### getAllUrlListIncludeRecording() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets URLs of all media files, including currently recording video. ```java public List getAllUrlListIncludeRecording() ``` -------------------------------- ### Photo Capture - startNightScene() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting night scene/super night capture, with and without GPS data. ```java public void startNightScene() public void startNightScene(byte[] gpsData) ``` -------------------------------- ### USB Device Filter Configuration Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Configure the AndroidManifest.xml and create a device_filter.xml for USB device connections. ```xml ``` ```xml ``` -------------------------------- ### Photo Capture - startBurstCapture() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting burst mode photo capture, with and without GPS data. ```java public void startBurstCapture() public void startBurstCapture(byte[] gpsData) ``` -------------------------------- ### Photo Capture - startNormalCapture() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting normal photo capture, with and without GPS data. ```java public void startNormalCapture() public void startNormalCapture(byte[] gpsData) ``` -------------------------------- ### InstaImagePlayerView Initialization Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example of how to initialize and bind the InstaImagePlayerView lifecycle in an Activity. ```XML ``` ```Java @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_preview); mImagePlayerView.setLifecycle(getLifecycle()); } ``` -------------------------------- ### Get Firmware Version Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Retrieves the firmware version of the camera, for example, '0.9.24'. ```Java // Get the camera firmware version, e.g. 0.9.24 String fwVersion = InstaCameraManager.getInstance().getCameraVersion(); ``` -------------------------------- ### Photo Capture - startIntervalShooting() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting interval shooting (timelapse photos), with and without GPS data. ```java public void startIntervalShooting() public void startIntervalShooting(byte[] gpsData) ``` -------------------------------- ### getCameraHttpPrefix() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets the camera's HTTP server prefix for file access. ```java public String getCameraHttpPrefix() ``` -------------------------------- ### Format the SD Card Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example code for formatting the SD card. ```Java InstaCameraManager.getInstance().formatStorage(new ICameraOperateCallback() { @Override public void onSuccessful() { // SD card formatted successfully } @Override public void onFailed() { // SD card formatting failed } @Override public void onCameraConnectError() { // Camera connection error } }); ``` -------------------------------- ### getAllUrlList() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets URLs of all media files on the camera, excluding in-progress recordings. ```java public List getAllUrlList() ``` -------------------------------- ### Photo Capture - startHDRCapture() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signatures for starting HDR photo capture, with and without GPS data. ```java public void startHDRCapture() public void startHDRCapture(byte[] gpsData) ``` -------------------------------- ### Temporary Network Binding for Wi-Fi Connection Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Demonstrates how to temporarily bind the process to the camera's Wi-Fi network for HTTP operations and then rebind to the internet network. ```java // Before using HTTP features (file download, support config): bindProcessToNetwork(cameraNetwork); // Bind to camera Wi-Fi // ... perform HTTP operations ... bindProcessToNetwork(internetNetwork); // Rebind to internet // Pros: Simple implementation // Cons: Temporary internet disconnect ``` -------------------------------- ### Start/Stop Recording Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Examples for starting and stopping various recording modes including normal, HDR, Bullet Time, timelapse, time shift, loop recording, super recording, slow motion, selfie tracking, and pure recording. ```Plain Text // Start normal recording InstaCameraManager.getInstance().startNormalRecord(); // Stop normal recording InstaCameraManager.getInstance().stopNormalRecord(); // Start HDR recording InstaCameraManager.getInstance().startHDRRecord(); // Stop HDR recording InstaCameraManager.getInstance().stopHDRRecord(); // Start Bullet Time InstaCameraManager.getInstance().startBulletTime(); // Stop Bullet Time InstaCameraManager.getInstance().stopBulletTime(); // Start timelapse recording InstaCameraManager.getInstance().startTimeLapse(); // Stop timelapse recording InstaCameraManager.getInstance().stopTimeLapse(); // Start time shift recording InstaCameraManager.getInstance().startTimeShift(); // Stop time shift recording InstaCameraManager.getInstance().stopTimeShift(); // Start loop recording InstaCameraManager.getInstance().startLooperRecord(); // Stop loop recording InstaCameraManager.getInstance().stopLooperRecord(); // Start super recording InstaCameraManager.getInstance().startSuperRecord(); // Stop super recording InstaCameraManager.getInstance().stopSuperRecord(); // Start slow motion recording InstaCameraManager.getInstance().startSlowMotionRecord(); // Stop slow motion recording InstaCameraManager.getInstance().stopSlowMotionRecord(); // Start selfie tracking mode InstaCameraManager.getInstance().startSelfieRecord(); // Stop selfie tracking mode InstaCameraManager.getInstance().stopSelfieRecord(); // Start night scene recording InstaCameraManager.getInstance().startPureRecord(); // Stop night scene recording InstaCameraManager.getInstance().stopPureRecord(); ``` -------------------------------- ### Camera File Integration Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-WorkUtils.md Constructs file paths for camera files and creates a WorkWrapper. ```java String cameraHttpPrefix = InstaCameraManager.getInstance().getCameraHttpPrefix(); // Example: "http://192.168.42.1:80" List fileUrls = InstaCameraManager.getInstance().getAllUrlList(); // Example result: ["/DCIM/Camera01/VID_20250326_184618_00_001.insv"] // Create WorkWrapper with camera files String[] fullUrls = new String[fileUrls.size()]; for (int i = 0; i < fileUrls.size(); i++) { fullUrls[i] = cameraHttpPrefix + fileUrls.get(i); } WorkWrapper cameraWork = new WorkWrapper(fullUrls); ``` -------------------------------- ### Capture Parameters - Setters with Dependency Checking Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Example of setting photo HDR type with a dependency checker callback. ```java InstaCameraManager.getInstance().setPhotoHdrType(mode, type, new IDependChecker() { @Override public void check(List affectedSettings) { // Update UI for affected settings } } ); ``` -------------------------------- ### Camera Prompt Sound Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example code for controlling the camera prompt sound. ```Java // Turn on the camera prompt tone InstaCameraManager.getInstance().setCameraBeepSwitch(true); // Determine whether the camera has a prompt tone turned on boolean isBeep = InstaCameraManager.getInstance().isCameraBeep(); ``` -------------------------------- ### exportImage() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-ExportUtils.md Example usage of the exportImage method with ExportImageParamsBuilder. ```java ExportImageParamsBuilder builder = new ExportImageParamsBuilder() .setExportMode(ExportUtils.ExportMode.PANORAMA) .setTargetPath("/sdcard/export/panorama.jpg") .setWidth(2048) .setHeight(1024); int exportId = ExportUtils.exportImage(workWrapper, builder, new IExportCallback() { @Override public void onSuccess() {} @Override public void onFail() {} @Override public void onCancel() {} @Override public void onProgress(float progress) { updateProgressBar((int)(progress * 100)); } } ); ``` -------------------------------- ### Set Preview Parameters Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Provides an example of setting various parameters for the capture preview using CaptureParamsBuilderV2. ```Java private CaptureParamsBuilderV2createParams() { CaptureParamsBuilderV2builder = new CaptureParamsBuilderV2() // (Optional) Set your resolution and frame rate. The default values are generated intelligently by the SDK. .setWidth(int width) .setHeight(int height) .setFps(int fps) //Max 30fps // (optional) achromatic Default value is true .setImageFusionEnabled(boolean enable) // (Optional) Set the gesture switch. The default value is generated intelligently by the SDK .setGestureEnabled(boolean enable) // (Optional) Set the number of frames cached for anti-shake. The more frames cached, the better the anti-shake effect, but the higher the image delay. .setStabCacheFrameNum(5) // (Optional) Set the stabilization type. The default value is generated intelligently by the SDK. .setStabType(@InstaStabType.StabType int mStabType) // (Optional) Set the rendering mode; the default value is “RenderModel.AUTO”. .setRenderModel(RenderModel.PLANE_STITCH) // (Optional) Set the screen ratio. For example, 9:16. The default value is generated by the SDK. // If the rendering mode type is “PLANE_STITCH”, it is recommended to set the aspect ratio to 2:1. .setScreenRatio(int,int) // (Optional) Set custom Surface information .setCameraRenderSurfaceInfo(CameraRenderSurfaceInfo); return builder; } ``` -------------------------------- ### Video Export Options Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Builder pattern for configuring video export parameters, including target path, dimensions, encoding settings, export mode, processing options, and caching. ```java ExportVideoParamsBuilder builder = new ExportVideoParamsBuilder() // Required .setTargetPath("/sdcard/export/video.mp4") // Dimensions (power of 2) .setWidth(2048) .setHeight(1024) // Encoding .setBitrate(20 * 1024 * 1024) // 20 Mbps .setFps(30) // Export mode .setExportMode(ExportUtils.ExportMode.PANORAMA) // Processing .setDynamicStitch(true) .setImageFusion(true) .setDePurpleFilterOn(false) .setDenoise(true) // If supported // Caching .setCacheWorkThumbnailRootPath(cacheDir + "/thumbnails") .setCacheCutSceneRootPath(cacheDir + "/cutscene"); ``` -------------------------------- ### prepare() Method Signature Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-PlayerViews.md Method signature for preparing the preview player with specified parameters. ```java public void prepare(CaptureParamsBuilderV2 paramsBuilder) ``` -------------------------------- ### stopExport() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-ExportUtils.md Example usage of the stopExport method to cancel an export operation. ```java // Cancel if still running ExportUtils.stopExport(exportId); ``` -------------------------------- ### exportVideoToImage() Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-ExportUtils.md Example usage of the exportVideoToImage method to extract a frame from a video. ```java ExportImageParamsBuilder builder = new ExportImageParamsBuilder() .setExportMode(ExportUtils.ExportMode.SPHERE) .setTargetPath("/sdcard/export/frame.jpg") .setWidth(512) .setHeight(512) .setFov(mVideoPlayerView.getFov()) .setDistance(mVideoPlayerView.getDistance()) .setYaw(mVideoPlayerView.getYaw()) .setPitch(mVideoPlayerView.getPitch()); int exportId = ExportUtils.exportVideoToImage(workWrapper, builder, callback); ``` -------------------------------- ### Complete Usage Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/FwUpgradeManager.md Demonstrates a full implementation of the firmware upgrade process within an Android Activity, including UI updates, battery checks, and error handling. ```java public class FirmwareUpgradeActivity extends AppCompatActivity { private ProgressBar progressBar; private TextView statusText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fw_upgrade); progressBar = findViewById(R.id.progress_bar); statusText = findViewById(R.id.status_text); findViewById(R.id.btn_upgrade).setOnClickListener(v -> startUpgrade()); findViewById(R.id.btn_cancel).setOnClickListener(v -> cancelUpgrade()); } private void startUpgrade() { // Select firmware file (user selection or pre-configured path) String fwPath = "/sdcard/firmware/X4_v1.9.4.bin"; File fwFile = new File(fwPath); if (!fwFile.exists()) { Toast.makeText(this, "Firmware file not found", Toast.LENGTH_SHORT).show(); return; } // Check battery int battery = InstaCameraManager.getInstance() .getCameraCurrentBatteryLevel(); if (battery < 12) { Toast.makeText(this, "Battery too low (need >= 12%)", Toast.LENGTH_SHORT).show(); return; } // Start upgrade FwUpgradeManager.getInstance().startUpgrade(fwPath, new FwUpgradeListener() { @Override public void onUpgradeProgress(double progress) { int percent = (int)(progress * 100); progressBar.setProgress(percent); statusText.setText("Upgrading: " + percent + "%"); } @Override public void onUpgradeSuccess() { statusText.setText("Upgrade successful!"); progressBar.setProgress(100); Toast.makeText(FirmwareUpgradeActivity.this, "Firmware upgraded successfully", Toast.LENGTH_LONG).show(); } @Override public void onUpgradeFail(int errorCode, String message) { statusText.setText("Upgrade failed: " + message); Log.e("FwUpgrade", "Error " + errorCode + ": " + message); showErrorDialog(errorCode, message); } @Override public void onUpgradeCancel() { statusText.setText("Upgrade cancelled"); progressBar.setProgress(0); } } ); } private void cancelUpgrade() { if (FwUpgradeManager.getInstance().isUpgrading()) { FwUpgradeManager.getInstance().cancelUpgrade(); statusText.setText("Cancelling upgrade..."); } } private void showErrorDialog(int errorCode, String message) { new AlertDialog.Builder(this) .setTitle("Upgrade Error") .setMessage("Code: " + errorCode + "\n" + message) .setPositiveButton("OK", null) .show(); } } ``` -------------------------------- ### Image Export Options Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md Builder pattern for configuring image export parameters, including target path, dimensions, export mode, processing options, and caching. ```java ExportImageParamsBuilder builder = new ExportImageParamsBuilder() // Required .setTargetPath("/sdcard/export/image.jpg") // Dimensions .setWidth(2048) .setHeight(1024) // Export mode .setExportMode(ExportUtils.ExportMode.PANORAMA) // Processing .setDynamicStitch(true) .setImageFusion(true) .setDePurpleFilterOn(false) // Caching .setCacheWorkThumbnailRootPath(cacheDir + "/thumbnails") .setStabilizerCacheRootPath(cacheDir + "/stabilizer") .setCacheCutSceneRootPath(cacheDir + "/cutscene"); ``` -------------------------------- ### Batch Parameter Settings - beginSettingOptions() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Method signature for beginning batch parameter setting mode. ```java public void beginSettingOptions() ``` -------------------------------- ### initCameraSupportConfig() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Initializes camera support configuration. Required for X4+ cameras before capture. Should be called when entering preview or switching lenses. ```java public void initCameraSupportConfig(ISupportConfigCallback callback) ``` ```java InstaCameraManager.getInstance().initCameraSupportConfig(success -> { if (success) { // Can now query capture modes and settings } }); ``` -------------------------------- ### Safe Callback Handling Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/errors.md Demonstrates how to safely handle callbacks from camera operations, including success, failure, and connection error scenarios. ```java InstaCameraManager.getInstance().openCamera(InstaCameraManager.CONNECT_TYPE_WIFI); ``` ```java InstaCameraManager.getInstance().fetchCameraOptions(new ICameraOperateCallback() { @Override public void onSuccessful() { // Operation completed successfully } @Override public void onFailed() { // Operation failed (camera-side error) Toast.makeText(context, "Operation failed", Toast.LENGTH_SHORT).show(); } @Override public void onCameraConnectError() { // Camera disconnected or unreachable Toast.makeText(context, "Camera connection lost", Toast.LENGTH_SHORT).show(); } }); ``` -------------------------------- ### HDR Image Generation Example Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-StitchUtils.md Example of generating an HDR image and using the output for playback or export. ```java new Thread(() -> { // Ensure extra data is loaded workWrapper.loadExtraData(); String hdrOutputPath = "/sdcard/DCIM/hdr_output.jpg"; boolean isSuccessful = StitchUtils.generateHDR(workWrapper, hdrOutputPath); if (isSuccessful) { // Can use as proxy for playback ImageParamsBuilder playBuilder = new ImageParamsBuilder() .setUrlForPlay(hdrOutputPath); // Or as export input ExportImageParamsBuilder exportBuilder = new ExportImageParamsBuilder() .setUrlForExport(hdrOutputPath); } }).start(); ``` -------------------------------- ### Example Usage for Parameter Value Types Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/types.md Demonstrates how to retrieve and use enumeration types for camera settings like RecordResolution. ```java List resolutions = InstaCameraManager.getInstance() .getSupportRecordResolutionList(mode); for (RecordResolution res : resolutions) { // Use res value } ``` -------------------------------- ### ProGuard/R8 Configuration Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/configuration.md ProGuard or R8 configuration rules to ensure that Insta360 SDK classes, callbacks, interfaces, and native methods are not removed or obfuscated. ```proguard # Keep SDK classes -keep class com.arashivision.sdk.** { *; } -keep class com.arashivision.sdkcamera.** { *; } -keep class com.arashivision.sdkmedia.** { *; } # Keep callbacks and interfaces -keep interface com.arashivision.sdk.**.* # Keep native methods -keepclasseswithmembernames class * { native ; } ``` -------------------------------- ### getPreviewStatus Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets current preview stream status. ```java public int getPreviewStatus() ``` -------------------------------- ### getCurrentCaptureMode() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets the currently active capture mode. ```java public CaptureMode getCurrentCaptureMode() ``` -------------------------------- ### getSupportCaptureMode() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Gets all capture modes supported by current lens. ```java public List getSupportCaptureMode() ``` -------------------------------- ### Calibration of Gyroscope Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/README.md Example code for calibrating the gyroscope. ```Java InstaCameraManager.getInstance().calibrateGyro(new ICameraOperateCallback() { @Override public void onSuccessful() { } @Override public void onFailed() { } @Override public void onCameraConnectError() { } }); ``` -------------------------------- ### FwUpgradeListener Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/types.md Callback for firmware upgrade status. ```java public interface FwUpgradeListener { void onUpgradeProgress(double progress) void onUpgradeSuccess() void onUpgradeFail(int errorCode, String message) void onUpgradeCancel() } ``` -------------------------------- ### Open Camera Connection Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Initiates camera connection. Must be executed on the main thread. ```java public void openCamera(int connectType) ``` ```java // Wi-Fi connection InstaCameraManager.getInstance().openCamera(InstaCameraManager.CONNECT_TYPE_WIFI); // USB connection InstaCameraManager.getInstance().openCamera(InstaCameraManager.CONNECT_TYPE_USB); ``` -------------------------------- ### getCreationTime() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-WorkUtils.md Gets media capture timestamp. ```java public long getCreationTime() ``` -------------------------------- ### getHeight() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-WorkUtils.md Gets media height in pixels. ```java public int getHeight() ``` -------------------------------- ### getWidth() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/MediaSDK-WorkUtils.md Gets media width in pixels. ```java public int getWidth() ``` -------------------------------- ### SDK Initialization Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/InstaCameraManager.md Initializes the SDK in the application. Must be called once during app startup. ```java public static void init(Context context) ``` ```java public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); InstaCameraSDK.init(this); } } ``` -------------------------------- ### getInstance() Source: https://github.com/insta360develop/android-sdk/blob/V1.10.1/_autodocs/api-reference/FwUpgradeManager.md Returns singleton instance for firmware operations. ```java public static FwUpgradeManager getInstance() ```