mahesh
mahesh

Reputation: 135

Blue tooth data transfer issue on android tab

I don't much know about android or phonegap, but our app is in sencha touch 2, here we are trying to transfer blue tooth data from one device to other using phone gap. Following code sample was working on phonegap 1.5,

     IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
                   this.ctx.registerReceiver(mReceiver, filter);

But when I upgraded phonegap to 2.0, ctx.registerReceiver is not present, and giving error.

Upvotes: 0

Views: 157

Answers (1)

mahesh
mahesh

Reputation: 135

"ctx" is deprecated in latest phonegap, we need to replace it with "cordova.getActivity().getApplicationContext()".

Upvotes: 1

Related Questions