Open pcdus opened 6 years ago
@Goldstrike They haven't updated it for a long time. Attached here the project after updating it. WaveformControl.zip
But I don't get where in the code (if it even exists) it records the audio into file and where I can stop it. So I asked about it here: https://github.com/newventuresoftware/WaveformControl/issues/11
It's true I haven't updated the project for a while and some things changed. I have an update commit ready, but there seems to be some permission problem that I need to sort out. Thank you @AndroidDeveloperLB for the updated project!
Oh, I forgot about the permission part. It's not hard though. Just make it request the permissions, as such (copied from some code I wrote in Kotlin) :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val permissionsToRequest = getAppDeclaredPermissions(this)
requestPermissions(permissionsToRequest, 0)
}
@JvmStatic
fun getAppDeclaredPermissions(context: Context): Array<out String>? {
val pm = context.packageManager
try {
val packageInfo = pm.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS)
return packageInfo.requestedPermissions ?: return null
} catch (ignored: PackageManager.NameNotFoundException) {
//we should always find current app
}
throw RuntimeException("cannot find current app?!")
}
Thanks! Try building the project now. It should be alright.
Hello, I open the solution through Android Studio, and I try to build it, but I get the following error message: