using TraceView

by rajorshi » Fri, 23 Apr 2010 17:07:38 GMT


Sponsored Links
 Hi,
I have recently started working on an app which has both Java and
native components. I am trying to generate trace information for both
components using Debug.startMethodTracing("myapp") and
Debug.startNativeTracing() alternately. However, both are behaving
unexpectedly. When I use Debug.startMethodTracing("myapp"), I can see
a file "/sdcard/myapp.trace" being created but it is always empty no
matter how long I run my app. When I use Debug.startNativeTracing()
and start the emulator with the -trace <tracename> switch, I see a
message saying "Trace started", but when I try to run my app, the
emulator crashes. Am I missing something obvious here? How do I debug
this problem?

Thanks for any help.

--



Other Threads

1. Message passing between two Android applications



You can use broadcast Intents for this (e.g., sendBroadcast()) or remote
services and AIDL.

Here are two projects employing the latter technique:

http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteClient/
http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteService/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Online Training: 10-14 May 2010: http://onlc.com

-- 

2. Multiple - multiple choice dialogs/activities, questionnaire, one question at the time

Hi there,

I am new at developing for android, so bear with me (and my ignorance).

I have tried to make a series of dialogs, like a questionnaire, that the
user needs to answers a series of questions selecting one or more
checkboxes. I can do one, just fine, but when I try to make more than one
question (lets say 10), it does not show, or show all the dialogs. I tried
using dialogs or new acitivities.

So, my problem is I have multiple questions, one to be presented each time,
and I need to wait for one to be responded so I can ask the next one. How do
I accomplish this?

My first attempt was with a dialog box... but obviously it got all the boxes
stacked in each other:

[code]
 for (int i = 0; i < questions.size(); i++) {

final int counter = i;
 int size = questions.size();
CharSequence[] itemsBuilder = new CharSequence[size];
 boolean[] bitemsBuilder = new boolean[size];

for (int j = 0; j < questions(i).getPossibleAnswers().size(); j++) {
 itemsBuilder[j] = quastions(i).getPossibleAnswers().get(j);
bitemsBuilder[j] = false;
 }

final CharSequence[] items = itemsBuilder;
final boolean[] bitems = bitemsBuilder;
 AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Choose the answer for "
 + question.get(i).getQuestion();
builder.setMultiChoiceItems(items, bitems,
 new DialogInterface.OnMultiChoiceClickListener() {
public void onClick(DialogInterface dialog, int item,
 boolean choice) {
Log.d("choice", "" + item + " " + choice);
 Toast.makeText(getApplicationContext(),
items[item], Toast.LENGTH_SHORT).show();
 }
});
builder.setPositiveButton("next",
 new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
 dialog.dismiss();
}
});

AlertDialog alert = builder.create();
alert.show();
}
[/code]

Regards,
John Romero

-- 

3. How to create "All Day Event" using the Calendar Content Provider?

4. Gallery Application in Eclair / 2.1 problems (Intents)

5. Message passing between two Android applications

6. about "AdSense for Mobile Applications"

7. Hello~~! I have a some question that how to get airplane mode.