December 17th, 2012, 06:55 AM
|
#1 (permalink)
|
|
New Member
Thread Author (OP)
Join Date: Dec 2012
Posts: 1
Device(s):
Carrier: Not Provided
Thanks: 0
Thanked 0 Times in 0 Posts
|
Android USB Communication
I am new to android programming and I am trying to set a connection with the android as a host. I have included the following imports:
import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbDeviceConnection;
import android.content.Context;
My problem is when I use this code :m_usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
The eclipse editor shows a message saying that getSystemService(String) is undefined for the type CPrinterCommands(The class that I am using). Quick fix gives as a solution to create a method called getSystemService, however I canīt find why I would need to create a method, all the examples I found, none of them had a method getSystemService. Does anybody have a glue of what is wrong with my code??? Thanks
|
|
|