[android-developers] Customizing ListAdapter

2008-12-31 Thread Sarath Kamisetty

Hi,

I have a ListActivity for which I am setting up ListAdapter like below:

phoneListAdapter = new SimpleCursorAdapter(this,
R.layout.contacts_list_row,
managedCursor, new String[] { PhonesColumns.NUMBER,
PhonesColumns.TYPE},
new int[] { R.id.text1, R.id.text2 });
setListAdapter(phoneListAdapter);

However, the output here is not readable as PhonesColumns.TYPE is
displaying number strings like 2, 1 etc. A sample output that I get is
like below:

111-222- 2
222-333- 1

I want to make it more readable by converting them to Mobile,
Home, Work etc. A sample desired output list is like below:

111-222- MOBILE
222-333- WORK

Essentially, I don't want the columns to be displayed as is. How do I
achieve this ? My contacts_list_row.xml is like below:

?xml version=1.0 encoding=utf-8?

LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
   android:orientation=horizontal
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   
TextView android:id=@+id/text1
android:layout_width=wrap_content
android:layout_height=wrap_content/

TextView android:id=@+id/text2
android:paddingLeft=10px
android:layout_width=wrap_content
android:layout_height=wrap_content/

/LinearLayout

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: service with a UI

2008-12-31 Thread Sarath Kamisetty

Hi,

The service component of my application needs to do certain tasks at
some scheduled time in future. The task list itself is populated by an
activity (of the same application) along with the exact date  time
the task should be carried out. When there are no tasks, service can
stop running. Even when there are tasks, service doesn't have to run
until the scheduled time of the 1st task in the (sorted) task list.
Once the 1st task is taken care of, it doesn't have to run until next
task's time has come.  I was wondering if android has UNIX crond style
process that can I make use of (programatically).

Also, when new task is added or existing one is deleted, the activity
needs to notify the service. I looked at AIDL but it seems to be more
for communication across processes. If the service and activity are in
the same process, isn't there an easier way to wakeup/notify the
service that tasklist has changed ?

Thanks,
Sarath

On Mon, Dec 29, 2008 at 4:32 PM, Mark Murphy mmur...@commonsware.com wrote:

 Sarath Kamisetty wrote:
 My application has two halves - one that interacts with the user and
 gathers some data and stores it, the other half of it is like service
 that constantly monitors and processes this data and carries out the
 user specified actions in the background. How do I develop this ?

 One approach is to split the app. into two independent parts - an
 activity and a service.  Activity (with textboxes and buttons etc.)
 takes user input and stores the data in sql database. However, it is
 not clear to me if the service portion of the application can access
 it. Is that possible ?

 If it is the SQLite database, then all components in a single
 application can access the database. Here, components refer to
 activities, services, content providers, and intent filters.

 In this approach, the activity and service will
 be completely independent and the activity has to notify the service
 (somehow ?) whenever user inputs new data so that the service can
 reprioritize its task list.

 Use AIDL, static data members, or the like to communicate from the
 activity to the service.

 In
 this approach my app should be running in the background as soon as
 phone is booted up.

 Everybody thinks that. Then people wonder why their phones are so slow. :-(

 I really encourage you to think through whether your application
 absolutely positively must run automatically without user intervention
 when the phone starts up.

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

 Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] looking for developer experienced in Open GL to write a fun app for Android

2008-12-31 Thread androidinsider

Eldev, LLC (Tunes for Android, Jokestr, Wallpaperoid) is looking for a
developer familiar with Open GL technology to write a new, fun
application/game for Android Platform. please send your resume to
eldev...@gmail.com

This is a contract position with good compensation.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread Al Sutton

http://groups.google.com/group/android-developers/browse_thread/thread/c0d243345b90c8a5

jsm wrote:
 I have an application where I need to check whether the user is using
 the actual device not a emulator or others.  I have seen the API where
 there is device id method from phone service.
 I need a generic way to check if the user is on the real device.
 For example if he has downloaded the app from the market, i need to
 know the device id of the user, this is strictly for licensing and
 restricting the use of app.

 Any ideas?
 
   


-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SMS Inbox: 2008's toughest problem ( At least for me)

2008-12-31 Thread linker lv
you can use try catch, show your log.
also, cursor should be close. have a try.

2008/12/31 ipeg.stud...@gmail.com


 ###
 Please help me access the list of sms in the inbox. I am using this
 code, please let me know what is wrong, it always gives a n unexpected
 error popup in the emulator.


 I used a similar code for accessing the contacts list ( People.NAME
 etc ), it worked fine. However, I cannot do it for SMS inbox.

 Thanks in advance and happy new year!
 ###
 package org.anddev.android.hello;

 import android.app.ListActivity;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.provider.Telephony.Sms;
 import android.widget.ListAdapter;
 import android.widget.SimpleCursorAdapter;

 public class HelloAndroid extends ListActivity {

 private ListAdapter mAdapter;

  /** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Cursor c = getContentResolver().query(Sms.Inbox.CONTENT_URI,
 null, null, null, null);//.query(Sms.CONTENT_URI, null, null, null,
 null);
startManagingCursor(c);
String[] columns = new String[]{Sms.Inbox.READ};
int[] names = new int[]{R.id.row_entry};
mAdapter = new SimpleCursorAdapter(this, R.layout.main, c,
 columns, names);

this.setListAdapter(mAdapter);
}

  }
 ###

 Here is the main.xml code

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content

 TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Name: 
/
 TextView
android:id=@+id/row_entry
android:layout_width=wrap_content
android:layout_height=wrap_content
/
 /LinearLayout

 #
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SMS Inbox: 2008's toughest problem ( At least for me)

2008-12-31 Thread linker lv
Uri uri = Uri.parse(content://sms/undelivered);

// Perform a managed query. The Activity will handle closing and
requerying the cursor
// when needed.
Cursor cursor = getContentResolver().query(uri, null, null,
null,null);
startManagingCursor(cursor);
int[] names = new int[]{R.id.row_entry};
String[] columns = new String[]{body};
// Used to map notes entries from the database to views
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.main, cursor,
columns, names);
setListAdapter(adapter);

main.xml
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=@string/hello
android:id=@+id/row_entry/

/LinearLayout

*make sure that there is data in content://sms/undelivered.*
public String strUriInbox = content://sms/inbox;//SMS_INBOX:1
public String strUriFailed = content://sms/failed;//SMS_FAILED:2
public String strUriQueued = content://sms/queued;//SMS_QUEUED:3
public String strUriSent = content://sms/sent;//SMS_SENT:4
public String strUriDraft = content://sms/draft;//SMS_DRAFT:5
public String strUriOutbox = content://sms/outbox;//SMS_OUTBOX:6
public String strUriUndelivered =
content://sms/undelivered;//SMS_UNDELIVERED
public String strUriAll = content://sms/all;//SMS_ALL
public String strUriConversations = content://sms/conversations;//you
can delete one conversation by thread_id
content://sms//you can delete one message by _id

2008/12/31 linker lv linke...@gmail.com

 you can use try catch, show your log.
 also, cursor should be close. have a try.

 2008/12/31 ipeg.stud...@gmail.com


 ###
 Please help me access the list of sms in the inbox. I am using this
 code, please let me know what is wrong, it always gives a n unexpected
 error popup in the emulator.


 I used a similar code for accessing the contacts list ( People.NAME
 etc ), it worked fine. However, I cannot do it for SMS inbox.

 Thanks in advance and happy new year!
 ###
 package org.anddev.android.hello;

 import android.app.ListActivity;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.provider.Telephony.Sms;
 import android.widget.ListAdapter;
 import android.widget.SimpleCursorAdapter;

 public class HelloAndroid extends ListActivity {

 private ListAdapter mAdapter;

  /** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
Cursor c = getContentResolver().query(Sms.Inbox.CONTENT_URI,
 null, null, null, null);//.query(Sms.CONTENT_URI, null, null, null,
 null);
startManagingCursor(c);
String[] columns = new String[]{Sms.Inbox.READ};
int[] names = new int[]{R.id.row_entry};
mAdapter = new SimpleCursorAdapter(this, R.layout.main, c,
 columns, names);

this.setListAdapter(mAdapter);
}

  }
 ###

 Here is the main.xml code

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content

 TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Name: 
/
 TextView
android:id=@+id/row_entry
android:layout_width=wrap_content
android:layout_height=wrap_content
/
 /LinearLayout

 #
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dialog box

2008-12-31 Thread AlexG

anyone?
still looking for an idea how to do this...

On 30 דצמבר, 17:17, AlexG alex.shpindov...@gmail.com wrote:
 Hi

 I am trying to implement something like:

 userResponse = showMessageBox(buttons, messages, etc)

 So far I have started a new activity that presents themessageand the
 button and returns through onActivityResult().
 Meaning my activity launches a sub-Activity that shows an AlertDialog
 with 2 buttons. What the user clicked returns through onActivityResult
 ().

 I would prefer to use the one call way instead waiting for the
 onActivityResult callback.

 Is there any way to do this?

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: To Play .mp3 from host machine filesystem

2008-12-31 Thread Sayed Y. Hashimi

One way to do it is to run a web server on your host machine and serve
the mp3 via http. You could then call the setDataSource() method of
the MediaPlayer with a URL pointing to the mp3 on the host. Note:
you'll need to use the IP address of your host machine and not
localhost. Finally, you will need to add permissions to your
AndroidManifest.xml file to allow your application access to internet:

uses-permission android:name=android.permission. INTERNET /

sayed

On Dec 31, 4:01 am, sal suhailb...@gmail.com wrote:
 Hi All,

 Is there any procedure to play .mp3 file stored in a filesystem of
 host machine (windows XP) without getting into file system of
 emulator.

 I know its least useful scenario but i am just curious to know
 whaether MediaPlayer class supports it or not ?

 Thanks
 Sal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] aTrackDog goes 2.00, features for developers

2008-12-31 Thread gaso...@gmail.com

Hello,

aTrackDog is a popular version tracking app in Android Market. We
could help your users to keep your application's version up-to-date.

Although aTrackDog don't need you (developer) to do any extra effort,
Now in aTrackDog 2.00, we do create the aTrackDog Version Tracking
Guide for Developers. (which guide you how to add some meta-data in
AndroidManifest.xml)

http://docs.google.com/Doc?id=ajkxs9k6pqxr_840gg7qfz66

It helps some of developers whom want to take more control on the
following 3 purposes

1. Control your alpha/beta version not be tracked by aTrackDog.
2. Track non-Android-Market-application. (e.g. Handango, EA )
3. To provide your users extra information (e.g. web, download link)
for reference.

We hope it will be a more helpful tool for both users and developers.

BTW: Note the 3rd option, now you could check the 'weekly billboard'
for Android Applications at http://atrackdog.a0soft.com/ . You could
provide more infomation(your website, download link) to web visitors
though add some meta-data in AndroidManifest.xml. The same meta-data
also make effect when the user manage your app through aTrackDog in
their G1. (see the aTrackDog Version Tracking Guide for Developers for
detail)


regards

gasolin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: com.google.wireless.gdata

2008-12-31 Thread schtieF

Someone found the com.google.wireless code stuff in the open source
repository of android? so we can compile and include it in our
applications?

Stefan

On Dec 24, 6:21 pm, paxus paxu...@gmail.com wrote:
 OK, I agree that they could easily remove inner classes if it hasn't
 been published as common API. But I can't get what should I do to work
 with Gcalendar, for ex.? Can you show me the way? I can find several
 apps which somehow get calendar events, so there must be an API,
 right? Does anyone know a workaround?

 On 3 дек, 23:02, AndroidEngineer vaswani.jit...@gmail.com wrote:

  Yet you had them in the previous version of the library? Uh huh. I
  see.

  On Dec 2, 10:42 pm, Jean-Baptiste Queru j...@google.com wrote:

   I'll try to simplify.

   In a nutshell, the com.google.* APIs are Google-specific add-ons that
   are not part of the Android core. Those APIs won't be present on all
   Android devices, and aren't ready to be officially supported as public
   Google-specific APIs.

   JBQ

   On Tue, Dec 2, 2008 at 10:27 PM, AndroidEngineer

   vaswani.jit...@gmail.com wrote:

It's wierd that even in the section where its supposed to describe the
changes from 0.9 to 1.0 they don't have any mention of the apis that
have been removed. I am only hoping it was a mistake and the apis are
going to be back.

Please enlighten.

On Dec 2, 12:33 pm, loty lev.pert...@gmail.com wrote:
I'm also very much interested in these libraries. Can someone from
Google enlighten us on when if ever these libraries become available
again.

On Dec 1, 11:27 pm, AndroidEngineer vaswani.jit...@gmail.com wrote:

 Howcome com.google.wireless.gdata and com.google.android.gdata have
 been removed from the 1.0 r1 library. I see these packages in 0.9 and
 previous versions but not in 1.0. What is the reason behind removing
 the libraries? From what I've seen, they seem to be very useful
 libraries.

 Please give me heads up. I am trying to write an application to 
 access
 google calendar and its events.

 Thanks.

 Android Engineer
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Memory leak in BitmapFactory/Gallery?

2008-12-31 Thread qvark

We have also been noticing this kind of behaviour in our application.

What is worse, many of the OOM problems (but not all) have been solved
using explicits System.gc() calls before the operation that caused the
OOM. IMHO this means we were doing our homework releasing all the
references to unused objects, but Dalvik was not freeing the memory
until we have 'forced' it.

This morning have been the last example: take a picture with the
camera and display it in a new activity, finish that activity and when
you try to capture a new picture you will get an OOM. You could thing
we are doing something wrong and there is some reference to the image
that prevents it from being garbage collected, but then I modify the
activity that takes the pictures and put a System.gc(); before the
takePicture() call and... it works! now you can take a picture,
visualize it, go back and take another picture as many times as you
want.

I have always considered an explicit call to System.gc() a bad
practice because that should be the VM's work not the programmer one,
so I was very puzzled when I tried this and it worked... is this the
intended behaviour in Dalvik? should we populate our code with
System.gc() calls?

BTW, Romain, please believe us when we say there are OOM exceptions
when you are not even close to the theoretical 16 MB limit and you try
to reserve a significant amount of memory (say 1 MB for example).

Thanks,

Jose Luis.

On Dec 30, 6:42 pm, blindfold seeingwithso...@gmail.com wrote:
 I wonder if there could be some bug in this intended VM-like
 behaviour, because my app continuously uses about 3 to 4 MB on the dev
 phone 1 according to DDMS (with similar figures reported by freeMemory
 ()), and DDMS reports a heap size of about 6 MB (not a typo, not 16
 MB). And yet my app occasionally crashes due to an OutOfMemoryError
 exception when its peak usage gets close to that fixed 6 MB (not 16
 MB), either in my own (modest, few hundred KB) memory allocations -
 for which I can add try-catch blocks as a crude workaround to keep the
 app alive, or due an out-of-memory error in the low-level camera
 preview code, which then inevitably causes a crash. Never do I see the
 heap (in DDMS) gradually climb up from 6 MB towards 16 MB. Basically
 it looks like the heap does not always grow even when memory
 allocations require it? Or has the system already reserved 10 MB of
 the 16 MB for things that I am not aware of such that the reported
 heap cannot grow above 6 MB?

 Thanks

 On Dec 4, 9:36 am, Romain Guy romain...@google.com wrote:

  The heap works pretty much like in a regular VM. As your app needs
  more memory the heap grows accordingly (but doesn't shrink.) For
  instance, if you are using 1 MB out of your 2 MB of allocated heap and
  need to load 2 more MB, the heap will grow to more than 3 MB, and you
  will use 3 MB out of the heap. But when the heap reaches a total
  allocated size of 16 MB and your app needs more memory, you get an
  OutOfMemoryError.

  On Wed, Dec 3, 2008 at 11:30 PM, EboMike ebom...@gmail.com wrote:

   Thanks, Romain. I'm grabbing them from a server, but you're right, if
   anything, I should convert and re-save them in a smaller format before
   caching them locally. Well, I just tried to get it running quickly :)

   One laaast thing - You mentioned that an app has a 16MB heap. How is
   that split up? A Runtime.getRuntime().freeMemory() right on startup in
   the app above gives me about 800KB or so (although the app is later
   able to allocate 1MB to decode an image). I'm not very familiar with
   Dalvik's memory management, how is the whole thing set up?

   -Mike

   On Dec 3, 11:26 pm, Romain Guy romain...@google.com wrote:
   Well you could start by not loading such huge images in a Gallery.
   Even if the recycler was working correctly it is a LOT of data to read
   and to decode. It's also a lot of wasted memory (and it also slows
   drawing down since the bitmaps are drawn rescaled.) You should use
   BitmapFactory.Options or Bitmap.createScaledBitmap to load your image
   pre-scaled to a much more reasonable size.

   On Wed, Dec 3, 2008 at 11:23 PM, EboMike ebom...@gmail.com wrote:

Thanks a lot for the very quick replies. One last thing: Do you happen
to have any remote idea about when the next SDK release is scheduled?
My app is currently running out of memory a lot :)

On Dec 3, 11:13 pm, Romain Guy romain...@google.com wrote:
A memory leak is actually totally expected in that case. Gallery, like
ListView, GridView, etc. uses a recycling heap. Every time a view is
unused, it is moved to the recycler. Unfortunately, if it's never
taken out of the recycler...

On Wed, Dec 3, 2008 at 11:07 PM, EboMike ebom...@gmail.com wrote:

 Thanks a lot, Romain! Question though - even if the gallery is not
 converting the views, why doesn't it release references to them as 
 you
 move away?

 Say, I move from view 0 to view 1, with 

[android-developers] Re: Customizing ListAdapter

2008-12-31 Thread Mark Murphy

Sarath Kamisetty wrote:
 Hi,
 
 I have a ListActivity for which I am setting up ListAdapter like below:
 
 phoneListAdapter = new SimpleCursorAdapter(this,
 R.layout.contacts_list_row,
   managedCursor, new String[] { PhonesColumns.NUMBER,
 PhonesColumns.TYPE},
   new int[] { R.id.text1, R.id.text2 });
 setListAdapter(phoneListAdapter);
 
 However, the output here is not readable as PhonesColumns.TYPE is
 displaying number strings like 2, 1 etc. A sample output that I get is
 like below:
 
 111-222- 2
 222-333- 1
 
 I want to make it more readable by converting them to Mobile,
 Home, Work etc. A sample desired output list is like below:
 
 111-222- MOBILE
 222-333- WORK
 
 Essentially, I don't want the columns to be displayed as is. How do I
 achieve this ? 

There are two ways to approach this: as a data problem, or as a view
problem.

As a data problem, you could create your own CursorWrapper class that
wraps your managedCursor and converts PhonesColumns.TYPE into something
more user-friendly.

I tend to look at this as a view problem, so I create a custom adapter
that creates my own views, where I can make 2, 1 be MOBILE, WORK or
different icons or whatever I feel like. I have a whole series of blog
posts up on this topic:

http://androidguys.com/?s=fancy+listviews

Forgive the formatting, and be aware that the older posts are for the M5
SDK and so need some tweaking to work on the current SDK.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems with Radio Group

2008-12-31 Thread Mark Murphy

for android wrote:
 I am trying to create a RadioGroup whch looks somewhat like this:
 RadioGroup
 RadioButton
 TableLayout 
 TableRow
 RadioButton /
 Button  /
 /TableRow
 TableRow
 RadioButton /
 Button  /
 /TableRow
 /RadioGroup
 
 But whn i create the radio group and start selecting items,the radio
 buttons are not of multiple-exclusion as suggested in the docs.For
 clarity I have created a sample prgrm attached??Is this a bug? Or I am
 doing anything incorrect.??

Unfortunately, as I understand it, RadioButton must be an immediate
child of RadioGroup for the mutual-exclusion to work, not inside some
other layout (e.g., your TableLayout).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to get all phone numbers of a contact.

2008-12-31 Thread HaleRazor

I have experienced the same problem.  Whichever number I have marked
as Default is the only one that I seem to get back from the query.

On Dec 30, 2:46 pm, Sarath Kamisetty sarath.kamise...@gmail.com
wrote:
 Hi,

 Given a contact URI like content://contacts/people/23 I want to dump
 all phone numbers - like home, mobile, work, fax etc. all. However
 when I user managedQuery and got a cursor for this and dumped all the
 column names the only relevant columns I see are number and
 primary_phone (code shown below). It is not clear how all the phone
 numbers are stored and accessed. I tried looking at Contacts code but
 unable to make out much. Any help is greatly appreciated.

 Thanks,
 Sarath

                 Cursor managedCursor = managedQuery(pickedContact,
                     null, // Which columns to return
                     null,       // WHERE clause; which rows to return (all 
 rows)
                     null,       // WHERE clause selection arguments (none)
                     People.NAME +  ASC); // Order-by clause
 (ascending by name)

             managedCursor.moveToFirst();
             int columnCount = managedCursor.getColumnCount();
             String resStr = new String();
             for (int i=0; i  columnCount; i++) {
               resStr += managedCursor.getColumnName(i) +  ;
             }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Icons - Recommended size, format, etc?

2008-12-31 Thread Mariano Kamp
Thanks for the information.
If you don't mind me asking, how do you know? And do you know about a style
guide?

On Wed, Dec 31, 2008 at 10:06 AM, for android forandr...@gmail.com wrote:

 16*16


 On Wed, Dec 31, 2008 at 11:43 AM, Mariano Kamp mariano.k...@gmail.comwrote:

 What about the icons used in notifications? Are they 24x24 natively?
 Is there any source where this kind of documentation can be found? I
 didn't see any.

 Btw. is there a style guide in the works?

 Cheers,
 Mariano


 On Fri, Nov 7, 2008 at 8:17 PM, hackbod hack...@gmail.com wrote:


 But please  make it 48x48.  Otherwise it's just wasting time and
 space, and if a lot of apps start doing larger sizes it will have a
 noticeable impact.  The app icon size is 48x48.

 On Nov 7, 9:44 am, Romain Guy romain...@google.com wrote:
  Hi,
 
  Home currently displays icons at 48x48, so your icon file should be at
  least this size. If you make it bigger, you should make it twice as
  big for better rendering.
 
  On Fri, Nov 7, 2008 at 6:23 AM, g1bb corymgibb...@gmail.com wrote:
 
   Hello,
 
   Is there a recommended size or format for an application's icon? I've
   been using .PNG at 190x141 px, but I can never seem to get them as
   'cool' looking as the other applications I've seen.
 
   Thanks in advance.
 
  --
  Romain Guywww.curious-creature.org






 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to get all phone numbers of a contact.

2008-12-31 Thread roland

Hi, you should use another URI to retrieve all phones number. With
your code, you can get the person's id and use it to get all his phone
numbers. Here is an example:

if (column.equals(People._ID)) {
String whereClause = person=+contactsCursor.getString
(contactsCursor.getColumnIndex(column));

String[] phonesProjection = new String[] {Phones.NUMBER,
Phones.TYPE};
Cursor phonesCursor = ApplicationView.getCurrentView().managedQuery
(Contacts.Phones.CONTENT_URI, phonesProjection, whereClause, null,
null);
int phonesCursorCount = phonesCursor.getCount();
if (phonesCursorCount  0) {
phonesCursor.moveToFirst();
int numberColumn = phonesCursor.getColumnIndex(Phones.NUMBER);
int typeColumn = phonesCursor.getColumnIndex(Phones.TYPE);
for (int j=0; jphonesCursorCount; j++) {
switch (phonesCursor.getInt(typeColumn)) {
case Phones.TYPE_WORK:
workPhone = 
phonesCursor.getString(numberColumn);
break;
case Phones.TYPE_HOME:
homePhone = 
phonesCursor.getString(numberColumn);
break;
case Phones.TYPE_MOBILE:
mobilePhone = 
phonesCursor.getString(numberColumn);
break;
case Phones.TYPE_CUSTOM:
companyPhone = 
phonesCursor.getString(numberColumn);
break;
case Phones.TYPE_OTHER:
otherPhone = 
phonesCursor.getString(numberColumn);
break;
case Phones.TYPE_FAX_WORK:
faxWork = 
phonesCursor.getString(numberColumn);
break;
}
phonesCursor.moveToNext();
}
}
closeCursor(phonesCursor);
}



On 30 déc, 21:46, Sarath Kamisetty sarath.kamise...@gmail.com
wrote:
 Hi,

 Given a contact URI like content://contacts/people/23 I want to dump
 all phone numbers - like home, mobile, work, fax etc. all. However
 when I user managedQuery and got a cursor for this and dumped all the
 column names the only relevant columns I see are number and
 primary_phone (code shown below). It is not clear how all the phone
 numbers are stored and accessed. I tried looking at Contacts code but
 unable to make out much. Any help is greatly appreciated.

 Thanks,
 Sarath

                 Cursor managedCursor = managedQuery(pickedContact,
                     null, // Which columns to return
                     null,       // WHERE clause; which rows to return (all 
 rows)
                     null,       // WHERE clause selection arguments (none)
                     People.NAME +  ASC); // Order-by clause
 (ascending by name)

             managedCursor.moveToFirst();
             int columnCount = managedCursor.getColumnCount();
             String resStr = new String();
             for (int i=0; i  columnCount; i++) {
               resStr += managedCursor.getColumnName(i) +  ;
             }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Why Google does not accepts my Visa credit card?

2008-12-31 Thread Steve

Call your credit card company.  It might be that they are flagging
transactions as suspicious.  They did that for me when I signed up.
And also when I bought the Dev phone.

On Dec 18, 1:43 pm, DOKA koma...@jinr.ru wrote:
 Hello all!

 I am trying to pay registration fee as Android developer to sell my
 program in Android Market, but see error telling me about payment
 fail.

 Why does it happend? I already payed successfully with this Visa
 Classic card for another services, e.g. I have bought a domain.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: service with a UI

2008-12-31 Thread Mark Murphy

Sarath Kamisetty wrote:
 I was wondering if android has UNIX crond style
 process that can I make use of (programatically).

AlarmService.

 Also, when new task is added or existing one is deleted, the activity
 needs to notify the service. I looked at AIDL but it seems to be more
 for communication across processes. 

It works within the same process as well.

 If the service and activity are in
 the same process, isn't there an easier way to wakeup/notify the
 service that tasklist has changed ?

That depends on how you define easier.

Tying an activity and a service together via static data members or the
like couples them very tightly. At best, you are more likely to leak
memory. At worst, you wind up in situations where the service is trying
to talk to a dead activity. The developer who was trying to update a
TextView from a service ran into that problem, I suspect -- updating a
TextView for an activity other than the right one. So, while it may be
easier to initially write the software this way, there is a good chance
you will regret it later.

AIDL and Intents are two means that Android offers that better decouple
the activity from the service.

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to find out which package started an intent?

2008-12-31 Thread Peli

The answer had been posted in this thread:
http://groups.google.com/group/android-pws/browse_frm/thread/a4fdfa90d5445b0d#

One can use getCallingPackage() and getCallingActivity() from the
Activity class to retrieve the information I was looking for.

Peli
www.openintents.org

On 29 Dez., 09:59, Peli peli0...@googlemail.com wrote:
 How can I find out which activity started the current intent?

 Example:
 Activity A starts Activity B through an intent startIntentForResult().

 Can activity B find the package name of the application that contains
 activity A?
 Something like getComponent(), but not for activity B, but for
 activity A.

 Somehow the system must know about this, because the intent is sent
 back to the calling activity A after activity B is done. I would like
 to know whether activity B can also access this information, and treat
 specific packages (e.g. trusted packages) in a priviledged way.

 Peli
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Icons - Recommended size, format, etc?

2008-12-31 Thread Mariano Kamp
ps. The reason I am asking for the source of your information is twofold.
(a) I would like to read up on other related information, e.g. style guide,
is SVG possible, other sizes, other formats, resolution independent icons,
etc.?
(b) I meanwhile tried 16x16 and 24x24 and to my it looks like 24x24 is the
way to go, as it looks more crisp on the emulator. I attached a screenshot
to see for yourself.

On Wed, Dec 31, 2008 at 4:56 PM, Mariano Kamp mariano.k...@gmail.comwrote:

 Thanks for the information.
 If you don't mind me asking, how do you know? And do you know about a style
 guide?


 On Wed, Dec 31, 2008 at 10:06 AM, for android forandr...@gmail.comwrote:

 16*16


 On Wed, Dec 31, 2008 at 11:43 AM, Mariano Kamp mariano.k...@gmail.comwrote:

 What about the icons used in notifications? Are they 24x24 natively?
 Is there any source where this kind of documentation can be found? I
 didn't see any.

 Btw. is there a style guide in the works?

 Cheers,
 Mariano


 On Fri, Nov 7, 2008 at 8:17 PM, hackbod hack...@gmail.com wrote:


 But please  make it 48x48.  Otherwise it's just wasting time and
 space, and if a lot of apps start doing larger sizes it will have a
 noticeable impact.  The app icon size is 48x48.

 On Nov 7, 9:44 am, Romain Guy romain...@google.com wrote:
  Hi,
 
  Home currently displays icons at 48x48, so your icon file should be at
  least this size. If you make it bigger, you should make it twice as
  big for better rendering.
 
  On Fri, Nov 7, 2008 at 6:23 AM, g1bb corymgibb...@gmail.com wrote:
 
   Hello,
 
   Is there a recommended size or format for an application's icon?
 I've
   been using .PNG at 190x141 px, but I can never seem to get them as
   'cool' looking as the other applications I've seen.
 
   Thanks in advance.
 
  --
  Romain Guywww.curious-creature.org






 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---

inline: Notifications.png

[android-developers] Re: Device id

2008-12-31 Thread roland

What about the imei? You can get it by ((TelephonyManager)
getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(), and the
emulator return 000.

Don't forget add uses-permission
android:name=android.permission.READ_PHONE_STATE / in your
AndroidManigest.xml.

On 31 déc, 08:24, jsm mamm...@gmail.com wrote:
 I have an application where I need to check whether the user is using
 the actual device not a emulator or others.  I have seen the API where
 there is device id method from phone service.
 I need a generic way to check if the user is on the real device.
 For example if he has downloaded the app from the market, i need to
 know the device id of the user, this is strictly for licensing and
 restricting the use of app.

 Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread Mark Murphy

There is also android.provider.Settings.System.ANDROID_ID.

The value is null on the emulator but an apparently-unique 64-bit hex
value on the G1.

roland wrote:
 What about the imei? You can get it by ((TelephonyManager)
 getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(), and the
 emulator return 000.
 
 Don't forget add uses-permission
 android:name=android.permission.READ_PHONE_STATE / in your
 AndroidManigest.xml.
 
 On 31 déc, 08:24, jsm mamm...@gmail.com wrote:
 I have an application where I need to check whether the user is using
 the actual device not a emulator or others.  I have seen the API where
 there is device id method from phone service.
 I need a generic way to check if the user is on the real device.
 For example if he has downloaded the app from the market, i need to
 know the device id of the user, this is strictly for licensing and
 restricting the use of app.

 Any ideas?

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

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Market paid-for apps

2008-12-31 Thread Al Sutton

Did anyone else get the email saying that initially only developers 
operating in the US and UK will be allowed to sell apps in Market?

The email says this will be followed by German, Austria, and the 
Netherlands, then by France, Italy and Spain, and the plans for other 
countries will be announced at the end of Q1 2009.

So from this I think it's safe to deduce that if you're not in those 8 
countries you won't be able to sell apps via Market until after Q1 2009.

Al.
http://andappstore.com/

-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Compile Error(s)

2008-12-31 Thread Peter Fisher
I just got a new macbook Pro and installed eclipse and installed all the
stuff for Eclipse 3.4 (Ganymede). I also downloaded the SDK and unziped it.
I setup the path in eclipse to the SDK dir and thats all I did.

Did I miss a step in the setup process?

On Tue, Dec 30, 2008 at 8:41 PM, brnzn brendon.mathe...@gmail.com wrote:


 I might be wrong, but it sounds like there's a problem with your
 accessing debug.keystore.  The SDK sets up a default key for
 development - in Eclipse check the Default debug keystore setting
 under under Window  Preferences  Android  Build.

 Perhaps something went wrong during the SDK install?  Have you ever
 been able to compile?

 brnzn

 On Dec 31, 2:08 pm, Peter pe...@phyn3t.com wrote:
  I'm trying to compile a hellworld application or any application for
  that matter and I keep getting the following errors:
 
  2008-12-30 17:56:53 - hellworld] Error generating final archive:
  Unable to get debug signature key
  [2008-12-30 17:59:40 - hellworld] --
  [2008-12-30 17:59:40 - hellworld] Android Launch!
  [2008-12-30 17:59:40 - hellworld] adb is running normally.
  [2008-12-30 17:59:40 - hellworld] Could not find hellworld.apk!
  [2008-12-30 18:00:52 - hellworld] --
  [2008-12-30 18:00:52 - hellworld] Android Launch!
  [2008-12-30 18:00:52 - hellworld] adb is running normally.
  [2008-12-30 18:00:52 - hellworld] Could not find hellworld.apk!
 
  Anyone have any idea why this might be happening? I can't compile
  anything, I'm using the latest version of eclipse on Mac OS X, and
  also newest version of the SDK.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why not ship android dev phone to china mainland?

2008-12-31 Thread babyblue

Hi

As an alternative you can buy an unlock g1 in Zhongguancun. It won't
cost much now.

On 2008年12月28日, 下午2时07分, mawei1981 mawei...@gmail.com wrote:
 Hi,all

 why not ship android dev phone to china mainland?

 I have already paid $25 become a developer, I can pay $399 to buy it,
 but brightstar could not ship it to china mainland?

 how can I do?

 who can help me?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] T-Mobile G1: How to properly resume View's focus when Activity resumed from screen black-out?

2008-12-31 Thread Toothy Bunny

Hi All,
If the G1 is idle for short period (no user input) while a Activity is
still running, the screen blacks out and the user input is locked.
When the screen is unlocked by the user again and screen light up, we
found the View object does not have input focus, as the result, the
application does not react any user input.

To solve this App. frozen problem, I added View.request() in
Activity's onResume() method becase onResume() is called when the
Activity comes back after screen black-out.

Also, is there a way to completely avoid screen black-out, in other
words, how can we make the screen always on when a Activity is running
even there is no user input.

Thanks for any suggestions!
Hongkun
www.omnigsoft.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market paid-for apps

2008-12-31 Thread g1bb

I understood the same thing, yes.

On Dec 31, 9:51 am, Al Sutton a...@funkyandroid.com wrote:
 Did anyone else get the email saying that initially only developers
 operating in the US and UK will be allowed to sell apps in Market?

 The email says this will be followed by German, Austria, and the
 Netherlands, then by France, Italy and Spain, and the plans for other
 countries will be announced at the end of Q1 2009.

 So from this I think it's safe to deduce that if you're not in those 8
 countries you won't be able to sell apps via Market until after Q1 2009.

 Al.http://andappstore.com/

 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: To Play .mp3 from host machine filesystem

2008-12-31 Thread Dave Sparks

You are running a virtual Linux system on your workstation. It only
has access to the file systems that are mounted, which include the
fixed images required to boot and run the device and and an optional
virtual SD card image.

If you are really ambitious, you could modify the emulator code and
system code to allow mounting your workstation file system.

On Dec 31, 1:01 am, sal suhailb...@gmail.com wrote:
 Hi All,

 Is there any procedure to play .mp3 file stored in a filesystem of
 host machine (windows XP) without getting into file system of
 emulator.

 I know its least useful scenario but i am just curious to know
 whaether MediaPlayer class supports it or not ?

 Thanks
 Sal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Memory leak in BitmapFactory/Gallery?

2008-12-31 Thread EboMike

There is clearly something wrong. I've tried to plug a leak in
BitmapFactory.decodeStream() (which is called internally by
BitmapFactory.decodeFile() ), and that indeed fixed a memory leak
whenever you create a bitmap (see http://review.source.android.com/6418),
but after Romain reviewed it, I realized that the problem is possibly
much deeper in the gc itself.

BitmapFactory.decodeStream() sometimes creates a BufferedInputStream()
and doesn't close it but in theory, that shouldn't cause a memory
leak. The GC should realize that nobody references the
BufferedInputStream(), collect it, and thereby realize that nobody
holds its enclosing stream and collect that too. Except that this
doesn't happen. (Unless I missed something secret that links the
FilteredInputStream to the other stream on a lower level.)

I've made a simple test app that creates a Bitmap using
BitmapFactory.decodeFile() every 10ms. It doesn't even store the
return value, and lo and behold, the app runs out of memory unless I
modify the Android OS to close the BufferedInputStream.

I'll take a peek at the mark and sweep mechanism itself, but it would
be more productive if somebody at Android could do that since they're
a lot more familiar with all this.


Btw, Jose - I too got OOMs when I was nowhere close to 16MB, although
my suspicion is that the JNI memory usage is not easily accessible in
the DDMS (even though somebody said it is supposedly taken from the
app's heap as well).

-Mike


On Dec 31, 5:35 am, qvark joseluishuertasfernan...@gmail.com wrote:
 We have also been noticing this kind of behaviour in our application.

 What is worse, many of the OOM problems (but not all) have been solved
 using explicits System.gc() calls before the operation that caused the
 OOM. IMHO this means we were doing our homework releasing all the
 references to unused objects, but Dalvik was not freeing the memory
 until we have 'forced' it.

 This morning have been the last example: take a picture with the
 camera and display it in a new activity, finish that activity and when
 you try to capture a new picture you will get an OOM. You could thing
 we are doing something wrong and there is some reference to the image
 that prevents it from being garbage collected, but then I modify the
 activity that takes the pictures and put a System.gc(); before the
 takePicture() call and... it works! now you can take a picture,
 visualize it, go back and take another picture as many times as you
 want.

 I have always considered an explicit call to System.gc() a bad
 practice because that should be the VM's work not the programmer one,
 so I was very puzzled when I tried this and it worked... is this the
 intended behaviour in Dalvik? should we populate our code with
 System.gc() calls?

 BTW, Romain, please believe us when we say there are OOM exceptions
 when you are not even close to the theoretical 16 MB limit and you try
 to reserve a significant amount of memory (say 1 MB for example).

 Thanks,

 Jose Luis.

 On Dec 30, 6:42 pm, blindfold seeingwithso...@gmail.com wrote:

  I wonder if there could be some bug in this intended VM-like
  behaviour, because my app continuously uses about 3 to 4 MB on the dev
  phone 1 according to DDMS (with similar figures reported by freeMemory
  ()), and DDMS reports a heap size of about 6 MB (not a typo, not 16
  MB). And yet my app occasionally crashes due to an OutOfMemoryError
  exception when its peak usage gets close to that fixed 6 MB (not 16
  MB), either in my own (modest, few hundred KB) memory allocations -
  for which I can add try-catch blocks as a crude workaround to keep the
  app alive, or due an out-of-memory error in the low-level camera
  preview code, which then inevitably causes a crash. Never do I see the
  heap (in DDMS) gradually climb up from 6 MB towards 16 MB. Basically
  it looks like the heap does not always grow even when memory
  allocations require it? Or has the system already reserved 10 MB of
  the 16 MB for things that I am not aware of such that the reported
  heap cannot grow above 6 MB?

  Thanks

  On Dec 4, 9:36 am, Romain Guy romain...@google.com wrote:

   The heap works pretty much like in a regular VM. As your app needs
   more memory the heap grows accordingly (but doesn't shrink.) For
   instance, if you are using 1 MB out of your 2 MB of allocated heap and
   need to load 2 more MB, the heap will grow to more than 3 MB, and you
   will use 3 MB out of the heap. But when the heap reaches a total
   allocated size of 16 MB and your app needs more memory, you get an
   OutOfMemoryError.

   On Wed, Dec 3, 2008 at 11:30 PM, EboMike ebom...@gmail.com wrote:

Thanks, Romain. I'm grabbing them from a server, but you're right, if
anything, I should convert and re-save them in a smaller format before
caching them locally. Well, I just tried to get it running quickly :)

One laaast thing - You mentioned that an app has a 16MB heap. How is
that split up? A 

[android-developers] Rotation Redux: how to MAKE it auto-rotate!

2008-12-31 Thread Ward Willats

Well, heh, when I first started writing this app I couldn't get the 
G1 to NOT rotate my activities on keyboard out. Finally, I added 
android:screenOrientation=portrait to the activities in the 
manifest and that kept everything fixed.

Now I have an activity I WANT to rotate when the keyboard comes out, 
so I removed the screenOrientation attribute entirely on that 
activity, figuring I'd be reverting back to the wild-and-wooly 
auto-rotate behavior. However, even though the activity is destroyed 
and re-created when the keyboard comes out, the screen is still drawn 
in portrait mode. adb sez on kbd out:

12-31 10:33:15.278 I/WindowManager(   56): Input configuration 
changed: { scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1 nav=3 
orien=1 }

The only way I can get a landscape view is to force it with 
screenOrientation:landscape on that activity (but then it is 
rotated even before the keyboard comes out).

What am I missing here?  (I only have one set of resources in the 
res/layout directory, figure I shouldn't need two unless I want to 
customize...)

Thanks all.

-- Ward

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread jsm

Follow up question. How do I validate this number? It could be any
64bit hex.

On Dec 31 2008, 9:49 pm, Mark Murphy mmur...@commonsware.com wrote:
 There is also android.provider.Settings.System.ANDROID_ID.

 The value is null on the emulator but an apparently-unique 64-bit hex
 value on the G1.



 roland wrote:
  What about the imei? You can get it by ((TelephonyManager)
  getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(), and the
  emulator return 000.

  Don't forget add uses-permission
  android:name=android.permission.READ_PHONE_STATE / in your
  AndroidManigest.xml.

  On 31 déc, 08:24, jsm mamm...@gmail.com wrote:
  I have an application where I need to check whether the user is using
  the actual device not a emulator or others.  I have seen the API where
  there is device id method from phone service.
  I need a generic way to check if the user is on the real device.
  For example if he has downloaded the app from the market, i need to
  know the device id of the user, this is strictly for licensing and
  restricting the use of app.

  Any ideas?

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread Mark Murphy

jsm wrote:
 Follow up question. How do I validate this number? It could be any
 64bit hex.

You don't validate this number.

 I have an application where I need to check whether the user is using
 the actual device not a emulator or others.

This can be handled by ANDROID_ID: check for null.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread mathiastck

I like:

http://code.google.com/android/reference/android/os/Build.html

The constant String Build.DEVICE is dream on the handset in front of
me, the emulator returns generic

On Dec 31, 8:49 am, Mark Murphy mmur...@commonsware.com wrote:
 There is also android.provider.Settings.System.ANDROID_ID.

 The value is null on the emulator but an apparently-unique 64-bit hex
 value on the G1.



 roland wrote:
  What about the imei? You can get it by ((TelephonyManager)
  getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(), and the
  emulator return 000.

  Don't forget add uses-permission
  android:name=android.permission.READ_PHONE_STATE / in your
  AndroidManigest.xml.

  On 31 déc, 08:24, jsm mamm...@gmail.com wrote:
  I have an application where I need to check whether the user is using
  the actual device not a emulator or others.  I have seen the API where
  there is device id method from phone service.
  I need a generic way to check if the user is on the real device.
  For example if he has downloaded the app from the market, i need to
  know the device id of the user, this is strictly for licensing and
  restricting the use of app.

  Any ideas?

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

 Android Training on the Ranch! -- Mar 16-20, 
 2009http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Device id

2008-12-31 Thread jsm

Whats the point of getting this number if it cant be validated?

On Jan 1, 12:18 am, Mark Murphy mmur...@commonsware.com wrote:
 jsm wrote:
  Follow up question. How do I validate this number? It could be any
  64bit hex.

 You don't validate this number.

  I have an application where I need to check whether the user is using
  the actual device not a emulator or others.

 This can be handled by ANDROID_ID: check for null.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market paid-for apps

2008-12-31 Thread Eric Mill

Yeah, I got that too.  It's wonderful news, awesome on Google!

-- Eric

On Wed, Dec 31, 2008 at 11:51 AM, Al Sutton a...@funkyandroid.com wrote:

 Did anyone else get the email saying that initially only developers
 operating in the US and UK will be allowed to sell apps in Market?

 The email says this will be followed by German, Austria, and the
 Netherlands, then by France, Italy and Spain, and the plans for other
 countries will be announced at the end of Q1 2009.

 So from this I think it's safe to deduce that if you're not in those 8
 countries you won't be able to sell apps via Market until after Q1 2009.

 Al.
 http://andappstore.com/

 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where could I get an ADT 0.9.0?

2008-12-31 Thread Wah

Yukinoba:

I tried to build using build_server.sh with the following set of
commands and failed:

setenv ECLIPSE_HOME /usr/local/installed/eclipse
cd ~/mydroid/development/tools/eclipse/scripts
./build_plugins.sh -i -d ~/android-plugin

The error I got is:

=
...
[javac] [completed  /home/haha/mydroid/development/tools/eclipse/
plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/
views/ThreadView.java - #17/17]
[javac] [17 units compiled]
[javac] [3 .class files generated]
[javac] LogPanel cannot be resolved to a type
[javac] --
[javac] 225. ERROR in /home/haha/mydroid/development/tools/eclipse/
plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/
views/LogCatView.java (at line 248)
[javac] mLogPanel = new LogPanel(loader, colors, new FilterStorage
(), LogPanel.FILTER_MANUAL);
[javac] ^
[javac] LogPanel cannot be resolved to a type
[javac] --
[javac] 226. ERROR in /home/haha/mydroid/development/tools/eclipse/
plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/
views/LogCatView.java (at line 248)
[javac] mLogPanel = new LogPanel(loader, colors, new FilterStorage
(), LogPanel.FILTER_MANUAL);
[javac] 
[javac] LogPanel cannot be resolved to a type
...
=

Can you help to see what went wrong?

Wah

On Dec 29, 6:37 pm, yukinoba ckmagic...@gmail.com wrote:
 to dear Kenny,

 I have solved this problem by taking a build sequence to theADT
 source code under the newly released cupcake device code, and thanks
 for your concern ;-) The newADT(version 0.9.0) is under the /device-
 code-root/devlopment/tools/eclipse/plugins/
 com.android.ide.eclipse.adt, and build the plugin with running the
 script file build_server.sh under the /device-code-root/devlopment/
 tools/eclipse/scripts.

 P.s. you will need to download an eclipse with PDE functionality, and
 set $ECLIPSE_HOME to the eclipse root to complete this

 and thanks for your help again! :-)

 Best regards,
 Nicholas

 On 12月28日, 上午1時41分, Kenny Yu yxw...@gmail.com wrote:

  I built cupcake, which has been merged to master HEAD. TheADTis
  quite OK. Can you share more info?

  Kenny

  On Dec 26, 11:35 am, yukinoba ckmagic...@gmail.com wrote:

   To dear all,

   Does anyone have the cupcake? The SDK in there is not applicable to
   theADTplugin (Android Development Tools plugin) of Eclipse any more,
   and Eclipse throws a message told me I should get an updatedADTwith
   version 0.9.0. However, I tried to build one in the source, and found
   that the latest version in the cupcake source code is 0.8.1 rather
   than 0.9.0.

   So, is there anyone enjoyed their cupcakes with Eclipse? I need aADT
   0.9.0 support...

   Thx for ur help

   Best regards,
   Nicholas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Inserting a contact / Android architecture

2008-12-31 Thread brnzn

I have a question on inserting a contact, but it's the general
principle I'm most interested in.  I'd really love to hear from one of
the Android Engineers on this, because currently I find some of the
design decisions in Android perplexing, and I'd like to understand why
it is as it is.

The most direct way to insert a contact seems to be to use
Contacts.People.createPersonInMyContactsGroup(...).  Something like
this:

ContentValues values = new ContentValues();
values.put(People.NAME, Bernie);

Contacts.People.createPersonInMyContactsGroup(
getContentResolver(),
values);

We're constructing the person entity as a map.  This brings up a few
potential problems:
1. How do we know what the keys should be?  By convention Android's
own classes (such as People) declare static constants to tell us what
those keys should be, but this is only a convention.
2. How do we know what datatype is appropriate for a given key?
There's nothing to stop you or warn you when you push the wrong type
of data in.
3. How do we know what combination of keys is valid?  If a given
entity has mandatory properties, there's nothing to stop you or warn
you if you forget to set some of those mandatory properties.
4. We're potentially allocating two objects for every value - one for
the value itself and one for the key.  Where we use static constants,
this is less of an issue.

Why does the API not provide a Person object that we can populate and
then pass in to be persisted?  Perhaps something like this:

Person p = new Person(Bernie);
p.addGroupMembership(My Contacts);

getContentResolver().insert(Person.CONTENT_URI, p);

The Person class tells clearly us:
1. What values can be set (by the existence of bean properties)
2. What datatype each property is
3. What values are are mandatory (probably by virtue of them being
required in constructor calls)

Is it a classloading issue?  I'm guessing no because we could easily
overcome that by making Person Serializable or Parcelable, splitting
it out into a JAR to be linked into whatever app needs it.

So what then is the philosophy that has driven the architecture to be
this way?


brnzn

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Inserting a contact / Android architecture

2008-12-31 Thread Mark Murphy

brnzn wrote:
 Why does the API not provide a Person object that we can populate and
 then pass in to be persisted?  Perhaps something like this:
 
   Person p = new Person(Bernie);
   p.addGroupMembership(My Contacts);
 
   getContentResolver().insert(Person.CONTENT_URI, p);
 
 The Person class tells clearly us:
 1. What values can be set (by the existence of bean properties)
 2. What datatype each property is
 3. What values are are mandatory (probably by virtue of them being
 required in constructor calls)
 
 Is it a classloading issue?  I'm guessing no because we could easily
 overcome that by making Person Serializable or Parcelable, splitting
 it out into a JAR to be linked into whatever app needs it.
 
 So what then is the philosophy that has driven the architecture to be
 this way?

I can't speak for the core Android team, so I cannot say specifically
why they made the design decision.

However, given their repeated insistence that they will not break binary
interfaces with Android OS updates, my guess is that's at least part of
their rationale. The definition of a contact has potential to change
significantly. They may feel that a more generic interface will help
them expand the scope of contacts without changing existing uses of the API.

To draw an analogy, it's a variant on the strong-vs.-weak typing
argument you see when Rubyists and Javanauts square off. Strong typing
has definite benefits, in terms of compile-time validations and
potential for optimization. However, strong typing can also get in the
way, which is why some folk prefer weakly-typed or type-inferred languages.

Anyway, that's my guess. Take it with a grain of salt. Preferably a
large grain of salt, maybe one cubic foot or so... ;-)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Receive notification for onDestroy, onStop, and onPause etc in other applications?

2008-12-31 Thread focuser

Hi,

Is there a way to programmatically receive notification onDestroy,
onStop, and onPause etc in other applications on the phone?

I see there's a READ_LOGS permission and guess this might be achieved
by reading the system log.  But I couldn't find anything to access the
system logs.

Thanks and Happy New Year!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Jumping to #link after using loadDataWithBaseURL()

2008-12-31 Thread Jack C. Holt

I am loading some HTML into a WebView that contains internal links
(i.e., a name tags).

How do I make the WebView jump to that location once the WebView is
loaded?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: aTrackDog goes 2.00, features for developers

2008-12-31 Thread gasolin

On 2008年12月31日, 下午9時28分, gaso...@gmail.com gaso...@gmail.com
wrote:
 Hello,

 aTrackDog is a popular version tracking app in Android Market. We
 could help your users to keep your application's version up-to-date.

 Although aTrackDog don't need you (developer) to do any extra effort,
 Now in aTrackDog 2.00, we do create the aTrackDog Version Tracking
 Guide for Developers. (which guide you how to add some meta-data in
 AndroidManifest.xml)

 http://docs.google.com/Doc?id=ajkxs9k6pqxr_840gg7qfz66

 It helps some of developers whom want to take more control on the
 following 3 purposes

 1. Control your alpha/beta version not be tracked by aTrackDog.
 2. Track non-Android-Market-application. (e.g. Handango, EA )
 3. To provide your users extra information (e.g. web, download link)
 for reference.

 We hope it will be a more helpful tool for both users and developers.

 BTW: Note the 3rd option, now you could check the 'weekly billboard'
 for Android Applications athttp://atrackdog.a0soft.com/. You could
 provide more infomation(your website, download link) to web visitors
 though add some meta-data in AndroidManifest.xml. The same meta-data
 also make effect when the user manage your app through aTrackDog in
 their G1. (see the aTrackDog Version Tracking Guide for Developers for
 detail)

 regards

 gasolin

FAQ is updated, too

http://atrackdog.a0soft.com/faq.php


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AndSpot Android Store now taking Paid and free applications

2008-12-31 Thread Faisal Abid

AndSpot is opening the doors to publishers to set up prices and upload
their paid and free applications, so they can be ready to be sold/
downloaded when andspot launches this week. Check out the andspot blog
for more details. AndSpot.com/blog.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problems with Radio Group

2008-12-31 Thread for android
Thanks for the reply Mark..I just used the CheckedText and pragmatically
solved the issue

On Wed, Dec 31, 2008 at 7:33 PM, Mark Murphy mmur...@commonsware.comwrote:


 for android wrote:
  I am trying to create a RadioGroup whch looks somewhat like this:
  RadioGroup
  RadioButton
  TableLayout 
  TableRow
  RadioButton /
  Button  /
  /TableRow
  TableRow
  RadioButton /
  Button  /
  /TableRow
  /RadioGroup
 
  But whn i create the radio group and start selecting items,the radio
  buttons are not of multiple-exclusion as suggested in the docs.For
  clarity I have created a sample prgrm attached??Is this a bug? Or I am
  doing anything incorrect.??

 Unfortunately, as I understand it, RadioButton must be an immediate
 child of RadioGroup for the mutual-exclusion to work, not inside some
 other layout (e.g., your TableLayout).

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Error on dmtracedump

2008-12-31 Thread for android
any help??

On Fri, Dec 26, 2008 at 2:40 PM, for android forandr...@gmail.com wrote:

 When trying to read .trace file from dmtracedump tool,I get this error

 D:\android-sdk-windows-1.0_r2\toolsdmtracedump myActivity.trace
 ERROR: unable to read 458752 bytes from trace file
 Cannot read trace.


 Whats the reason for this error??any ideas on how to solve it ???

 thanks




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---