beattv / react-native-screen-recorder

MIT License
3 stars 1 forks source link

Android is not working #1

Open phithu opened 4 years ago

phithu commented 4 years ago

Thank for create great library. I test on Android but it is not working. My system: React Native = 0.63.2 Android Version = 10 My Device = Realme 6 buildToolsVersion = "29.0.2" minSdkVersion = 26 compileSdkVersion = 29 targetSdkVersion = 29 googlePlayServicesAuthVersion = "17.0.0"

voslartomas commented 4 years ago

Hi, what exactly does not work?

phithu commented 4 years ago

@voslartomas thank for your response. When I click start record button, app will be crashed

voslartomas commented 4 years ago

So send some error reports, so we can see why it is crashing

phithu commented 4 years ago

Okay @voslartomas, I will check error message in logcat and I will update it

phithu commented 4 years ago

Hi @voslartomas. This is error message Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION. When I downgrade targetSdkVersion = 28. It is working well

voslartomas commented 4 years ago

You need to include this permission

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
phithu commented 4 years ago

Yes. I added it to AndroidManifest, but it is not working

voslartomas commented 4 years ago

Try something from here then

https://stackoverflow.com/questions/61276730/media-projections-require-a-foreground-service-of-type-serviceinfo-foreground-se

phithu commented 4 years ago

Let me try. Thanks

voslartomas commented 4 years ago

@phithu Is it working for you already?

phithu commented 4 years ago

No man

voslartomas commented 3 years ago

@phithu Ok, so after all I got this error as well, it was because of changes in Android 10. I just released new version, which fixes this.

Raj123456788 commented 3 years ago

@voslartomas : Can you please help me with the fix? I have been stuck since 4 days now.

voslartomas commented 3 years ago

@Raj123456788 It should be just about using the newest version.