Problem init a custom made Daemon in Android

by jerryfan2000 » Fri, 10 Apr 2009 10:51:16 GMT

Sponsored Links
I ported CUPSD to Android but have some problem initializing cupsd by
manually typing cupsd & in terminal. Cupsd alawys exits with error. I
haven't tried to start cupsd by adding service in init,rc due to some
technical difficulty. So just not sure is it  wrong to start a daemon
manually? Can somebody explains the difference of initing service from
within init.rc and initing service manually. Thanks.


Other Threads

1. Help with Gestures please

Hi everyone,

I have an image view that takes up more than the screen space so I
want to implement some custom scrolling with gestures I basically want
to be able to drag(scroll) the image right,left, down, up. I sort of
have the left right working, it isn't very smooth but it works. How do
I get up/down to be recognized? Are there any examples I can look at
that show this right,left,up,down gesture behavior? Here is the code I
currently have:

public boolean onScroll(MotionEvent e1, MotionEvent e2,
                                float distanceX, float distanceY) {
                        // TODO Auto-generated method stub
                        radarImage.scrollBy(10, 0);
                        }else if(e1.getX() < e2.getX()){
                                radarImage.scrollBy(-10, 0);

                        return false;

Thanks so much for the help, I truly appreciate it,



2. AudioRecord API - STATE_UNITIALIZED - What do you do?

I have an app that records 8Khz audio, saves to the SD and plays it
back.  It uses the AudioRecord API and it works just fine on my Nexus
One (2.2), Behold II (1.6), Cliq XT (1.5) and the emulator (tested
from 1.5 to 2.2).

However, on the market error report, I am seeing the following
Caused by: java.lang.IllegalStateException: startRecording() called on
an uninitialized AudioRecord.

It occurs when I attempt to call startRecording() on an instantiated
AudioRecord object. If I catch this exception, or use the getState()
method to determine I am the AudioRecord instance is in an Unitialized
state, what can I do at that point?  I've tried creating a new
AudioRecord object, but it just fails with the same
IllegalStateException upon calling startRecord().

if (audioRecordInstance.getState() == AudioRecord.STATE_UNITIALIZED) {
   // what can I do here??
   audoRecordInstance.stop(); // this throws an illegalStateException


3. gunggu-EVoRoYo v0.9 , Froyo for EVO edisi id-android, testers wanted!!!

4. AppWidgetManager updateAppWidget throws NullPointerException

5. problems with the old and new Contact API

6. Close all activities and services for an app?

7. need help with background process