oneconnectapi / OneConnectSdk-demo-android

OneConnect VPN is a private virtual network that has unique features and has high security. Any Developers can Create their Dream VPN App Using Our SDK and Resource
https://developer.oneconnect.top/
12 stars 2 forks source link

Server connect but return empty array #21

Closed waseem-GitHub-Live closed 11 months ago

waseem-GitHub-Live commented 11 months ago

i have purchased the premium servers as well but when code runs in splash its return empty both free and premium server

runBlocking { launch(Dispatchers.IO) { try { Log.d("MyApp", "Coroutine started") // Log that the coroutine has started val oneConnect = OneConnect() oneConnect.initialize(this@SplashActivity, "2w0QvmDcWoNfZWTmEukdhdjskskljkskfXSsF8JAu4zbvgLka2Br7u1ioLpiIvr9UE8Y6lw") val response = oneConnect.fetch(true) Log.d("MyApp", "API Response: $response") try { Constants.FREE_SERVERS = oneConnect.fetch(true) //// this part return emptylist Constants.PREMIUM_SERVERS = oneConnect.fetch(true)//// this part return empty list Log.d("MyApp", "Data fetched successfully") // Log that data was fetched successfully } catch (e: IOException) { e.printStackTrace() Log.e("MyApp", "IOException: " + e.message) // Log any IOException } } catch (e: Exception) { e.printStackTrace() Log.e("MyApp", "Exception: " + e.message) // Log any other exceptions } } }

comment mention where list is empty in code this code is running in splash on create

MirzaQais commented 6 months ago

How did you find the solution in demo project i am getting the null array also.

waseem-GitHub-Live commented 6 months ago

@MirzaQais Check server it must be closed from admin side , login in your account oneconnect and on the servers or change the key , key will genrate when u give your app package name

MirzaQais commented 6 months ago

But on demo app it should work ?

On Wed, Mar 6, 2024, 4:05 PM Waseem Akram @.***> wrote:

@MirzaQais https://github.com/MirzaQais Check server it must be closed from admin side , login in your account oneconnect and on the servers or change the key , key will genrate when u give your app package name

— Reply to this email directly, view it on GitHub https://github.com/oneconnectapi/OneConnectSdk-demo-android/issues/21#issuecomment-1980618877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQKRO3QZHWL5ZO7EGI7QGSLYW3Z7VAVCNFSM6AAAAAA5BKPOVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBQGYYTQOBXG4 . You are receiving this because you were mentioned.Message ID: @.***>

waseem-GitHub-Live commented 6 months ago

@MirzaQais Yes

MirzaQais commented 6 months ago

It is not working on demo, how to test it then?