LuisMelendez / backport-android-bluetooth

Automatically exported from code.google.com/p/backport-android-bluetooth
0 stars 0 forks source link

How to run backport on Android 2.0.1 #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I run the backport successfully on a HTC Magic (Android 1.6), now I tried
to get the same app running on a Motorola Milestone (Android 2.0.1) which
does not work, see the log below. What do I miss? Any help is highly
appreciated.

03-19 17:33:38.662: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.662: ERROR/dalvikvm(1841): Could not find class
'android.bluetooth.IBluetoothDevice', referenced from method
backport.android.bluetooth.BluetoothAdapter.<init>
03-19 17:33:38.662: WARN/dalvikvm(1841): VFY: unable to resolve const-class
9 (Landroid/bluetooth/IBluetoothDevice;) in
Lbackport/android/bluetooth/BluetoothAdapter;
03-19 17:33:38.662: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x1c at 0x0023
03-19 17:33:38.669: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.<init> code (148 bytes)
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.669: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.cancelDiscovery, referenced from method
backport.android.bluetooth.BluetoothAdapter.cancelDiscovery
03-19 17:33:38.669: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 27: Landroid/bluetooth/IBluetoothDevice;.cancelDiscovery ()Z
03-19 17:33:38.669: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.669: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.cancelDiscovery code (64 bytes)
03-19 17:33:38.669: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.enable, referenced from method
backport.android.bluetooth.BluetoothAdapter.enable
03-19 17:33:38.677: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 28: Landroid/bluetooth/IBluetoothDevice;.enable ()Z
03-19 17:33:38.677: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.677: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.enable code (64 bytes)
03-19 17:33:38.677: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getAddress, referenced from method
backport.android.bluetooth.BluetoothAdapter.getAddress
03-19 17:33:38.677: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 29: Landroid/bluetooth/IBluetoothDevice;.getAddress ()Ljava/lang/String;
03-19 17:33:38.677: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.677: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getAddress code (64 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.listBonds, referenced from method
backport.android.bluetooth.BluetoothAdapter.getBondedDevices
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 39: Landroid/bluetooth/IBluetoothDevice;.listBonds ()[Ljava/lang/String;
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getBondedDevices code (112 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getName, referenced from method
backport.android.bluetooth.BluetoothAdapter.getName
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 32: Landroid/bluetooth/IBluetoothDevice;.getName ()Ljava/lang/String;
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getName code (64 bytes)
03-19 17:33:38.685: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getScanMode, referenced from method
backport.android.bluetooth.BluetoothAdapter.getScanMode
03-19 17:33:38.685: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 36: Landroid/bluetooth/IBluetoothDevice;.getScanMode ()I
03-19 17:33:38.685: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.685: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getScanMode code (104 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.getBluetoothState, referenced from
method backport.android.bluetooth.BluetoothAdapter.getState
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 30: Landroid/bluetooth/IBluetoothDevice;.getBluetoothState ()I
03-19 17:33:38.693: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0004
03-19 17:33:38.693: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.getState code (124 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.isDiscovering, referenced from method
backport.android.bluetooth.BluetoothAdapter.isDiscovering
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 37: Landroid/bluetooth/IBluetoothDevice;.isDiscovering ()Z
03-19 17:33:38.693: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.693: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.isDiscovering code (64 bytes)
03-19 17:33:38.693: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.isEnabled, referenced from method
backport.android.bluetooth.BluetoothAdapter.isEnabled
03-19 17:33:38.693: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 38: Landroid/bluetooth/IBluetoothDevice;.isEnabled ()Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.isEnabled code (64 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.RfcommSocket.bind, referenced from method
backport.android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord
03-19 17:33:38.701: WARN/dalvikvm(1841): VFY: unable to resolve virtual
method 47: Landroid/bluetooth/RfcommSocket;.bind (Ljava/lang/String;I)Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x6e at 0x000f
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.listenUsingRfcommWithServiceRecord
code (251 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.setName, referenced from method
backport.android.bluetooth.BluetoothAdapter.setName
03-19 17:33:38.701: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 40: Landroid/bluetooth/IBluetoothDevice;.setName (Ljava/lang/String;)Z
03-19 17:33:38.701: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0002
03-19 17:33:38.701: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.setName code (64 bytes)
03-19 17:33:38.701: INFO/dalvikvm(1841): Could not find method
android.bluetooth.IBluetoothDevice.startDiscovery, referenced from method
backport.android.bluetooth.BluetoothAdapter.startDiscovery
03-19 17:33:38.708: WARN/dalvikvm(1841): VFY: unable to resolve interface
method 42: Landroid/bluetooth/IBluetoothDevice;.startDiscovery (Z)Z
03-19 17:33:38.708: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x72 at 0x0003
03-19 17:33:38.708: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/BluetoothAdapter;.startDiscovery code (68 bytes)
03-19 17:33:38.755: WARN/dalvikvm(1841): VFY: unable to find class
referenced in signature (Landroid/bluetooth/IBluetoothDevice;)
03-19 17:33:38.763: ERROR/dalvikvm(1841): Could not find class
'android.bluetooth.IBluetoothDevice', referenced from method
backport.android.bluetooth.IBluetoothDeviceLocator.get
03-19 17:33:38.763: WARN/dalvikvm(1841): VFY: unable to resolve check-cast
9 (Landroid/bluetooth/IBluetoothDevice;) in
Lbackport/android/bluetooth/IBluetoothDeviceLocator;
03-19 17:33:38.763: DEBUG/dalvikvm(1841): VFY: replacing opcode 0x1f at 0x0013
03-19 17:33:38.763: DEBUG/dalvikvm(1841): Making a copy of
Lbackport/android/bluetooth/IBluetoothDeviceLocator;.get code (123 bytes)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):
java.lang.ClassNotFoundException: android.bluetooth.IBluetoothDevice$Stub
in loader dalvik.system.PathClassLoader@44c78bd8
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStubClass(ServiceLocator.jav
a:109)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStubInternal(ServiceLocator.
java:143)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.ServiceLocator.getServiceStub(ServiceLocator.java:62)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.IBluetoothDeviceLocator.get(IBluetoothDeviceLocator.j
ava:41)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
backport.android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.j
ava:399)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
de.tvr.mr10.testautobtpairbackport.Mr10BtSvc.startBTService(Mr10BtSvc.java:79)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
de.tvr.mr10.testautobtpairbackport.Mr10BtSvc.onCreate(Mr10BtSvc.java:56)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.handleCreateService(ActivityThread.java:2765)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.access$3200(ActivityThread.java:119)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1902)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.os.Handler.dispatchMessage(Handler.java:99)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.os.Looper.loop(Looper.java:123)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
android.app.ActivityThread.main(ActivityThread.java:4338)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
java.lang.reflect.Method.invoke(Method.java:521)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-19 17:33:38.771: ERROR/ServiceLocator(1841):     at
dalvik.system.NativeStart.main(Native Method)
03-19 17:33:38.779: DEBUG/AndroidRuntime(1841): Shutting down VM

regards

Stefan

Original issue reported on code.google.com by stefanpa...@googlemail.com on 19 Mar 2010 at 4:38

GoogleCodeExporter commented 8 years ago
backport-android-bluetooth is a backport of 2.0(or higher) bluetooth API.
you don't need this project.

Original comment by esma...@gmail.com on 4 Apr 2010 at 11:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

thanks for the answer, but what about creating an app which should run von 
Android 
1.5 AND 2.x. OK, I could build two apps, one for each Android version, but the 
user 
would have to download the right version which is not very handy for them. And 
I  
will have the problem that I have for each compile manually change the imports.

Any solution or for that?

regards

spachner

Original comment by stefanpa...@googlemail.com on 5 Apr 2010 at 1:25

GoogleCodeExporter commented 8 years ago
Spachner,

if you set your target attributes in your manifest  correctly, the market takes 
care of showing the user the 
correct app for their device.

That being said, there are ways to support new and old apis with one code base  
(see android dev blog or 
businesscard sample re: contacts api).  Seems like this project hasn't 
supported this yet but sounds like a 
worthwhile effort (considering 1.6 is still the majority of devices as of this 
posting).

Dario

Original comment by dario.nycjava@gmail.com on 8 Apr 2010 at 7:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I got a email which seems to be an new comment on my issue but the original 
comment does not show up here, so I just copy them here and answer:

-----------------------------------------------------------
Comment #5 on issue 6 by K.Digeser: How to run backport on Android 2.0.1
http://code.google.com/p/backport-android-bluetooth/issues/detail?id=6

Spachner,
have you found a solution?
Because I have the same problem with my programm.

regards

Kate
----------------------------------------------------------

Hi Kate,

I just did the code changes necessary temporarily for 2.x in my code base and 
compile again to get an package runnable for 2.x, too. This was the easiest way 
for me.

regards

spachner

Original comment by stefanpa...@googlemail.com on 1 Sep 2010 at 7:05