CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
322 stars 233 forks source link

fix: session was not closed issue in Android #63

Closed Koobonik closed 2 years ago

Koobonik commented 2 years ago

Hi Guys, I fixed error in Android!

In version 0.6.0, the app turned off after 30 times dispose. In version 0.6.1, the app turned off after 70 times dispose. And now, The app does not turn off after dispose! The animation continued to be soft and the amount of heat generated became very low. Overall, it was optimized.

CariusLars commented 2 years ago

nice! I'll have a look at the new code this afternoon or at the latest this weekend and merge it into main :)

CariusLars commented 2 years ago

@Koobonik I left a few questions in your code, after they are clarified I'll merge it :)

Koobonik commented 2 years ago

@CariusLars I always feel grateful for your efforts.

CariusLars commented 2 years ago

hey @Koobonik , can you have a look at the questions I asked on this PR? if we clarify this I can go on and merge it :)

Koobonik commented 2 years ago

@CariusLars Yes, You can. How can I see your questions?

CariusLars commented 2 years ago

they are further up in this discussion thread, I've attached a screenshot on how it looks for me:

image
Koobonik commented 2 years ago

In the fisrt case, So many flutter libs set null after dispose. because, It helps to prevent memory leak.

second case, you right, The difference from arcore was compared. I think I made a mistake there. you can delete "faceSceneUpdateListener" function

CariusLars commented 2 years ago

are you sure the method call handlers are automatically disposed?

also, could you remove the faceSceneUpdateListener code pieces so I can compare and test the code better?

Thanks @Koobonik !

Koobonik commented 2 years ago

hi @CariusLars sorry about too late I will send a new code in Sunday. :)

naveenbharadwaj19 commented 2 years ago

@Koobonik Any update #71 ? Am i the only one facing this issue ?

Koobonik commented 2 years ago

@naveenbharadwaj19 Does it mean an issue that Turn OFF when you go home while running the app and then return right?

naveenbharadwaj19 commented 2 years ago

@Koobonik Well yeah. It's terminating whole app . I've added a demo video in #71 how the crash is happening

CariusLars commented 2 years ago

@Koobonik I've merged your changes into main in the current v0.6.2

Koobonik commented 2 years ago

@CariusLars Thanks! If I find something. I will PR :)