Custom Keyboard & Drivers

by Hawk » Mon, 04 Jan 2010 16:35:14 GMT


Sponsored Links
 Good day,
I would like to make a (PC) Keyboard work on my phone
sounds like it can be done if you can write custom drivers

will ti work to convert a usb keyboard to Mini USB  and write drivers
for if ?

please dont flame:D

Hawk

-- 



Custom Keyboard & Drivers

by Giuseppe Calderaro » Mon, 04 Jan 2010 16:40:57 GMT


 >

If the device has a usb controller, attaching the keyboard should be enough.
you should be able to use the drivers provided in the kernel without writing
any "custom" driver

Regards

Giuseppe

-- 
---------------------------------------------------------------
Giuseppe Calderaro

Computer Engineer
mobile (uk): +44 (0) 7552694103
mobile (it):  +39 3477823810
e-Mail: giuseppecalder...@gmail.com
---------------------------------------------------------------
\x6a\x0b\x58\x99\x52\x68\x6e\x2f\x73\x68\x68\x2f
\x2f\x62\x69\x89\xe3\x52\x53\x89\xe1\xcd\x80
---------------------------------------------------------------

-- 


Sponsored Links


Other Threads

1. Some Weird results for Calendar Class!! Can some one help

Hi,

I am developing an app which shows a month calendar and can go back and
forth. But when I try to go from March to February it shows March only.
And the same happens when I try to move from Jan to Feb it goes to March
instead of going to Feb. apart from this every thing else works as
expected.

Any idea, why its behaving in such a way. And any solutions to solve this
problem.

here is the sample code


case R.id.nextMonth:
 Calendar nextAction = Calendar.getInstance();
currentMonth = nextAction.get(Calendar.MONTH);     ------for the month of
March it shows March i.e the current month
current++;
 value = currentMonth + current;
 monthYear = (TextView) findViewById(R.id.monthYear);
calendar = (GridView) findViewById(R.id.calendarView);
 nextAction.set(Calendar.MONTH, value);
currentMonth = nextAction.get(Calendar.MONTH);   ------------Gives march if
the value is 1
 try {
nextAction.set(Calendar.DAY_OF_MONTH,1);
firstDay = nextAction.get(Calendar.DAY_OF_WEEK);
numberOfDays = nextAction.getMaximum(Calendar.DAY_OF_MONTH);
totalGrids= numberOfDays + firstDay + 6;
txtMonthYear = CalendarData.MonthName[nextAction
.get(Calendar.MONTH)];
txtMonthYear = txtMonthYear + "  "
+ nextAction.get(Calendar.YEAR);
monthYear.setText(txtMonthYear);


Thanks & Regards,
Yousuf Syed

-- 

2. surfaceview setbackgrounddrawable()

if i leave the setBackgroundDrawable() call out of the V constructor,
i get black background with a line drawn from the lower right corner
to the top left corner; and where ever i move the "cursor" afterwards
(all as expected), but when i have that method call, i only get the
initial x=y=0 line drawn on top of the background image and moving the
"cursor" doesn't do anything

what's up with that?

// code starts here

public class V extends SurfaceView implements SurfaceHolder.Callback {
    private CThread mThread; // class declaration after this one
    public int x;
    public int y;

    public V(Context context) {
        super(context);
        SurfaceHolder holder = getHolder();
        holder.addCallback(this);
        mThread = new CThread(holder,this);
        x = 0;
        y = 0;
 
setBackgroundDrawable(getResources().getDrawable(R.drawable.bg));
    }

    @Override
    public void onDraw(Canvas canvas)
    {
        Paint paint = new Paint();
        paint.setColor(Color.WHITE);
        canvas.drawLine(x, y, getWidth(), getHeight(), paint);
    }

    public boolean onTouchEvent(MotionEvent event) {
        switch (event.getAction()) {
                case MotionEvent.ACTION_MOVE:
                x = (int) event.getX();
                y = (int) event.getY();
                default: break;
        }
        return true;
    }
    public void surfaceCreated(SurfaceHolder holder) {
        mThread.setRunning(true);
        mThread.start();
    }
/* sufraceDestroyed etc */
} // end class declaration

public class CThread extends Thread {

    private SurfaceHolder mSurfaceHolder;
    private V mView;
    private boolean mRun = false;

    public CThread(SurfaceHolder surfaceHolder, V view) {
        mSurfaceHolder = surfaceHolder;
        mView = view;
    }

    public void setRunning(boolean run) {
        mRun = run;
    }

    @Override
    public void run() {
        Canvas c;
        while (mRun) {
            c = null;
            try {
                c = mSurfaceHolder.lockCanvas(null);
                synchronized (mSurfaceHolder) {
                    mView.onDraw(c);
                }
            } finally {
                if (c != null) {
                    mSurfaceHolder.unlockCanvasAndPost(c);
                }
            }
        }
    }
}

-- 

3. ADP3? When?

4. Android ADB.exe License

5. Delay before starting

6. Dont see my app in share menu for Picasa images in galary

7. BroadcastReceiver not recei ving an alarm鈥檚 broadcast