Manifest service org.puredata.android.service.PdService makes app to close

109 Views Asked by At

I'm building a guitar tuner using Pure Data audio (https://github.com/libpd/pd-for-android).

The problem is when I add <service android:name="org.puredata.android.service.PdService" /> in manifest, the app closes after I open in android emulator without errors. But it works on my real device. Any ideas what is wrong?

The service code:

private final ServiceConnection pdConnection = new ServiceConnection() {
    @Override
    public void onServiceConnected(ComponentName name, IBinder service) {
        pdService = ((PdService.PdBinder) service).getService();
        try {
            initPd();
            loadPatch();
        } catch (IOException e) {
            Log.e(TAG, e.toString()); //unable to open Pd audio: 44100, 1, 2
            finish(); // emulator always here.
        }
    }

In gradle I have this:

ndk {
    abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
}

and

implementation 'org.puredata.android:pd-core:1.1.0'

Thanks a lot.

0

There are 0 best solutions below