Re: [android-developers] Re: onDraw is called twice

2012-08-15 Thread Romain Guy
This is the expected behavior. If a View is blended (with transparent
or translucent regions) and has to redraw, any Views behind it must be
redrawn as well. This behavior changes when hardware acceleration is
turned on. The behind Views are redrawn but the onDraw() method is
not called since each View is backed by a display list.

On Wed, Aug 15, 2012 at 2:45 AM, igor ganapolsky eazy...@gmail.com wrote:
 Have you tried commenting out super.onDraw()?

 On Saturday, December 19, 2009 5:06:01 PM UTC-5, jdekeij wrote:

 Hoi,

 In my layout I have a custom view which extends View and under this a
 button is placed. When I click the button the color changes to orange
 (Android default behavior) but it also causes the onDraw method being
 called of my custom view. Releasing the button causes again the onDraw
 method being called.
 How can I prevent this behavior? How to stop the invalidation of my
 view when clicking a button?

 Thanks in advance,
 Jasper

 --
 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



-- 
Romain Guy
Android framework engineer
romain...@android.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] Reading image from SDCard with Arabic FileName

2012-08-15 Thread Muhammad Rashid
Dear all,

I want to read images from sdcard. These images are of different names like 
a.jpg and موافق.jpg etc. Some of them are english names and some are with 
arabic names.
The problem is that when I make File as File imageFile = new 
File(pathFromSDCard), It shows file does not exists for all images with 
arabic names. It works for images with english names. Is there any 
workaround? 

Regards

-- 
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: Reading image from SDCard with Arabic FileName

2012-08-15 Thread RichardC
Did you get the file name by enumerating the directory contents or entering 
the file name some other way?

What version of Android are you trying this on?

On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards


-- 
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: Reading image from SDCard with Arabic FileName

2012-08-15 Thread Muhammad Rashid
I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made file 
by File file = new File(path). Here it says file does not exists.
I am using Android OS 2.3.6

On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
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: Reading image from SDCard with Arabic FileName

2012-08-15 Thread RichardC
How did you get the path name into your program? If you used cut/paste 
there could be problems with Unicode.  Have you tried enumerating the 
directory contents from your Android program and opening the file using the 
path returned from:
http://developer.android.com/reference/java/io/File.html#listFiles()   ?


On Wednesday, August 15, 2012 10:38:54 AM UTC+1, Muhammad Rashid wrote:

 I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made file 
 by File file = new File(path). Here it says file does not exists.
 I am using Android OS 2.3.6

 On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
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: Reading image from SDCard with Arabic FileName

2012-08-15 Thread Muhammad Rashid
Exactly by enumerating... using listFiles()

On Wednesday, August 15, 2012 2:58:43 PM UTC+5, RichardC wrote:

 How did you get the path name into your program? If you used cut/paste 
 there could be problems with Unicode.  Have you tried enumerating the 
 directory contents from your Android program and opening the file using the 
 path returned from:
 http://developer.android.com/reference/java/io/File.html#listFiles()   ?


 On Wednesday, August 15, 2012 10:38:54 AM UTC+1, Muhammad Rashid wrote:

 I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made 
 file by File file = new File(path). Here it says file does not exists.
 I am using Android OS 2.3.6

 On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
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] External USB MIC or Accessory mode MIC

2012-08-15 Thread Prabudas


Does android supports the external USB microphone (Like PC)? OR can an 
external accessory device (in Accessory mode) have a microphone and stream 
the audio from the accessory to android device?


Prabudas S. 

-- 
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] Maps showing mymaps

2012-08-15 Thread Sean751
Hi 
I am trying to access mymaps in my Google account in an android 
application. I want to be able to access the placemarks as objects to 
display the details and perhaps edit the notes attached to the placemark. I 
can't find any way to do this can anyone help?
Thanks
Sean

-- 
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] App startup with heavy initialization and ANR detection

2012-08-15 Thread b0b
I have an app whose initialization is quite CPU and thread heavy for 3-5s 
on startup.

During that period, the logcat reports several:

08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to 
'/data/anr/traces.txt'

every 500ms or so it seems.

AFAIK the main (UI) thread is not blocked as all heavy initialization work 
is done in threads as it should. 
However there are a lot of concurrent stuff with many threads hapenning 
during these 3-5s with the CPU probably at 100%.

I suspect that writing '/data/anr/traces.txt' several times on startup 
further slow it down.

I'm asking for details  on how the system detect ANRs and in particular 
under which conditions it produces logcat output above. 
Is it linked to CPU usage or simply the main thread being blocked ?
That is, one or several threads pegging the CPU would give these messages 
(while the main thread itself is not blocked) ?



-- 
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

Re: [android-developers] Maps showing mymaps

2012-08-15 Thread TreKing
On Wed, Aug 15, 2012 at 8:24 AM, Sean751 sean...@gmail.com wrote:

 I am trying to access mymaps in my Google account in an android
 application. I want to be able to access the placemarks as objects to
 display the details and perhaps edit the notes attached to the placemark. I
 can't find any way to do this can anyone help?


There is nothing in the current - or rather very old and pretty much
abandoned - Google Maps API for Android for this functionality. You would
have to check with the web version of the Maps library if this is possible,
which is off-topic for this list.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] Re: Bitmap size exceeds

2012-08-15 Thread bob
 

Did you set minSDK?  Where does it crash?

On Tuesday, August 14, 2012 8:27:12 PM UTC-5, Numair Qadir wrote:

 Dear Bob, 
 I tried my app in API 11 with largeHeap=true, but the app crashes. It 
 didn't work. :(

 On Mon, Aug 13, 2012 at 7:06 PM, bob b...@coolfone.comze.comjavascript:
  wrote:

 If your app is done in API 11 or higher, in the  application / in the 
 Android Manifest.xml, you can use largeHeap=true which will allow the 
 application to use more heap if it is available.


 On Sunday, August 12, 2012 6:48:14 PM UTC-5, Numair Qadir wrote:

 So, i was working on a project that loads an image from the gallery and 
 set as background. It is working perfectly fine but crashes when i try to 
 load a large image, i.e. 
 5 MP (2592х1944), 8mpx (3264x2448), 12 MP, 4000x3000 , here is my code:

 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent 
 data) {

 {
 super.onActivityResult(**requestCode, resultCode, data);

 if (resultCode == Activity.RESULT_OK  requestCode == 0) {
  Uri photo = data.getData();
 ContentResolver resolver = getContentResolver();
  resolver.notifyChange(photo, null);

  try {
 Bitmap bitmap = MediaStore.Images.Media.**getBitmap(resolver,
  photo);
 FrameLayout bg = (FrameLayout) findViewById(R.id.frame);
  Drawable drawable = new BitmapDrawable(getResources(),
 bitmap);
  bg.setBackgroundDrawable(**drawable);

  // Do something useful with your bitmap
 } catch (FileNotFoundException e) {
  e.printStackTrace();
 } catch (IOException e) {
  e.printStackTrace();
 }
  }
 }
  }

 here is the logcat

 08-13 04:44:01.414: E/AndroidRuntime(11062): FATAL EXCEPTION: main
 08-13 04:44:01.414: E/AndroidRuntime(11062): java.lang.OutOfMemoryError: 
 bitmap size exceeds VM budget
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory.**nativeDecodeStream(Native Method)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory.decodeStream(**BitmapFactory.java:459)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory.decodeStream(**BitmapFactory.java:515)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at 
 android.provider.MediaStore$**Images$Media.getBitmap(**
 MediaStore.java:503)

 Any help through code snippet/ tutorial would be more fruitful. 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-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
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: Android talking to computer

2012-08-15 Thread bob
 

So I guess you just do a bunch of *adb push* and *adb pull* commands to 
have a conversation with an Android app?

On Tuesday, August 14, 2012 5:07:25 PM UTC-5, Paul Turchenko wrote:

 All Android devices use ADB to talk to computer

 On Tuesday, August 14, 2012 2:27:53 PM UTC-5, bob wrote:

 Let's say I have an Android phone, and it is connected by USB to a PC.  
 Is there an easy way to make it talk to the PC by USB?  For instance, it 
 might send a camera image to the PC every five minutes.




-- 
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

Re: [android-developers] Maps showing mymaps

2012-08-15 Thread Sean751
When you say old and abandoned do you think there might be a new and 
improved Maps API for Android any time soon?
It will be messy but I will find another way to do what I want.
Thanks
Sean

On Wednesday, August 15, 2012 9:53:59 AM UTC-4, TreKing wrote:

 On Wed, Aug 15, 2012 at 8:24 AM, Sean751 sea...@gmail.com 
 javascript:wrote:

 I am trying to access mymaps in my Google account in an android 
 application. I want to be able to access the placemarks as objects to 
 display the details and perhaps edit the notes attached to the placemark. I 
 can't find any way to do this can anyone help?


 There is nothing in the current - or rather very old and pretty much 
 abandoned - Google Maps API for Android for this functionality. You would 
 have to check with the web version of the Maps library if this is possible, 
 which is off-topic for this list.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



-- 
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

Re: [android-developers] Re: Bitmap size exceeds

2012-08-15 Thread Numair Qadir
I set the minSDK to version 3.0, but it crash on the same line.
On Wed, Aug 15, 2012 at 7:14 PM, bob b...@coolfone.comze.com wrote:

 Did you set minSDK?  Where does it crash?

 On Tuesday, August 14, 2012 8:27:12 PM UTC-5, Numair Qadir wrote:

 Dear Bob,
 I tried my app in API 11 with largeHeap=true, but the app crashes. It
 didn't work. :(

 On Mon, Aug 13, 2012 at 7:06 PM, bob b...@coolfone.comze.com wrote:

 If your app is done in API 11 or higher, in the  application / in the
 Android Manifest.xml, you can use largeHeap=”true” which will allow the
 application to use more heap if it is available.


 On Sunday, August 12, 2012 6:48:14 PM UTC-5, Numair Qadir wrote:

 So, i was working on a project that loads an image from the gallery and
 set as background. It is working perfectly fine but crashes when i try to
 load a large image, i.e.
 5 MP (2592х1944), 8mpx (3264x2448), 12 MP, 4000x3000 , here is my code:

 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent
 data) {

 {
 super.onActivityResult(**request**Code, resultCode, data);

 if (resultCode == Activity.RESULT_OK  requestCode == 0) {
  Uri photo = data.getData();
 ContentResolver resolver = getContentResolver();
  resolver.notifyChange(photo, null);

  try {
 Bitmap bitmap = MediaStore.Images.Media.**getBit**map(resolver,
  photo);
 FrameLayout bg = (FrameLayout) findViewById(R.id.frame);
  Drawable drawable = new BitmapDrawable(getResources(),
 bitmap);
  bg.setBackgroundDrawable(**drawa**ble);

  // Do something useful with your bitmap
 } catch (FileNotFoundException e) {
  e.printStackTrace();
 } catch (IOException e) {
  e.printStackTrace();
 }
  }
 }
  }

 here is the logcat

 08-13 04:44:01.414: E/AndroidRuntime(11062): FATAL EXCEPTION: main
 08-13 04:44:01.414: E/AndroidRuntime(11062):
 java.lang.OutOfMemoryError: bitmap size exceeds VM budget
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory**.**nativeDecodeStream(Native Method)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory**.decodeStream(**BitmapFactory.**java:459)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at android.graphics.**
 BitmapFactory**.decodeStream(**BitmapFactory.**java:515)
 08-13 04:44:01.414: E/AndroidRuntime(11062): at
 android.provider.MediaStore$**Im**ages$Media.getBitmap(**MediaStor**
 e.java:503)

 Any help through code snippet/ tutorial would be more fruitful. 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-d...@**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=enhttp://groups.google.com/group/android-developers?hl=en


  --
 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


-- 
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

Re: [android-developers] Re: Android talking to computer

2012-08-15 Thread Kristopher Micinski
That would be one way to do it, we've also used some intent firing
mechanisms from ADB to implement things for testing apps.

kris

On Wed, Aug 15, 2012 at 10:18 AM, bob b...@coolfone.comze.com wrote:
 So I guess you just do a bunch of adb push and adb pull commands to have a
 conversation with an Android app?


 On Tuesday, August 14, 2012 5:07:25 PM UTC-5, Paul Turchenko wrote:

 All Android devices use ADB to talk to computer

 On Tuesday, August 14, 2012 2:27:53 PM UTC-5, bob wrote:

 Let's say I have an Android phone, and it is connected by USB to a PC.
 Is there an easy way to make it talk to the PC by USB?  For instance, it
 might send a camera image to the PC every five minutes.


 --
 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

-- 
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


Re: [android-developers] Maps showing mymaps

2012-08-15 Thread lbendlin
What part of abandoned was unclear?

On Wednesday, August 15, 2012 10:19:04 AM UTC-4, Sean751 wrote:

 When you say old and abandoned do you think there might be a new and 
 improved Maps API for Android any time soon?
 It will be messy but I will find another way to do what I want.
 Thanks
 Sean

 On Wednesday, August 15, 2012 9:53:59 AM UTC-4, TreKing wrote:

 On Wed, Aug 15, 2012 at 8:24 AM, Sean751 sea...@gmail.com wrote:

 I am trying to access mymaps in my Google account in an android 
 application. I want to be able to access the placemarks as objects to 
 display the details and perhaps edit the notes attached to the placemark. I 
 can't find any way to do this can anyone help?


 There is nothing in the current - or rather very old and pretty much 
 abandoned - Google Maps API for Android for this functionality. You would 
 have to check with the web version of the Maps library if this is possible, 
 which is off-topic for this list.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



-- 
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

Re: [android-developers] Maps showing mymaps

2012-08-15 Thread Sean751
Ouch
If you have nothing good to say then say nothing. 
I am not saying anything more.

On Wednesday, August 15, 2012 11:40:48 AM UTC-4, lbendlin wrote:

 What part of abandoned was unclear?

 On Wednesday, August 15, 2012 10:19:04 AM UTC-4, Sean751 wrote:

 When you say old and abandoned do you think there might be a new and 
 improved Maps API for Android any time soon?
 It will be messy but I will find another way to do what I want.
 Thanks
 Sean

 On Wednesday, August 15, 2012 9:53:59 AM UTC-4, TreKing wrote:

 On Wed, Aug 15, 2012 at 8:24 AM, Sean751 sea...@gmail.com wrote:

 I am trying to access mymaps in my Google account in an android 
 application. I want to be able to access the placemarks as objects to 
 display the details and perhaps edit the notes attached to the placemark. 
 I 
 can't find any way to do this can anyone help?


 There is nothing in the current - or rather very old and pretty much 
 abandoned - Google Maps API for Android for this functionality. You would 
 have to check with the web version of the Maps library if this is possible, 
 which is off-topic for this list.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago 
 transit tracking app for Android-powered devices



-- 
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

Re: [android-developers] Re: Android talking to computer

2012-08-15 Thread Michael Leung
Are you doing an app to send the image from phone to PC via usb?

Regards,
Michael
http://www.itblogs.info
http://www.michaelleumg.info
 2012-8-16 上午12:20 於 bob b...@coolfone.comze.com 寫道:

 So I guess you just do a bunch of *adb push* and *adb pull* commands to
 have a conversation with an Android app?

 On Tuesday, August 14, 2012 5:07:25 PM UTC-5, Paul Turchenko wrote:

 All Android devices use ADB to talk to computer

 On Tuesday, August 14, 2012 2:27:53 PM UTC-5, bob wrote:

 Let's say I have an Android phone, and it is connected by USB to a PC.
 Is there an easy way to make it talk to the PC by USB?  For instance, it
 might send a camera image to the PC every five minutes.


  --
 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

-- 
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

Re: [android-developers] I Missed my phone at Home - good apps

2012-08-15 Thread Michael Leung
I think that is a bit out of topic in here.

Regards,
Michael
http://www.itblogs.info
http://www.michaelleumg.info
 2012-8-15 上午4:30 於 Rocky rkjhaw1...@gmail.com 寫道:

 Let me know your comments


 https://play.google.com/store/apps/details?id=com.sst.devicefeature=search_result#?t=W251bGwsMSwxLDEsImNvbS5zc3QuZGV2aWNlIl0
 .


 --
 Thanks  Regards

 Rakesh Kumar Jha
 Android Developer, Trainer and Mentor
 Bangalore
 Skype - rkjhaw
 (O) +918050753516
 (R) +919886336619

  --
 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

-- 
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] Prevent garbage collection for Broadcast receiver that are dynamically registered

2012-08-15 Thread frantz lohier
Dear All,

I've developed an app  that registers a receiver in the onResume()
constructor.

This receiver need not to be deallocated as it processes intent even when
my app is not running on the foreground.

For that reason, the receiver is not deregistered by onPause().

Now, when the app goes in background mode, I get a warning that the
receiver has leaked and, since the 4.1 update, the receiver seems to be
deallocated from memory (was not the case before).

Question: is there a way to ensure that receiver are programmatically
registered at run-time are not deallocated when an app goes in background?

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

Re: [android-developers] Prevent garbage collection for Broadcast receiver that are dynamically registered

2012-08-15 Thread Mark Murphy
On Wed, Aug 15, 2012 at 12:34 PM, frantz lohier floh...@gmail.com wrote:
 Question: is there a way to ensure that receiver are programmatically
 registered at run-time are not deallocated when an app goes in background?

IMHO, a better implementation would be to register the receiver in the
manifest, then use PackageManager and setComponentEnabledSetting() to
control when it should and should not receive broadcasts. IMHO, a
receiver registered via registerReceiver() from an activity should
only be used for broadcasts while the activity is in the foreground.

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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
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


Re: [android-developers] Maps showing mymaps

2012-08-15 Thread TreKing
On Wed, Aug 15, 2012 at 9:19 AM, Sean751 sean...@gmail.com wrote:

 When you say old and abandoned do you think there might be a new and
 improved Maps API for Android any time soon?


There is zero indication that I'm aware of that the Android Maps API will
see even so much as a bug fix update any time soon.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

Re: [android-developers] Maps showing mymaps

2012-08-15 Thread Mark Murphy
On Wed, Aug 15, 2012 at 1:15 PM, TreKing treking...@gmail.com wrote:
 There is zero indication that I'm aware of that the Android Maps API will
 see even so much as a bug fix update any time soon.

FWIW, in at least two Google I|O sessions, the Android team was asked
about the Maps add-on for Android, and both times they admitted that
it is stale and indicated that it is being worked on. That being said,
this has all the hallmarks of your classic cross-department resource
allocation issue. Hence, while it would not stun me if there is an
updated Maps add-on available around the timeframe of the K Android
release, I certainly am not holding my breath waiting for it.

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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
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: Android 2.2 and background sensor

2012-08-15 Thread Pavel Brans
Hey. Why nobody cant tell me? Google says that this is bug and it is fixed. 
But i test that on several modern devices with latest updates it is the 
same. (also on 4x Android on Archos 101 tab) .

понедельник, 13 августа 2012 г., 15:01:44 UTC+3 пользователь Pavel Brans 
написал:

 I mean  don't collects in backgroung when screen is off.

 понедельник, 13 августа 2012 г., 15:00:25 UTC+3 пользователь Pavel Brans 
 написал:

 I have android 2.2.2 on my phone(LG-P970) but sensors don't collects data 
 with partial wake lock. Why? How to deal with it?



-- 
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] Apps downloaded from Play Store on Jelly Bean devices not working - even now - even free apps

2012-08-15 Thread Bikram Agarwal
Hi,

I'm novice in Android app developement. I recently started building theme 
packs for different launchers and uploaded them on Play Store. These apps 
are having issues with devices using Jelly Bean ROM. And not just the mass 
reported encryption related issue. I had heard that only paid apps were not 
working on JB earlier and then Google disabled the DRM on play store and 
that the apps were now supposed to work on JB too. But that's not happening 
for me.

   - Both of my paid and free apps are not working on Jelly Bean.
   - Both kinds are getting downloaded to /mnt/asec which is the 
   'encrypted' market app download location for JB; and not the /data/app
   - The exact same apk, when sideloaded and installed, works fine. So, 
   it's not app's issue.
   - I downloaded someone else's theme pack and it got downloaded to 
   /data/app and worked fine.
   

So, my question is, 

   - While compiling/building the apk, do I need to do some extra settings 
   somewhere to make the app compatible with JB through play store? 
   - How do I force my apps to download OR get installed at pre-JB 
   locations and not /mnt/asec?

Any help would be appreciated. My apps are getting a bad rep due to 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: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread b0b
Interesting discussion but how are we supposed to handle setContentView() 
(which calle the layour inflater, which instantiates views), 
taking a lot of time for complex layouts ? 

In ICS+, if  the main UI thread is stuck for more than approx 500ms the 
system great the app with a super aggressive:

08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to 
'/data/anr/traces.txt'

which further slow down app startup (writing on the SD Card take some time).

So if setContentView() takes more than 500ms (not an uncommon occurence), 
then the system penalize the app 
even more, writting unwanted stack traces (the app is not ANRing at this 
stage, it is starting).

Since is not safe to call the layout inflater in an AsyncTask to load it in 
the background while displaying some progress display, 
this result in Activities displaying a black screen until  onCreate() 
finishes which may be quite some time if setContentView() cannot be 
executed fast.





-- 
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: Apps downloaded from Play Store on Jelly Bean devices not working - even now - even free apps

2012-08-15 Thread Bikram Agarwal

FYI, these are my installed ADK packages - 

https://lh3.googleusercontent.com/-j1BMiwFXarg/UCv1rc26mkI/ONo/UWH8XBZccUU/s1600/package.jpg

-- 
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

Re: [android-developers] Re: Android 2.2 and background sensor

2012-08-15 Thread Mark Murphy
On Wed, Aug 15, 2012 at 3:05 PM, Pavel Brans thesn...@gmail.com wrote:
 Google says that this is bug and it is fixed.

AFAIK, the behavior of sensors with the screen off is undefined and is
up to the device manufacturer.

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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
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: Android 2.2 and background sensor

2012-08-15 Thread bob
 

What sensor are you trying to read?  Also, why not just display a black 
screen instead of turning the screen off?



On Monday, August 13, 2012 7:00:25 AM UTC-5, Pavel Brans wrote:

 I have android 2.2.2 on my phone(LG-P970) but sensors don't collects data 
 with partial wake lock. Why? How to deal with it?

-- 
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] Find package name of an application by scanning through all installed applications on device?

2012-08-15 Thread dillipk
Hi,
   I am trying to find the *package name *of an application based on 
'Application Name' by scanning through all installed applications on the 
device. Using the below code, it works, but takes about 15~20 secs to find 
the package name on a device loaded with applications.

public String findApplicationPackage( String sAppName ){

   String sPackageName= null;

   PackageManager   pm  = m_Context.getPackageManager();

 //get a list of installed apps.
  ListApplicationInfo packages= 
pm.getInstalledApplications(PackageManager.GET_META_DATA);

  ApplicationInfo   ap  = new ApplicationInfo();
  ap.loadLabel(pm);



   for (ApplicationInfo packageInfo : packages) {

String  sApp= packageInfo.loadLabel( pm 
).toString();

//Log.d(TAG, Installed AppName =  + appName +   ,package : + 
packageInfo.packageName );
//Log.d(TAG,   Launch Activity : + 
pm.getLaunchIntentForPackage(packageInfo.packageName)); 

if( sApp.compareTo( sAppName ) == 0 ){

sPackageName= packageInfo.packageName;
break;
}

   }// the getLaunchIntentForPackage  

   return sPackageName;
}

 How do I optimize this and reduce the time?

Thanks,
DK


-- 
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: I Missed my phone at Home - good apps

2012-08-15 Thread bob
Instead of I Missed my Phone at Home maybe call it I Left my Phone at 
Home?  It's better grammar.



On Tuesday, August 14, 2012 1:27:07 PM UTC-5, RKJ (Android developer) wrote:

 Let me know your comments


 https://play.google.com/store/apps/details?id=com.sst.devicefeature=search_result#?t=W251bGwsMSwxLDEsImNvbS5zc3QuZGV2aWNlIl0
 .


 -- 
 Thanks  Regards

 Rakesh Kumar Jha
 Android Developer, Trainer and Mentor
 Bangalore
 Skype - rkjhaw
 (O) +918050753516
 (R) +919886336619



-- 
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: App startup with heavy initialization and ANR detection

2012-08-15 Thread bob
 

Well, does it ask if you want to Force Close?  If not, it sounds like there 
isn't clearly a problem.  You'll probably never understand every line in 
logcat.



On Wednesday, August 15, 2012 8:49:24 AM UTC-5, b0b wrote:

 I have an app whose initialization is quite CPU and thread heavy for 3-5s 
 on startup.

 During that period, the logcat reports several:

 08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
 08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to 
 '/data/anr/traces.txt'

 every 500ms or so it seems.

 AFAIK the main (UI) thread is not blocked as all heavy initialization work 
 is done in threads as it should. 
 However there are a lot of concurrent stuff with many threads hapenning 
 during these 3-5s with the CPU probably at 100%.

 I suspect that writing '/data/anr/traces.txt' several times on startup 
 further slow it down.

 I'm asking for details  on how the system detect ANRs and in particular 
 under which conditions it produces logcat output above. 
 Is it linked to CPU usage or simply the main thread being blocked ?
 That is, one or several threads pegging the CPU would give these messages 
 (while the main thread itself is not blocked) ?





-- 
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

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread Romain Guy
An ANR is triggered if the UI thread is blocked for 5 seconds, not 500ms.
On Aug 15, 2012 9:15 PM, b0b pujos.mich...@gmail.com wrote:

 Interesting discussion but how are we supposed to handle setContentView()
 (which calle the layour inflater, which instantiates views),
 taking a lot of time for complex layouts ?

 In ICS+, if  the main UI thread is stuck for more than approx 500ms the
 system great the app with a super aggressive:

 08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
 08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to
 '/data/anr/traces.txt'

 which further slow down app startup (writing on the SD Card take some
 time).

 So if setContentView() takes more than 500ms (not an uncommon occurence),
 then the system penalize the app
 even more, writting unwanted stack traces (the app is not ANRing at this
 stage, it is starting).

 Since is not safe to call the layout inflater in an AsyncTask to load it
 in the background while displaying some progress display,
 this result in Activities displaying a black screen until  onCreate()
 finishes which may be quite some time if setContentView() cannot be
 executed fast.





  --
 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

-- 
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: Android 2.2 and background sensor

2012-08-15 Thread Pavel Brans
Accel and Magnetic field.   black screen  will draine batary much faster 
then turn screen off as i understand..
That is absoulutly not clever from google to give posibility to vendors to 
disable sensors when screen off and for vendors to use this posibilyty. Now 
i have service that save batery power on GPS with the hel of sensors. It is 
tested and it is work well! It save batary to user and make accuracy of GPS 
higher... but i cant save power to users...

среда, 15 августа 2012 г., 22:45:41 UTC+3 пользователь bob написал:

 What sensor are you trying to read?  Also, why not just display a black 
 screen instead of turning the screen off?



 On Monday, August 13, 2012 7:00:25 AM UTC-5, Pavel Brans wrote:

 I have android 2.2.2 on my phone(LG-P970) but sensors don't collects data 
 with partial wake lock. Why? How to deal with it?



-- 
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] Error when compiling Android project with Eclipse

2012-08-15 Thread Dan Uff
Hi all,
I'm getting the below error when I compile and try to run my project in the 
simulator:

[2012-08-15 16:08:31 - LANTA] Installation error: 
INSTALL_FAILED_MISSING_SHARED_LIBRARY

[2012-08-15 16:08:31 - LANTA] Please check logcat output for more details.

[2012-08-15 16:08:31 - LANTA] Launch canceled!

Can someone tell me what these errors are and how to fix them?

Thanks,
Dan Uff

-- 
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

Re: [android-developers] Error when compiling Android project with Eclipse

2012-08-15 Thread Mark Murphy
On Wed, Aug 15, 2012 at 4:23 PM, Dan Uff danny@gmail.com wrote:
 I'm getting the below error when I compile and try to run my project in the
 simulator:

Most likely, you are running this in the emulator, not a simulator.

 [2012-08-15 16:08:31 - LANTA] Installation error:
 INSTALL_FAILED_MISSING_SHARED_LIBRARY

 [2012-08-15 16:08:31 - LANTA] Please check logcat output for more details.

 [2012-08-15 16:08:31 - LANTA] Launch canceled!

 Can someone tell me what these errors are and how to fix them?

You have a uses-library element in your manifest, and the AVD for
your emulator does not have that library. For example, if your
uses-library is for Google Maps, you need to have an AVD set up with
the Google APIs.

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

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
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


Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread b0b


On Wednesday, 15 August 2012 22:07:46 UTC+2, Romain Guy (Google) wrote:

 An ANR is triggered if the UI thread is blocked for 5 seconds, not 500ms.


Yes, but until the ANR hapens (or not if the UI thread is blocked fior 
say...3s), the logcat spams these messages every 500ms (CM9, ICS 4.0.4):

08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to 
'/data/anr/traces.txt'

Shouldn't it write this file only when the ANR happens (5s) ?

-- 
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

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread b0b
My Asus TF101 running stock ICS doesn't display  the Wrote stack traces 
line  in the logcat every 500ms the UI thread is not responding, which make 
me think it could be a CM9 issue or bug ?


On Wednesday, 15 August 2012 22:39:09 UTC+2, b0b wrote:



 On Wednesday, 15 August 2012 22:07:46 UTC+2, Romain Guy (Google) wrote:

 An ANR is triggered if the UI thread is blocked for 5 seconds, not 500ms.


 Yes, but until the ANR hapens (or not if the UI thread is blocked fior 
 say...3s), the logcat spams these messages every 500ms (CM9, ICS 4.0.4):

 08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
 08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to 
 '/data/anr/traces.txt'

 Shouldn't it write this file only when the ANR happens (5s) ?


-- 
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

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread Gergely Juhász
Kedves Tamás,

It's really strange. What are you doing in your view's constructor? I
view's constructor mostly reads's out the given attributes depending
on the given style. Init some members, like Paint objects, but usually
that's all.
Every hard work comes after it's attached to the hierarchy (like
measure, layout placement, drawing).

On 15 August 2012 23:02, b0b pujos.mich...@gmail.com wrote:
 My Asus TF101 running stock ICS doesn't display  the Wrote stack traces
 line  in the logcat every 500ms the UI thread is not responding, which make
 me think it could be a CM9 issue or bug ?



 On Wednesday, 15 August 2012 22:39:09 UTC+2, b0b wrote:



 On Wednesday, 15 August 2012 22:07:46 UTC+2, Romain Guy (Google) wrote:

 An ANR is triggered if the UI thread is blocked for 5 seconds, not 500ms.



 Yes, but until the ANR hapens (or not if the UI thread is blocked fior
 say...3s), the logcat spams these messages every 500ms (CM9, ICS 4.0.4):

 08-15 15:33:24.804: I/dalvikvm(8550): threadid=3: reacting to signal 3
 08-15 15:33:24.882: I/dalvikvm(8550): Wrote stack traces to
 '/data/anr/traces.txt'

 Shouldn't it write this file only when the ANR happens (5s) ?

 --
 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

-- 
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


Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread b0b
I'm now convinced it is a CM9 issue as it writes stack traces for almost 
any app, at startup but also sometimes during normal execution. 

To prove I am not affabulating, this when starting the camera app (in 
between lines omitted):

08-15 23:08:57.078: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'
08-15 23:08:57.128: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'
08-15 23:08:57.582: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'
08-15 23:08:58.058: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'
08-15 23:08:58.558: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'
08-15 23:08:59.011: I/dalvikvm(30403): Wrote stack traces to 
'/data/anr/traces.txt'

That could explained why I noticed some unexlained lags on my Samsung 
Galaxy S CM9.
It looks like it spends its time writing stack traces...

Well, that issue will have had the benefit to make me turbo optimize 
onCreate() and friends while trying to get rid of it.

-- 
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 when compiling Android project with Eclipse

2012-08-15 Thread Dan Uff
Mark,
Thanks for the help.  :-)

Dan

On Wednesday, August 15, 2012 4:23:31 PM UTC-4, Dan Uff wrote:

 Hi all,
 I'm getting the below error when I compile and try to run my project in 
 the simulator:

 [2012-08-15 16:08:31 - LANTA] Installation error: 
 INSTALL_FAILED_MISSING_SHARED_LIBRARY

 [2012-08-15 16:08:31 - LANTA] Please check logcat output for more details.

 [2012-08-15 16:08:31 - LANTA] Launch canceled!

 Can someone tell me what these errors are and how to fix them?

 Thanks,
 Dan Uff


-- 
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 when compiling Android project with Eclipse

2012-08-15 Thread bob
Check to make sure that you run on a google api emulator

On Wednesday, August 15, 2012 3:23:31 PM UTC-5, Dan Uff wrote:

 Hi all,
 I'm getting the below error when I compile and try to run my project in 
 the simulator:

 [2012-08-15 16:08:31 - LANTA] Installation error: 
 INSTALL_FAILED_MISSING_SHARED_LIBRARY

 [2012-08-15 16:08:31 - LANTA] Please check logcat output for more details.

 [2012-08-15 16:08:31 - LANTA] Launch canceled!

 Can someone tell me what these errors are and how to fix them?

 Thanks,
 Dan Uff


-- 
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

Re: [android-developers] Re: Error when compiling Android project with Eclipse

2012-08-15 Thread James Black
You may want to look at this:
http://stackoverflow.com/questions/1113088/install-failed-missing-shared-library-error-in-android


Does this apply to you:
To get past INSTALL_FAILED_MISSING_SHARED_LIBRARY error with Google Maps
for Android:

The first answer explains how to get past this error.

On Wed, Aug 15, 2012 at 5:19 PM, bob b...@coolfone.comze.com wrote:

 Check to make sure that you run on a google api emulator

 On Wednesday, August 15, 2012 3:23:31 PM UTC-5, Dan Uff wrote:

 Hi all,
 I'm getting the below error when I compile and try to run my project in
 the simulator:

 [2012-08-15 16:08:31 - LANTA] Installation error:
 INSTALL_FAILED_MISSING_SHARED_**LIBRARY

 [2012-08-15 16:08:31 - LANTA] Please check logcat output for more details.

 [2012-08-15 16:08:31 - LANTA] Launch canceled!

 Can someone tell me what these errors are and how to fix them?

 Thanks,
 Dan Uff

  --
 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




-- 
Resume  Projects: http://careers.stackoverflow.com/jamesblack

I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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

Re: [android-developers] LVL suddently stopped working - returns only timeouts

2012-08-15 Thread Kostya Vasilyev
I'd like to resurrect an old thread.

In my app, I keep seeing LVL timeouts.

It started back in May (re: the old thread link below) and at that time, I
was able to get logcat output from two users to confirm that:

1 - The app binds to the Market app / service
2 - It queues up a license check request
3 - Nothing comes back in the allowed 15 second response window (which is
the timeout value in the library / sample).

At this time, I'd estimate the number of affected users to be about 1%,
that is, those who contact me about this (there maybe those who don't).

My LVL code is based on the library, with some fairly minor changes except
that I use my own schedule for running LVL checks, caching the licensed
response for about a month and then re-checking.

Is anyone else seeing this or anything similar?

-- K

2012/5/21 Kostya Vasilyev kmans...@gmail.com

 Recent thread:

 https://groups.google.com/d/topic/android-developers/X6mcgBReUCA/discussion

 -- K


 2012/5/21 andrew android ahmgold...@hotmail.com

 I have had LVL (licensing validation) in my apps ever since it was first
 available and suddenly in the past few weeks, without any changes made by
 me, I have only received timeout errors - even when I increase the timeout
 set in licenseChecker.java.  I have checked and rechecked all of my codes
 and my key.

 I have the problem on both my Samsung Galaxy Nexus (running 4.0.2) and my
 WiFi XOOM (running 4.0.4)

 Has anybody else been having a problem lately?  I have users with these
 issues as well, it seems.

 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




-- 
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

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread b0b
After more investigations, it look like each of this  Wrote stack traces 
logcat line will write a /data/anr/slow??.txt :


shell@android:/data/anr $ ls
slow00.txt
slow01.txt
slow02.txt
slow03.txt
slow04.txt
slow05.txt
slow06.txt
slow07.txt
slow08.txt
slow09.txt
traces.txt


My question to thows in the know is 

- can it be disabled ? I had high hope in a property called 
dalvik.vm.lockprof.threshold set to 500 but chaning it or removing it
doesn't do anything.
- who thought that this feature to write stack traces if the UI thread is 
blocked for 500ms is a good idea ? Is it to make the device even 
slower, writing stack trace that nobody will ever read ?

This feature seems to be only be enabled on some ROMs but doesn't look 
restricted to CyanogenMod.


On Wednesday, 15 August 2012 23:14:40 UTC+2, b0b wrote:

 I'm now convinced it is a CM9 issue as it writes stack traces for almost 
 any app, at startup but also sometimes during normal execution. 

 To prove I am not affabulating, this when starting the camera app (in 
 between lines omitted):

 08-15 23:08:57.078: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'
 08-15 23:08:57.128: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'
 08-15 23:08:57.582: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'
 08-15 23:08:58.058: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'
 08-15 23:08:58.558: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'
 08-15 23:08:59.011: I/dalvikvm(30403): Wrote stack traces to 
 '/data/anr/traces.txt'

 That could explained why I noticed some unexlained lags on my Samsung 
 Galaxy S CM9.
 It looks like it spends its time writing stack traces...

 Well, that issue will have had the benefit to make me turbo optimize 
 onCreate() and friends while trying to get rid of it.


-- 
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

Re: [android-developers] Re: Instantiating (but not attaching!) a View from a non-UI thread

2012-08-15 Thread Justin Anderson
Then you would need to talk to the makers of the roms that are doing
this...

As for onCreate() you shouldn't really be doing ANYTHING except calling
setContentView() and initializing a few member variables.  Anything else
needs to go in a separate thread (perhaps using AsyncTask) to do heavy
initialization/work...
On Aug 15, 2012 5:16 PM, b0b pujos.mich...@gmail.com wrote:

 After more investigations, it look like each of this  Wrote stack traces
 logcat line will write a /data/anr/slow??.txt :


 shell@android:/data/anr $ ls
 slow00.txt
 slow01.txt
 slow02.txt
 slow03.txt
 slow04.txt
 slow05.txt
 slow06.txt
 slow07.txt
 slow08.txt
 slow09.txt
 traces.txt


 My question to thows in the know is

 - can it be disabled ? I had high hope in a property called
 dalvik.vm.lockprof.threshold set to 500 but chaning it or removing it
 doesn't do anything.
 - who thought that this feature to write stack traces if the UI thread
 is blocked for 500ms is a good idea ? Is it to make the device even
 slower, writing stack trace that nobody will ever read ?

 This feature seems to be only be enabled on some ROMs but doesn't look
 restricted to CyanogenMod.


 On Wednesday, 15 August 2012 23:14:40 UTC+2, b0b wrote:

 I'm now convinced it is a CM9 issue as it writes stack traces for almost
 any app, at startup but also sometimes during normal execution.

 To prove I am not affabulating, this when starting the camera app (in
 between lines omitted):

 08-15 23:08:57.078: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'
 08-15 23:08:57.128: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'
 08-15 23:08:57.582: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'
 08-15 23:08:58.058: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'
 08-15 23:08:58.558: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'
 08-15 23:08:59.011: I/dalvikvm(30403): Wrote stack traces to
 '/data/anr/traces.txt'

 That could explained why I noticed some unexlained lags on my Samsung
 Galaxy S CM9.
 It looks like it spends its time writing stack traces...

 Well, that issue will have had the benefit to make me turbo optimize
 onCreate() and friends while trying to get rid of it.

  --
 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

-- 
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

Re: [android-developers] Bitmap size exceeds

2012-08-15 Thread Numair Qadir
Oh man. Thanks alot. That is the wonderful book that teaches me alot
regarding media stuff. The problem is solved :)

On Wed, Aug 15, 2012 at 10:24 AM, Jim Graham spooky1...@gmail.com wrote:

 On Wed, Aug 15, 2012 at 06:35:43AM +0500, Numair Qadir wrote:

  I  like the solution you proposed for me, can you please explain me more
  how to load/scale it at the same time. Any help from code snippet/
 example
  would be more appreciated. Thanks

 For examples, buy a copy of the book I learned from:  Pro Android Media.
 It's good.  I'm sure there are more examples, but that's the source I
 know about.

 For a detailed reference, refer to the Bitmap and BitmapFactory pages in
 the developers guide that I mentioned before.

 Later,
--jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)MiSTie #49997   Running Mac OS X Lion 
 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

Saw something on TV about Psych-os.
  H, Psych OS.  Perhaps the next freeware OS   --me

 Android Apps Listing at http://www.jstrack.org/barcodes.html

 --
 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


-- 
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: Create 2 groups in expandable listview

2012-08-15 Thread Krishna Veni
In the above example directly inserted children values.like this
*private* 
Stringhttp://android.grepsrc.com/source/s?defs=Stringproject=ics-mr1[][] 
children http://android.grepsrc.com/source/s?refs=childrenproject=ics-mr1= {

   { Arnold, Barry, Chuck, David },
   { Ace, Bandit, Cha-Cha, Deuce },
{ Fluffy, Snuggles },
{ Goldy, Bubbles }
};

But i wish to need the children value is my xml parsed value.how is to 
do.please help me.


On Wednesday, August 15, 2012 11:12:05 AM UTC+5:30, Jegadeesan M wrote:

 please check this link  
 http://android.grepsrc.com/xref/ics-mr1/development/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java

 On Monday, 13 August 2012 23:26:20 UTC-7, Krishna Veni wrote:

 Hi I have tried to develop expandable listview in android application.Now 
 I have one doubts.How is creating 2 groups ion below my code for separate 
 child details?

 For Eg:

 Group name: OrderInfo,CustomerInfo. Childname(OrderInfo):payment_method. 
 Childname(CustomerInfo):name,email.

 How to do this?Please help me.

 this is my code:

  SimpleExpandableListAdapter expListAdapter =

 new SimpleExpandableListAdapter(

 this,

 

 createGroupList(),  // Creating group 
 List.

 R.layout.group_row,  

   // Group item layout XML.

 new String[] { OrderInfo,CustomerInfo},  // the 
 key of group item.

 new int[] { R.id.order,R.id.customer},

 

 // ID of each group item.-Data under the key goes 
 into this TextView.

 createChildList(),  // childData 
 describes second-level entries.

 R.layout.single_list_item,  

 

new String[] 
 {KEY_ARTIST,KEY_DURATION,KEY_SUBTOTAL,KEY_DISCOUNT,KEY_COUPON,KEY_COST},
  
  

new int[] { 
 R.id.payment_label,R.id.total_label,R.id.discount_label,R.id.discount_label,R.id.coupon_label,R.id.cost_label}//
  
 Keys in childData maps to display.



 );

 setListAdapter( expListAdapter );   // setting the 
 adapter in the list.

  

 }catch(Exception e){

 System.out.println(E +++  + e.getMessage());

 }

 }



 /* Creating the Hashmap for the row */

 @SuppressWarnings(unchecked)

 private List createGroupList() {

   ArrayList result = new ArrayList();

   for( int i = 0 ; i  1 ; ++i ) { // 15 groups

 HashMap m = new HashMap();

map.put( CustomerInfo,CustomerInfo); // the key 
 and it's value.

 m.put( OrderInfo, OrderInfo);

   

 result.add( m);

   }

   return (List)result;

   

 }

 

  


 /* creatin the HashMap for the children */

 @SuppressWarnings(unchecked)

 private List createChildList() {

  

 ArrayList result = new ArrayList();

 for( int i = 0 ; i  1 ; ++i ) { // this -15 is the number of 
 groups(Here it's fifteen)

   /* each group need each HashMap-Here for each group we have 3 
 subgroups */

   ArrayList secList = new ArrayList();

   for( int n = 0 ; n  1 ; n++ ) {

 HashMap child = new HashMap();

 Intent in = getIntent();

 String payment_method = in.getStringExtra(KEY_ARTIST);

 TextView lblPayment = (TextView) 
 findViewById(R.id.payment_label);

  ///  lblPayment.setText(payment_method);

int payment;

payment=1;



 

   

String s= getIntent().getStringExtra(payment_method);

String s1= getIntent().getStringExtra(total);

String s2= getIntent().getStringExtra(subtotal);

String s3= getIntent().getStringExtra(discount);

String s4= getIntent().getStringExtra(coupon_discount);

String s5= getIntent().getStringExtra(shipping_cost);


  child.put( KEY_ARTIST, s);

  child.put( KEY_DURATION, s1);

  child.put( KEY_SUBTOTAL, s2);

  child.put( KEY_DISCOUNT, s3);

  child.put( KEY_COUPON, s4);

  child.put( KEY_COST, s5);

 secList.add( child);

   }

  result.add( secList );

 }

 return result;

 }

 Here my above code is not worked.So please help me I have to change what 
 line.



-- 
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

[android-developers] Re: LVL suddently stopped working - returns only timeouts

2012-08-15 Thread Pent
My app only required a single positive response and then would never
query again. I had a few people every day with OK orders who couldn't
validate, starting around May I guess, as you say. I don't know what
the cause was.

The only thing that helped was uninstall-reinstall.

After giving Google a few months to fix it I gave up and removed the
LVL, I was just too embarrassed to ask brand new customers to
uninstall-reinstall anymore.

Ideally the situation would have been:

- see problem
- investigate
- report as much details as possible to Google
- wait for fix

But since they don't respond to any messages about Market I didn't see
the point of wasting my time and increasing my blood pressure.

Pent

-- 
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] READING A FILE FROM INTERNAL MEMORY

2012-08-15 Thread Ansh
Hi all,
 
My client has a requirement of reading a file from apps private space. A 
file that can be a doc/pdf/txt file, has to be read from my apps internal 
memory with the permissions like read or read write.And i have to open that 
file from the third party app.i have that it is not possible ,but i would 
like to know is there any way i can achieve this task.
NOTE : creating our own file viewer is not preferable due to long 
development time.

Thanks 
Anshul

-- 
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

Re: [android-developers] Bitmap size exceeds

2012-08-15 Thread Jim Graham
On Thu, Aug 16, 2012 at 07:53:03AM +0500, Numair Qadir wrote:
 Oh man. Thanks alot. That is the wonderful book that teaches me alot
 regarding media stuff. The problem is solved :)

No problem...I agree completely.  It's definitely a very good book, but
you need to read it along with the relevant sections in the developers
guide, too, if you REALLY want to get it right.

Later,
   --jim

PS:  alot is not a word...it's spelled a lot

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)  | This 'telephone' has too many
spooky1...@gmail.com  | shortcomings to be seriously considered
 Running Mac OS X Lion  | as a means of communication.  The device
ICBM / Hurricane: | is inherently of no value to us.
   30.44406N 86.59909W| (Western Union internal memo, 1876)

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
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] How to get cpu elapsed of other processes which are in background in android?

2012-08-15 Thread thejaswi s
How to get cpu elapsed of other processes which are in background in
android?


In my application I want to get CPU elapsed time of other processes which
are running in background. How can I do it. Thanks in advance.

-- 
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] Disabling wifi, GPS, Bluetooth, and celluar in an app

2012-08-15 Thread Jason Hsu
I have an idea for an app.  In the interest of helping the user conserve 
battery power, I want to provide the OPTION of disabling battery-draining 
services like wifi, GPS, Bluetooth, and cellular.

How do I implement this?  Are there good tutorials/examples that implement 
such functionality?

-- 
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] Dynamically create two group and children in android expandable listview from xml feed

2012-08-15 Thread Krishna Veni
I am working on a client-server project in android.I need to parse xml from 
url and place it in Expandablelistview. The problem arises when i am trying 
to place childs inside each group based on the data coming from server. My 
code only places the first child inside first group, but i can't create two 
separate groups.

I need to place payment_method and total inside respective 
group(e.g:Groupname:OrderInfo,customerInfo, 
Childname(OrderInfo):payment_method,total, 
Childname(CustomerInfo):firstname,lastname).My code can placed 
Childname(OrderInfo) inside OrderInfo group, but i wish to need when i 
click customerInfo group, the firstname,lastname also displayed 
customerInfo group.pleasehelp me how is to do. my code is attached 
above.please give me some solution for develop this.

Thank You.

-- 
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=enpackage com.example.androidhive;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import android.app.ExpandableListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ExpandableListView;
import android.widget.SimpleExpandableListAdapter;
import android.widget.TextView;
 
public class SingleMenuItemActivity extends ExpandableListActivity {
	
	
	
	
	static final String KEY_ARTIST = payment_method;
	static final String KEY_ARTIST = firstname;
	
	static final String KEY_DURATION = lastname;
	static final String KEY_DURATION = total;
	static final String OrderInfo = OrderInfo;
	static final String CustomerInfo = CustomerInfo;
@SuppressWarnings(unchecked)
public void onCreate(Bundle savedInstanceState) {
try{
 super.onCreate(savedInstanceState);
 setContentView(R.layout.particular);
   
SimpleExpandableListAdapter expListAdapter =
new SimpleExpandableListAdapter(
this,

createGroupList(),  // Creating group List.
R.layout.group_row, 
   
  // Group item layout XML.
new String[] { OrderInfo},  // the key of group item.e
new int[] { R.id.order},
 
// ID of each group item.-Data under the key goes into this TextView.
createChildList(),  // childData describes second-level entries.
R.layout.single_list_item,  
  //  new String[] {KEY_ARTIST},  
   // new int[] { R.id.payment_label}  // Keys in childData maps to display.
  // Layout for sub-level entries(second level).
   new String[] {KEY_ARTIST,KEY_DURATION},  
   new int[] { R.id.name_label,R.id.cost_label}// Keys in childData maps to display.
 //   new int[] { R.id.payment_label,R.id.total_label} // Data under the keys above go into these TextViews.
);
setListAdapter( expListAdapter );   // setting the adapter in the list.
 
}catch(Exception e){
System.out.println(E +++  + e.getMessage());
}
}


/* Creating the Hashmap for the row */
@SuppressWarnings(unchecked)
private List createGroupList() {
  ArrayList result = new ArrayList();
  for( int i = 0 ; i  1 ; ++i ) { // 15 groups
HashMap m = new HashMap();
   // HashMapString,String map = new HashMapString,String();
   // m.put( CustomerInfo,CustomerInfo); // the key and it's value.
m.put( OrderInfo, OrderInfo);
  
result.add( m);
  }
  return (List)result;
  
}

 

/* creatin the HashMap for the children */
@SuppressWarnings(unchecked)
private List createChildList() {
 
ArrayList result = new ArrayList();
for( int i = 0 ; i  1 ; ++i ) { // this -15 is the number of groups(Here it's fifteen)
  /* each group need each HashMap-Here for each group we have 3 subgroups */
  ArrayList secList = new ArrayList();
  for( int n = 0 ; n  1 ; n++ ) {
HashMap child = new HashMap();
   
   String s= getIntent().getStringExtra(payment_method);
   String s1= getIntent().getStringExtra(total);
 

 child.put( KEY_ARTIST, s);
 child.put( KEY_DURATION, s1);
 
secList.add( child);
  }
 result.add( secList );
}
return result;
}
public void  onContentChanged  () 

Re: [android-developers] Disabling wifi, GPS, Bluetooth, and celluar in an app

2012-08-15 Thread mike digioia
press airplane mode!

On Wed, Aug 15, 2012 at 10:33 PM, Jason Hsu jhsu802...@gmail.com wrote:
 I have an idea for an app.  In the interest of helping the user conserve
 battery power, I want to provide the OPTION of disabling battery-draining
 services like wifi, GPS, Bluetooth, and cellular.

 How do I implement this?  Are there good tutorials/examples that implement
 such functionality?

 --
 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

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-08-15 Thread Kevin Gaudin
Hi everyone,

I'm the main developer of ACRA and just read this topic after receiving 
messages from devs who could not get their logcat anymore on JB devices.

Until now, ACRA was checking that the READ_LOGS permission was granted 
before exec-ing logcat and retrieving DropBoxManager events.

Starting with the next beta (4.3.0b1 has just been released so it will be 
4.3.0b2 in a few days), there will be a condition to ignore the 
unavailability of the permission if the device has an api level greater or 
equal to 16.

So, you will be able to get the logcat traces from YOUR app. Even if you 
don't add the READ_LOGS permission to your manifest. You lose some data 
from exterior events happening while your app is running, but you won't 
scare your users with this permission. That is... if you target JB devices 
or consider getting logcat traces only from JB devices is enough ;-)

About DropBoxManager, nothing will be collected anymore starting with JB. I 
don't think this will harm much devs as it was an unknown feature (except 
Ievgenii 
Nazaruk).

Kevin

-- 
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