Insta360Develop / CameraSDK-Android

Android SDK to control Insta360 cameras
82 stars 9 forks source link

Android 14 (API 34) cant connect to camera #66

Open mordekai91 opened 6 months ago

mordekai91 commented 6 months ago

Im having issues on connecting camera on newer phones, fails on: InstaCameraManager.getInstance().openCamera(InstaCameraManager.CONNECT_TYPE_WIFI);

I tried demo app and occurs the same. On Insta360 app from market works well.

Captura de pantalla 2024-03-27 a las 12 39 06
DmitriyPaliy commented 6 months ago

I have the same problem, it lies in the fact that you have a grad and android version in the project higher than in the demo, apparently some part of the SDK does not work because of this, I have not yet found how to fix it. If anyone has encountered a similar problem, please help

Antiglobalist commented 5 months ago

I faced with same issue: SDK version 1.5.3(1.5.6 contains the same problem) I suppose the problem is there

image image

mordekai91 commented 5 months ago

I faced with same issue: SDK version 1.5.3(1.5.6 contains the same problem) I suppose the problem is there

image image

Thank you @Antiglobalist , hope they fix it soon because this is seriously affecting our software :/

tdsoft commented 5 months ago

Could anyone fix this issue?

uzair0cha commented 5 months ago

was anyone to figure a sustainable fix for this?

csk14 commented 2 months ago

I am facing the same issue. To target the latest API level 34, I am trying to update our cordova android app following https://cordova.apache.org/announcements/2024/05/23/cordova-android-13.0.0.html

Steps:

  1. In "buildspec.yaml" file,

updated cordova platform add android@12.0.0 to cordova platform add android@13.0.0

  1. In "cordova/config-android.xml" file,

updated <preference name="android-targetSdkVersion" value="33" /> to <preference name="android-targetSdkVersion" value="34" />

<engine name="android" spec="12.0.0" /> to <engine name="android" spec="13.0.0" />,

please note minSdkVersion value <preference name="android-minSdkVersion" value="26" />

  1. In my plugin ".../insta360camera/plugin.gradle" file,

updated `defaultBuildToolsVersion - 33.0.2 to 34.0.0 ,

defaultMinSdkVersion - 26 (no change),

defaultTargetSdkVersion - 33 to 34,

defaultCompileSdkVersion - 33 to 34`.

dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" implementation "androidx.preference:preference:1.2.1" implementation 'com.arashivision.sdk:sdkcamera:1.5.6' implementation 'com.arashivision.sdk:sdkmedia:1.5.6' }

  1. In my ".../insta360camera/InstaCamera.kt", to address a build issue

changed private val appViewModelStore: ViewModelStore by lazy { ViewModelStore() } to override val viewModelStore: ViewModelStore by lazy { ViewModelStore() }

had to remove override fun getViewModelStore(): ViewModelStore { return appViewModelStore }

please let me know if I am missing anything to fix the issue.

csk14 commented 2 months ago

Updating SDK version of com.arashivision.sdk:sdkcamera, com.arashivision.sdk:sdkmedia to 1.6.4 fixed the issue.