Getting log information

by sudheer » Sun, 07 Sep 2008 09:26:46 GMT


Sponsored Links
 Hello All

I am running an application in emulator. how can I get the logs re
directed to a file in android file system (say ../../tmp/mylog.txt)??
any idea?
I tried using adb logcat -f "file" option but it isn't returning any
thing.am i doing something wrong?
or is there a method to do this.

my scenario is
I install an application using install command
I execute the application (using activity manager)
I need to get the adb logs generated for this application execution to
a file in android file system
which I will recover later to my work station.


I  tried using adb logcat -f option and it didn't dump any data into
the file.
whats the best way to do this?

any pointers will be appreciated.

Best Regards,
Sudheer

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. what is wrong with this simple custom view?

Hi There,

I have created a simple custom view to display a line and added it to
the LinearLayout.

the custom view is displayed on Screen, the other view following the
cusomview never show up on Screen.

Thanks

here is the code:
from the code, I have added a CheckBox to LinearLayout after adding
CustomView




package android.test.custom;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;

public class Test extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        //setContentView(R.layout.main);
        LinearLayout ll = new LinearLayout(this);
        ll.addView(new CustomView(this),new
LinearLayout.LayoutParams(
                LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        ll.setOrientation(LinearLayout.VERTICAL);
        ll.addView(new CheckBox(this),new LinearLayout.LayoutParams(
                LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        setContentView(ll);
    }
    class CustomView extends View
    {
        public CustomView(Context ctx)
        {
                super(ctx);
        }
                /* (non-Javadoc)
                 * @see android.view.View#onDraw(android.graphics.Canvas)
                 */
                @Override
                protected void onDraw(Canvas canvas) {
                        super.onDraw(canvas);
                        canvas.save();
                        Paint p = new Paint();
                        p.setColor(Color.WHITE);
                        canvas.drawLine(0, 0, 100, 0, p);
                        canvas.restore();
                }
    }
}

--~--~---------~--~----~------------~-------~--~----~

2. How to Format Widget Sizes?

Hi All,

For the longest time I have been trying to figure out how to change
the size of any of the Android widgets. The default widget sizes are
just too big on the screen. I have used the following attributes with
my CheckBox and other widgets, the text sizes changes but the buttons
them self never changes. If anything if I go to small its parts of the
button is clipped.  What am I doing wrong?

               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_weight=".25"
               android:width="30dip"
               android:height="30dip"

Here is a sameple
<CheckBox
android:id="@+id/ckbxTo1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:textSize="10sp"
/>

Thanks,
gilgantic
--~--~---------~--~----~------------~-------~--~----~

3. How to Create a Context

4. Setting click handler for a WebView?

5. SQLiteDatabase.update, example?

6. Location and geocoding question for Google devs

7. Reflection of classes in other packages