when i use just_audio_background and PsPdfKit together then this issue is coming just_audio_background needs
android:name="com.ryanheise.audioservice.AudioServiceActivity"
in androidManifest.xml
i tried to change
android:name="com.ryanheise.audioservice.AudioServiceActivity"
to android:name = ".MainActivity" and also tried
android:name = "io.flutter.embedding.android.FlutterAppCompatActivity"
but with these changes its not building from android and one more thing its working fine for ios
Instead of modifying the android.name, you can implement in MainActivity:
import android.content.Context;
import com.ryanheise.audioservice.AudioServicePlugin;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
public class MainActivity extends FlutterActivity {
@Override
public FlutterEngine provideFlutterEngine(Context context) {
return AudioServicePlugin.getFlutterEngine(context);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With