Hi all java-experts.
A cry for help from a java-newbee here.
I need this code to work inside a wrapper...
My code looks like this
and fails at...
mBound = bindService(intent, mServiceConnection, BA.applicationContext.BIND_AUTO_CREATE);
Maybe all is completlly wrong, i don't know. If someone could help me with this I would be most greatful!
A cry for help from a java-newbee here.
I need this code to work inside a wrapper...
B4X:
abstract void onPclServiceConnected();
protected void initService()
{
if (!mBound)
{
Log.d(TAG, "initService" );
mServiceConnection = new PclServiceConnection();
Intent intent = new Intent(this, PclService.class);
intent.putExtra("PACKAGE_NAME", "com.ingenico.pcltestappwithlib");
intent.putExtra("FILE_NAME", "pairing_addr.txt");
mBound = bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
}
}
My code looks like this
B4X:
abstract void onPclServiceConnected();
protected void initService()
{
if (!mBound)
{
BA.Log("ISMPWrapper(CommonActivity)(initService)");
mServiceConnection = new PclServiceConnection();
Intent intent = new Intent(BA.applicationContext, PclService.class);
//Intent intent = new Intent(this, PclService.class);
intent.putExtra("PACKAGE_NAME", "se.iqpd.checkout.ismpcompanion");
intent.putExtra("FILE_NAME", "pairing_addr.txt");
mBound = bindService(intent, mServiceConnection, BA.applicationContext.BIND_AUTO_CREATE);
}
}
and fails at...
mBound = bindService(intent, mServiceConnection, BA.applicationContext.BIND_AUTO_CREATE);
Maybe all is completlly wrong, i don't know. If someone could help me with this I would be most greatful!