Re: [android-developers] Re: Built-in resource unexpectedly not found

2011-01-28 Thread Mark Carter
Thank you for clarifying those points, Dianne.

On 28 January 2011 00:42, Dianne Hackborn hack...@android.com wrote:

 This isn't really a problem; it is working as intended.  You are using
 something from a newer platform that doesn't exist on an older platform.
  What do you expect to happen when you run on the older platform?


Well, I've learnt not to expect anything :) But I most hope for a meaningful
error message, failing that an error message that is not misleading (like
claiming a particular resource is missing when it is not).

The older platform never knew what this thing was.  It turns out that there
 are a lot of drawables in the platform that aren't in the SDK, so you are
 using a larger resource number than what was publicly defined in the older
 platform, ending up with (pretty randomly) one of its private drawables.


I think I follow, though maybe not. Would it not be possible for the
compiler to throw up some warning about this? i.e. if there is some resource
referred to which is not publicly defined in at least one of the SDK levels
not less than that specified in minSdkVersion?

If you are using new APIs and trying to run on an older platform, you just
 need to make sure that you don't try to use them when on the older platform.
  This applies to Java APIs as well as resources.


There are a couple of concerns here:

1. How to debug this? I'm not aware I'm using any private/internal
resources or any public resources introduced after SDK level 4 (which I set
the minSdkVersion to)
2. How to safeguard against this?

I've tested my app in the emulator at SDK level 4,7,8  9. Everything worked
fine. I haven't tested it at level 5 or 6 because they don't seem to be
available in the AVD Manager but anyway I would think it unlikely that a
resource would be defined in levels 47 but not 5.

-- 
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] Is it possible to use official Android icons in paid apps?

2011-01-28 Thread Mariux
Hello,

is there some sort of prohibition to use official Android icons in
paid apps?

The Android SDK Terms of use reports this:

3.3 Except to the extent required by applicable third party licenses,
you may not copy (except for backup purposes), modify, adapt,
redistribute, decompile, reverse engineer, disassemble, or create
derivative works of the SDK or any part of the SDK. Except to the
extent required by applicable third party licenses, you may not load
any part of the SDK onto a mobile handset or any other hardware device
except a personal computer, combine any part of the SDK with other
software, or distribute any software or device incorporating a part of
the SDK.


3.6 Nothing in this License Agreement gives you a right to use any of
Google's trade names, trademarks, service marks, logos, domain names,
or other distinctive brand features.

Icons should be considered part of the SDK or distinctive brand
features?

Thanks

Mariux



-- 
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] Honeycomb Emulator Landscape issue on Ubuntu 10.04

2011-01-28 Thread Steve Gores-Todd
The solution can be found on the SKD preview page near the bottom.

http://developer.android.com/sdk/preview/index.html

Known issues

 The following known issues occur for Android 3.0 AVDs that are loaded in
 the emulator:

- The emulator displays a rotated portrait screen while in landscape
orientation. To view the screen correctly in landscape orientation, turn 
 off
the auto-rotate setting in *Settings  Screen  Auto-rotate screen*.
Then use Ctrl-F11 to rotate the emulator.
- You cannot take screenshots of an emulator screen. The Device Screen
Capture window displays *Screen not available*.
- GPS emulation is currently not supported.
- When rotating the emulator screen by pressing Ctrl-F11, the screen
turns green momentarily, then displays the normal interface.
- The Dev Tools application sometimes crashes when trying to use the
Package Browser feature


When they say the emulation is slow, they mean slow! On my Intel Q6600 Quad
Core it is a slide-show. Also, once in portrait view the resolution is  the
height of my native monitor resolution. Does anyone know of a way to set a
scaled view on the emulator? I would even settle for a scroll bar.




On Fri, Jan 28, 2011 at 2:04 AM, Anuj Ahooja anuj.aho...@gmail.com wrote:

 I've been messing around with the Honeycomb emulator and I can't get it to
 go into landscape mode. I'm switching the view by using Ctrl+F11, Ctrl+F12,
 Fn+7, Fn+9 and numerous combinations of those, but all that does is change
 the window size appropriately - the screen itself remains in portrait. So
 when it *should* be landscape, it just sits there in portrait mode sideways.
 I've messed with the settings and turned the auto-rotate on and off a few
 times and I even waited for a little while because it was running (really
 really really) slow, so I thought I had to give it a few minutes, but no
 changes.

 Anyone had this issue and/or a solution to 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.comandroid-developers%2bunsubscr...@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] No option to download the API documentation in the Android SDK and AVD Manager

2011-01-28 Thread Dinesh Bajaj


https://lh6.googleusercontent.com/_FfdEN7satfM/TUKOV6EcVJI/ABE/_sOSgfOpJic/Available%20Packages.png

https://lh4.googleusercontent.com/_FfdEN7satfM/TUKOLXx8KAI/AAc/l52IsJn72uo/Installed%20Packages.png
I want to store Android API documentation offline, however there is no 
option in the SDK manager to do this. Please see the images to verify this. 
Has Google stopped providing offline documentation for the SDK?

Thanks in advance for your response.

Regards,
Dinesh Bajaj


-- 
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] Import package does not work...

2011-01-28 Thread Marko Mijatovic
OK
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: High sensor usage in stand by

2011-01-28 Thread Alex Munteanu
The problem is that I see on the same phone (Samsung Galaxy S) the
situation when my application doesn't get listed in Batery Use with
high use (and it this case Sensor Usage of Spare Parts reports little
usage for my app) and the situation when it get's listed (and in this
case Sensor Usage of Spare Parts reports much higher usage).
So is on the same phone, but always after a reboot or USB unplug (so
if the Batery Use is reported low for my app then it will stay this as
long I don't reboot, recharge the phone, and vice-versa), I'm unable
to replicate this and  reading the Logcat I have observed this events,
listed as Error (E), so it might or not be something related.

I will do also an adb shell top once I get home, in my office I don't
have admin rigts on my computer.. :(

On Jan 27, 7:23 pm, ip332 iprile...@gmail.com wrote:
 D-le Alex, you should learn to read between the lines :)

 Here is a snapshot from a phone I had once:
   PID CPU% S  #THR     VSS     RSS PCY UID      Name
 2383  40% S     5   6340K    760K  fg compass  /system/bin/some
 sensor server
 3004  18% S    15 240340K  31352K  fg app_90   gpsstatus app from the
 market
 2941  16% R     9 224140K  22656K  bg app_87   my_top_secret_app_:)
 2465  10% S    64 336464K  62780K  fg system   system_server
 3033   1% R     1    844K    412K  fg root     top

 As you can see the system process eats 40% of the CPU which is way too
 much for sensor reading task.
 Now, I'm not sure if it was a production phone or a development device
 with root access - this is why the phone name is not disclosed.
 But it is an example of how bad the low level sensors stuff could be
 implemented. Most likely they poll data from the port instead of
 waiting for an event. I did sensors porting once and pretty much sure
 this task should not take such large amount of CPU.

 Now,  back to your case. List the top 10 CPU-eating processes and see
 if you have similar picture to the one above.
 If yes, then accept this as a feature of the phone and check on
 another one ;)

 On Jan 27, 8:38 am, Alex Munteanu alex.munte...@gmail.com wrote:



  Yes, is not there.

  On Jan 27, 6:23 pm, ip332 iprile...@gmail.com wrote:

   Did you check CPU usage using adb shell top ?

   On Jan 27, 2:42 am, Alex Munteanu alex.munte...@gmail.com wrote:

Similar 
to:http://groups.google.com/group/android-developers/browse_thread/threa..

Please help

On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote:

 I'm struggling to find the root cause of a problem that occurs
 apparently randomly in my application. I have a listener registered
 for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF broadcast
 I unregister the listener, and on Screen ON a register it again. From
 time to time, after phone reboot, or maybe unplug, while the most of
 the time the phone is in stand by I get a high sensor usage in phone
 information (along with high battery use associated with my app...) In
 logcat I find lines like this just before Screen OFF :

 01-26 18:02:52.891 E/SensorManager(13487): unregisterListener:
 alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor

 These are some kind of errors that shows that the Listener could not
 be unregistered ? If yes, why and what can I do ?- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -

-- 
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 add a text file as part of the apk

2011-01-28 Thread Reddy
Hi,

1. I have one txt file which contains some data.
2. Creating an app(apk) which uses (open, read, write, close) the txt
file.

What i want is, when i install the apk, txt file also need to be
installed in the target.
Can any one let me know is it possible. If yes please let me know the
procedure.

Regards,
Reddy

-- 
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] Honeycomb Emulator Landscape issue on Ubuntu 10.04

2011-01-28 Thread Kostya Vasilyev
You can scale the emulator by enabling scale to real size in the emulator
launch dialog. It's the only way to get the galaxy tab to fit, as well.

Being able to scroll would be nice too, but afaik, that's not possible.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
28.01.2011 12:41 пользователь Steve Gores-Todd sgorest...@gmail.com
написал:
 The solution can be found on the SKD preview page near the bottom.

 http://developer.android.com/sdk/preview/index.html

 Known issues

 The following known issues occur for Android 3.0 AVDs that are loaded in
 the emulator:

 - The emulator displays a rotated portrait screen while in landscape
 orientation. To view the screen correctly in landscape orientation, turn
off
 the auto-rotate setting in *Settings  Screen  Auto-rotate screen*.
 Then use Ctrl-F11 to rotate the emulator.
 - You cannot take screenshots of an emulator screen. The Device Screen
 Capture window displays *Screen not available*.
 - GPS emulation is currently not supported.
 - When rotating the emulator screen by pressing Ctrl-F11, the screen
 turns green momentarily, then displays the normal interface.
 - The Dev Tools application sometimes crashes when trying to use the
 Package Browser feature


 When they say the emulation is slow, they mean slow! On my Intel Q6600
Quad
 Core it is a slide-show. Also, once in portrait view the resolution is 
the
 height of my native monitor resolution. Does anyone know of a way to set a
 scaled view on the emulator? I would even settle for a scroll bar.




 On Fri, Jan 28, 2011 at 2:04 AM, Anuj Ahooja anuj.aho...@gmail.com
wrote:

 I've been messing around with the Honeycomb emulator and I can't get it
to
 go into landscape mode. I'm switching the view by using Ctrl+F11,
Ctrl+F12,
 Fn+7, Fn+9 and numerous combinations of those, but all that does is
change
 the window size appropriately - the screen itself remains in portrait. So
 when it *should* be landscape, it just sits there in portrait mode
sideways.
 I've messed with the settings and turned the auto-rotate on and off a few
 times and I even waited for a little while because it was running (really
 really really) slow, so I thought I had to give it a few minutes, but no
 changes.

 Anyone had this issue and/or a solution to 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.comandroid-developers%2bunsubscr...@googlegroups.com
android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@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: High sensor usage in stand by

2011-01-28 Thread Alex Munteanu
Now, my question that just popped up in my head is what's actualy
happening when my service receive the SCREEN_OFF event ?
I have a couple of things that are executed at this point (one of them
is unregister the Listener for Orientation Sensor), but how the
Android handle this ?
I mean, always these actions will get the change to comple until the
phone goes in standby ? because this will happens when the screen will
go off, unless the are some PARTIAL_WAKE_LOCKs held by other
applications.
Si it is possible that the Unregister Listener will not finish
properly (something is happening because my service's OnSensorChanged
event is not fired up anymore between SCREEN OFF and SCREEN ON)
because the system buts the phone in standby and the sensor usage will
occurs on my app ?
And this could explain why this occurs only sometimes, maybe sometimes
it happens that there is a PARTIAL_WAKE_LOCK that allows all the
actions to properly complete and sometimes there is not...
Just a theory...

On Jan 28, 11:45 am, Alex Munteanu alex.munte...@gmail.com wrote:
 The problem is that I see on the same phone (Samsung Galaxy S) the
 situation when my application doesn't get listed in Batery Use with
 high use (and it this case Sensor Usage of Spare Parts reports little
 usage for my app) and the situation when it get's listed (and in this
 case Sensor Usage of Spare Parts reports much higher usage).
 So is on the same phone, but always after a reboot or USB unplug (so
 if the Batery Use is reported low for my app then it will stay this as
 long I don't reboot, recharge the phone, and vice-versa), I'm unable
 to replicate this and  reading the Logcat I have observed this events,
 listed as Error (E), so it might or not be something related.

 I will do also an adb shell top once I get home, in my office I don't
 have admin rigts on my computer.. :(

 On Jan 27, 7:23 pm, ip332 iprile...@gmail.com wrote:



  D-le Alex, you should learn to read between the lines :)

  Here is a snapshot from a phone I had once:
    PID CPU% S  #THR     VSS     RSS PCY UID      Name
  2383  40% S     5   6340K    760K  fg compass  /system/bin/some
  sensor server
  3004  18% S    15 240340K  31352K  fg app_90   gpsstatus app from the
  market
  2941  16% R     9 224140K  22656K  bg app_87   my_top_secret_app_:)
  2465  10% S    64 336464K  62780K  fg system   system_server
  3033   1% R     1    844K    412K  fg root     top

  As you can see the system process eats 40% of the CPU which is way too
  much for sensor reading task.
  Now, I'm not sure if it was a production phone or a development device
  with root access - this is why the phone name is not disclosed.
  But it is an example of how bad the low level sensors stuff could be
  implemented. Most likely they poll data from the port instead of
  waiting for an event. I did sensors porting once and pretty much sure
  this task should not take such large amount of CPU.

  Now,  back to your case. List the top 10 CPU-eating processes and see
  if you have similar picture to the one above.
  If yes, then accept this as a feature of the phone and check on
  another one ;)

  On Jan 27, 8:38 am, Alex Munteanu alex.munte...@gmail.com wrote:

   Yes, is not there.

   On Jan 27, 6:23 pm, ip332 iprile...@gmail.com wrote:

Did you check CPU usage using adb shell top ?

On Jan 27, 2:42 am, Alex Munteanu alex.munte...@gmail.com wrote:

 Similar 
 to:http://groups.google.com/group/android-developers/browse_thread/threa..

 Please help

 On Jan 27, 11:12 am, Alex Munteanu alex.munte...@gmail.com wrote:

  I'm struggling to find the root cause of a problem that occurs
  apparently randomly in my application. I have a listener registered
  for SENSOR.TYPE_ORIENTATION in my service and on Screen OFF 
  broadcast
  I unregister the listener, and on Screen ON a register it again. 
  From
  time to time, after phone reboot, or maybe unplug, while the most of
  the time the phone is in stand by I get a high sensor usage in phone
  information (along with high battery use associated with my app...) 
  In
  logcat I find lines like this just before Screen OFF :

  01-26 18:02:52.891 E/SensorManager(13487): unregisterListener:
  alex.munteanu.SimpleService$2@48790020 MS-3C Orientation Sensor

  These are some kind of errors that shows that the Listener could not
  be unregistered ? If yes, why and what can I do ?- Hide quoted text 
  -

- Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -

-- 
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 SDK is so slow that is ridiculous.

2011-01-28 Thread sblantipodi
Other emulators works with natively speed, don't compare a 1GHz Cortex
or Snapdragon processor
with a modern desktop CPU please, its ridiculous.

@Raphael: Thanks for the answer, I appreciate your answer and hope to
see some fix soon :)

On Jan 28, 3:44 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Honestly, what do people expect?  You are trying to emulate a 1GHz
 computer on a 2GHz computer with a completely different architecture.
 I can't imagine it will ever be fast.  I used do MAME development and
 can tell you that it's hard to get the emulation running for even a 10
 year old system with a GPU.

 On Jan 28, 4:21 am, JAlexoid (Aleksandr Panzin) jalex...@gmail.com
 wrote:

  I have the same problem with all AVDs, regardless of the version.
  The emulator in general sucks in performance.

  I'm on 64 bit Ubuntu, bus same goes for Windows XP and Windows 7.

  On 27 янв, 03:58, Jake Basile jakerbas...@gmail.com wrote:

   I have a Core i7-920, 6GB of DDR-1333 RAM, and an ATI 5770. I get maybe 
   5-10
   FPS on the Honeycomb emulator. This thing needs serious performance 
   testing
   and improvement.- Hide quoted text -

  - Show quoted text -



-- 
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] waiting for debugger

2011-01-28 Thread ruspa
I set debuggable=false and commented
//android.os.Debug.waitForDebugger();
so that there are no ways my app should go in debug mode, but since
yesterday even if the phone is not usb connected my app is showing up
the popup waiting for debugger... [force close] at startup.
The licensing verification of this app of mine also FAILS on my
personal phone O__O, did someone experienced similar issues in these
days?

-- 
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: Waiting for debugger force close (when USB is not attached)

2011-01-28 Thread ruspa
same problem here, without touching by no means the setdebuggable
true/false parts of code, my apps starts and stucks waiting for a
inexistent debugger :( trying to soft reset now... I'm very worried)

On 9 Gen, 23:41, Dianne Hackborn hack...@android.com wrote:
 Did you select your app to be debugged in the Development app preferences?
  (Same place you can set animation speed etc.)  It is just that setting that
 causes an app to wait for a debugger (or being explicitly launched that way
 from adb like the dev tools do.)



 On Sun, Jan 9, 2011 at 2:06 PM, akay ak.kiet...@gmail.com wrote:
  Hi All,

  My app is in debuggable mode. On some occasions it crashes with the
  message:
  Waiting for debugger to attach...

  This happens when my Tmobile G2 is not attached to computer.
  When I plug inthe USB the message goes away.

  Does anyone come across this problem with their app?

  Regards,

  AK

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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] How to add a text file as part of the apk

2011-01-28 Thread Marcin Orlowski
On 28 January 2011 10:48, Reddy devireddy@gmail.com wrote:
 Hi,

 1. I have one txt file which contains some data.
 2. Creating an app(apk) which uses (open, read, write, close) the txt
 file.

 What i want is, when i install the apk, txt file also need to be
 installed in the target.

Use assets folder to include your file in APK

-- 
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] How to add a text file as part of the apk

2011-01-28 Thread Kumar Bibek
You canot write/change the txt file if you put it in the assets. So, on
first run of app, make a copy to SD card or the data directory, and then,
you can proceed.


Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Fri, Jan 28, 2011 at 3:59 PM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 On 28 January 2011 10:48, Reddy devireddy@gmail.com wrote:
  Hi,
 
  1. I have one txt file which contains some data.
  2. Creating an app(apk) which uses (open, read, write, close) the txt
  file.
 
  What i want is, when i install the apk, txt file also need to be
  installed in the target.

 Use assets folder to include your file in APK

 --
 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.comandroid-developers%2bunsubscr...@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: Confusion over MediaPlayer Framework on GingerBread and Apple's HTTP Live Streaming Support

2011-01-28 Thread Samuh
I tried same code on 3.0 Preview SDK and was unable to play Apple's
Test Stream.('http://devimages.apple.com/iphone/samples/bipbop/gear1/
prog_index.m3u8).

Following debug stmts were written to a trace file, however :
http://pastebin.com/kNXWYYhf

can please someone explain what went wrong there?

And can plz someone try this and confirm as to whethere HTTP live
streaming using m3u8 is possible or not?

-- 
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: Providing 2 differing interfaces to a remoteService

2011-01-28 Thread Dale Harvey
onBind only gets called once when the service is started, subsequent
bindServices reuse the same IBinder

This isnt particularly well documented, but confirmed after numerous
attempts to debug and
http://groups.google.com/group/android-developers/browse_thread/thread/d887a04a0b46c721/475755b074aa8a4e?show_docid=475755b074aa8a4e

On Jan 27, 7:49 pm, Mark Murphy mmur...@commonsware.com wrote:
 Use two different AIDL files and two different binders returned by
 onBind(). Use something in the Intent (e.g., custom action) to
 distinguish which one to return for a given bind request.



 On Wed, Jan 26, 2011 at 12:39 AM, Dale Harvey d...@arandomurl.com wrote:
  I have an application that provides a remoteService that is defined
  through an .aidl generated interface, this all works great, completely
  seperate applications just need to bundle the .aidl and they can
  control the service in a specific way

  However I want the sevice to provide an extra API when it is bound to
  the application that it ships with, which is an administrative
  interface.

  The administrative interface still needs to perform the usual
  bidirectional communication that remoteService lets me use but with
  additional calls in the api that arent provided to other packages

  Since the service and activity that starts it are in the same package
  I have tried various setups of singletons and static interfaces to no
  avail (there is state involved so a pure static interface isnt enough)
  however none of these have worked, I can get round it with various
  nasty ways through Application variables / talk through the filesystem
  however I was wondering if it was possible in a cleaner way.

  Thanks
  Dale Harvey

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

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

 Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

-- 
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] reset market license

2011-01-28 Thread ruspa
I got some issues with my market license key.. I've read about how LVL
check fails with ApiException 503 error for preventing dos
attacks..etc.. but now I'm getting this error on my own phone and
can't run or debug in no way the app.
How can I reset the market LVL timer or change my keys? I've been
waiting for a couple of minutes without requesting LVL validation but
keeps on going 503 error
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: reset market license

2011-01-28 Thread ruspa
there should be a way to kill the feature that detects this dos
attack, it's impossible to test effectively something without running
the piece of code dozens and dozens of times. If the market
verification fails after a couple of trials it's quite disappointing.
Plus, this 503 issue (ops should have I said feature) is poorly
documented, I found only instructions saying
try not to hit the market too often or you will start getting 503
errors, and it will take a while to reset
Wth it means? How much is exactly a while? I'm sick of waiting :(


On 28 Gen, 11:51, ruspa paolo.russ...@gmail.com wrote:
 I got some issues with my market license key.. I've read about how LVL
 check fails with ApiException 503 error for preventing dos
 attacks..etc.. but now I'm getting this error on my own phone and
 can't run or debug in no way the app.
 How can I reset the market LVL timer or change my keys? I've been
 waiting for a couple of minutes without requesting LVL validation but
 keeps on going 503 error
 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: Honeycomb browser broken?

2011-01-28 Thread James Pearce
Rumor is that all those screenshots in the media came from Google
themselves :-)

On Jan 27, 2:11 pm, H m...@howardb.com wrote:
 Is there anything we can do to try to help it..? I've even updated the
 shared_prefs for the browser to disable hardware_accel in the vain hope that
 might help but no difference.

 I'm guessing it must be something conflicting with the host machine as there
 are screenshots over the web of other people happily showing websites in the
 honeycomb browser.

-- 
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: Honeycomb browser broken?

2011-01-28 Thread H
Ordinarily I would probably believe you. But I saw this picture for a 
specific android website posted on their own site makes me think they 
definitely managed to get it to work:

http://images.androidcentral.com/sites/androidcentral.com/files/articleimage/684/2011/01/honeycomb-screens/thumb_550_honeycomb-screen-1a.png
http://images.androidcentral.com/sites/androidcentral.com/files/articleimage/684/2011/01/honeycomb-screens/thumb_550_honeycomb-screen-1a.png

-- 
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] Honeycomb SDK - TabHost issue

2011-01-28 Thread roundhill
Tried our app (WordPress for Android) on the Honeycomb preview, when
it gets to the point where it uses a TabHost the app crashes on
ViewRoot.draw()  Anyone else having problems with a tab layout in
Honeycomb?

-- 
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: Passing objects to new intents

2011-01-28 Thread maccoy
why not class implementes Serializable
myBundle.putSerializable(
and get the class back??
is there a performance issue?

On Dec 30 2010, 5:21 pm, TreKing treking...@gmail.com wrote:
 On Thu, Dec 30, 2010 at 3:36 AM, maomaostevencao 

 maomaosteven...@hotmail.com wrote:
  What you have said is the common way to pass arguments to an activity.

 Right.

  But my question is about how to pass an object of user defined class to an
  activity.

 Passing a user defined object to an Activity is not much different than
 passing, say, an int. Re-read this thread - that's exactly what was
 discussed.

  One guy said that it could be done by implementing some common functions
  for this activity and calling those functions to pass object to this
  activity, but how I can get the activity reference would be a problem.

 If you're referring to Neilz's post, the second part of that was that he
 uses static objects - no need to pass an Activity reference around. Each
 Activity, when active, would use itself to access the user-defined static
 objects.

 -
 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: Providing 2 differing interfaces to a remoteService

2011-01-28 Thread Kostya Vasilyev

Dale,

Here is a few ideas:

- A service-specific singleton *should* work, along the lines of setting 
a static to this in the service's onCreate or onBind and resetting to 
null in onDestroy.


- You could add a method in the primary AIDL interface that obtains the 
administration interface. The service's implementation of the primary 
AIDL interface would check who's calling the method (e.g. with 
getCallingUid) before returning either the administration interface or null.


- The above could probably be implemented by leveraging 
IBinder.queryLocalInterface.


- You could implement the management interface (which supposedly only 
has a few methods, like stop/getState/getOption/setOption) by means 
other than AIDL. For example, startService with specific intents, or 
custom command values for IBinder.transact().


- For the latter, IBinder defines a constant, LAST_CALL_TRANSACTION, as 
The last transaction code available for user commands, so it seems 
like it's a valid use case for IBinder.


-- Kostya

28.01.2011 13:44, Dale Harvey пишет:

onBind only gets called once when the service is started, subsequent
bindServices reuse the same IBinder

This isnt particularly well documented, but confirmed after numerous
attempts to debug and
http://groups.google.com/group/android-developers/browse_thread/thread/d887a04a0b46c721/475755b074aa8a4e?show_docid=475755b074aa8a4e

On Jan 27, 7:49 pm, Mark Murphymmur...@commonsware.com  wrote:

Use two different AIDL files and two different binders returned by
onBind(). Use something in the Intent (e.g., custom action) to
distinguish which one to return for a given bind request.



On Wed, Jan 26, 2011 at 12:39 AM, Dale Harveyd...@arandomurl.com  wrote:

I have an application that provides a remoteService that is defined
through an .aidl generated interface, this all works great, completely
seperate applications just need to bundle the .aidl and they can
control the service in a specific way
However I want the sevice to provide an extra API when it is bound to
the application that it ships with, which is an administrative
interface.
The administrative interface still needs to perform the usual
bidirectional communication that remoteService lets me use but with
additional calls in the api that arent provided to other packages
Since the service and activity that starts it are in the same package
I have tried various setups of singletons and static interfaces to no
avail (there is state involved so a pure static interface isnt enough)
however none of these have worked, I can get round it with various
nasty ways through Application variables / talk through the filesystem
however I was wondering if it was possible in a cleaner way.
Thanks
Dale Harvey
--
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

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

Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Tab layout problem

2011-01-28 Thread vnv
Hi,

I need to implement following layout


[search text]
[Tab1][Tab2][Tab3]
[   ]
[ Tab Content]
[   ]
[Button1]  [Button2]


My activity is already ListActivity so I cannot extend it to
TabActivity ?

I have [search text] and [button#] already positioned.

Idea whould be to have content searched in [serach text] and for
selected Tab# , specific search would be made.

Buttons could provide following actions with selected content.


Could anyone give a hint on this please?

Tnx.

-- 
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] java.net.SocketTimeoutException when downloading

2011-01-28 Thread kavitha b
Hi All,

I am developing a streaming player.I need to store streamed content.So I am
downloading streamed content.
But I am getting exception after 5 minutes when using Wifi.
W/System.err(12726): java.net.SocketTimeoutException
W/System.err(12726): at
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:564)
W/System.err(12726): at
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:88)
W/System.err(12726): at
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:67)
W/System.err(12726): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl$LocalCloseInputStream.read(HttpURLConnectionImpl.java:167)
W/System.err(12726): at
com.permeative.gradio.controller.SteamingPlayer1.downloadAudioIncrement(SteamingPlayer1.java:193)
W/System.err(12726): at
com.permeative.gradio.controller.SteamingPlayer1$1.run(SteamingPlayer1.java:118)



 My code is:

public void downloadAudioIncrement(final String mediaUrl) throws IOException
{
final String TAG = downloadAudioIncrement;
try{

URL url = new URL(mediaUrl);


HttpURLConnection connection = null;
connection = (HttpURLConnection) url.openConnection();

connection.setReadTimeout(1000 * 20);
connection.setConnectTimeout(1000 * 5);
connection.setDoInput(true);
connection.setUseCaches(false);
connection.setRequestProperty(Connection, Keep-Alive);
connection.connect();

stream = connection.getInputStream();
if (stream == null) {
Log.e(TAG, Unable to create InputStream for mediaUrl: 
+ mediaUrl);


}

Log.i(TAG, File name:  + downloadingMediaFile);
BufferedOutputStream bout = new BufferedOutputStream (
new FileOutputStream(downloadingMediaFile), 32 * 1024 );
byte buf[] = new byte[16 * 1024];
int totalBytesRead = 0, incrementalBytesRead = 0;
boolean stop = false;
do {
if (bout == null) {
counter++;
Log.i(TAG, FileOutputStream is null, Create new
one:  + DOWNFILE + counter);
downloadingMediaFile = new
File(context.getCacheDir(),DOWNFILE + counter);
bout = new BufferedOutputStream ( new
FileOutputStream(downloadingMediaFile) );
}

int numread = stream.read(buf);


if (numread = 0) {
System.out.println(NUMREAD LESS,SO ONCE
AGAIN**);
if(stream != null){
System.out.println(BAD STREAMING,SO TRYING ONCE
AGAIN);
startStreaming(mediaUrl,64);
}
if(stream == null)
break;

} else {
//Log.v(TAG, write to file);
  //  bout.write(buf, 0, numread);

totalBytesRead += numread;
incrementalBytesRead += numread;
totalKbRead = totalBytesRead/1000;
System.out.println( totalKbRead);
System.out.println(DateUtils.now(h:mm a));

}



if ( totalKbRead = INTIAL_KB_BUFFER  ! stop) {
Log.v(TAG, Reached Buffer amount we want:  +
totalKbRead:  + totalKbRead +  INTIAL_KB_BUFFER:  + INTIAL_KB_BUFFER);
bout.flush();
bout.close();

bout = null;
if(counter == 1)
 updateText();
  //  radioDumpStorer.insertMedia(downloadingMediaFile);
 //   radioPlayer.pushFiles(downloadingMediaFile);
int kbread=incrementalBytesRead/1000;
 //
updateInterface.currentDownloadCount(counter,  kbread);
 //updateShift();

 //   setupplayer(downloadingMediaFile);
totalBytesRead = 0;

}

} while (true);

stream.close();
}catch(Exception e){
e.printStackTrace();


}

}

It is very urgent.

Please help.

Thanks
Kavitha

-- 
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] Two methods of dialogs button tuning. What the difference

2011-01-28 Thread Aevea
There is two methors to add buttons to AlertDialog
1. using AlertDialog.Builder and calling builder.setPositiveButton or
setNegativeButton
2. using AlertDialog dialog; dialog.setButton dialog.setButton2.
What the difference

By the way, if I inherit my class from Dialog should I override all
constructors, or only one

-- 
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: Passing objects to new intents

2011-01-28 Thread Kostya Vasilyev
Serializable has higher overhead than Android's similar built-in 
interface, Parcelable. Try using Parcelable if possible, and consider 
support for Java serialization a fall-back (for compatibility with 
legacy and library code).


-- Kostya

28.01.2011 14:44, maccoy пишет:

why not class implementes Serializable
myBundle.putSerializable(
and get the class back??
is there a performance issue?

On Dec 30 2010, 5:21 pm, TreKingtreking...@gmail.com  wrote:

On Thu, Dec 30, 2010 at 3:36 AM, maomaostevencao

maomaosteven...@hotmail.com  wrote:

What you have said is the common way to pass arguments to an activity.

Right.


But my question is about how to pass an object of user defined class to an
activity.

Passing a user defined object to an Activity is not much different than
passing, say, an int. Re-read this thread - that's exactly what was
discussed.


One guy said that it could be done by implementing some common functions
for this activity and calling those functions to pass object to this
activity, but how I can get the activity reference would be a problem.

If you're referring to Neilz's post, the second part of that was that he
uses static objects - no need to pass an Activity reference around. Each
Activity, when active, would use itself to access the user-defined static
objects.

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: openFileOutput, FileNotFoundException

2011-01-28 Thread Michael
On 27 Jan, 19:52, TreKing treking...@gmail.com wrote:
 You do not need external storage permission to save local data.

Any other permissions than can be the issue? I've tried reading some
documentation for the answer, but i can't find anything about internal
storage and permission.

-- 
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] How to add a text file as part of the apk

2011-01-28 Thread Marcin Orlowski
On 28 January 2011 11:34, Kumar Bibek coomar@gmail.com wrote:
 You canot write/change the txt file if you put it in the assets. So, on
 first run of app, make a copy to SD card or the data directory, and then,
 you can proceed.

I was writting mine in a hurry so I now see my post looks bit misleading.
I meant using assets to have .txt file in APK for distribution or reading
but write require copying it first as you cleared.

-- 
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: Providing 2 differing interfaces to a remoteService

2011-01-28 Thread Mark Murphy
On Fri, Jan 28, 2011 at 5:44 AM, Dale Harvey d...@arandomurl.com wrote:
 onBind only gets called once when the service is started, subsequent
 bindServices reuse the same IBinder

Set it up so the one AIDL has a superset of the methods of the other.
Then, only bind once.

Though it would be nice if you could bind more than once...

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

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

-- 
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] No option to download the API documentation in the Android SDK and AVD Manager

2011-01-28 Thread Mark Murphy
I have downloaded documentation on all my machines. Documentation for
Honeycomb shows up as an option in the SDK and AVD Manager on this
particular environment I am sitting at now.

Furthermore, there are no images for which we should verify this.

On Fri, Jan 28, 2011 at 4:39 AM, Dinesh Bajaj dinesh.bajaj...@gmail.comwrote:

 https://lh6.googleusercontent.com/_FfdEN7satfM/TUKOV6EcVJI/ABE/_sOSgfOpJic/Available%20Packages.png


 https://lh4.googleusercontent.com/_FfdEN7satfM/TUKOLXx8KAI/AAc/l52IsJn72uo/Installed%20Packages.png
 I want to store Android API documentation offline, however there is no
 option in the SDK manager to do this. Please see the images to verify this.
 Has Google stopped providing offline documentation for the SDK?

 Thanks in advance for your response.

 Regards,
 Dinesh Bajaj


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




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

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

-- 
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 change background of a widget

2011-01-28 Thread cellurl
That worked so easily, I didn't believe it at first!
Only the experts know the workarounds. Thanks Kostya!
-cellurl

On Dec 18 2010, 3:45 am, Kostya Vasilyev kmans...@gmail.com wrote:
 17.12.2010 23:03, cellurl пишет:

  More info. It says RemoteView doesnt have setImageResource().
  Q: Does that mean I am out of luck??
  -cellurl

 RemoteViewshas setImageViewResource.

 http://developer.android.com/reference/android/widget/RemoteViews.htm...,
 int)

 Put an ImageView into your RelativeLayout, size it to fit the entire
 layout, and it's as good as having abackgroundimage.

 Might want to also setbackground=@android:color/transparent for the
 relative layout, as an optimization.

 --
 Kostya Vasilyev -- WiFi Manager + prettywidget--http://kmansoft.wordpress.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


Re: [android-developers] Re: openFileOutput, FileNotFoundException

2011-01-28 Thread Kostya Vasilyev

Michael,

Your code (as posted) is correct. Just in verify, I just pasted in 
verbatim into my application and verified that it works (as it should).


Try removing and reinstalling the application, see if that helps.

Other than that - is this a Samsung Galaxy S with 2.2.1 firmware, by any 
chance?


-- Kostya

28.01.2011 15:45, Michael пишет:

On 27 Jan, 19:52, TreKingtreking...@gmail.com  wrote:

You do not need external storage permission to save local data.

Any other permissions than can be the issue? I've tried reading some
documentation for the answer, but i can't find anything about internal
storage and permission.




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Re: how to change background of a widget

2011-01-28 Thread Kostya Vasilyev

Cool!

28.01.2011 16:39, cellurl пишет:

That worked so easily, I didn't believe it at first!
Only the experts know the workarounds. Thanks Kostya!
-cellurl

On Dec 18 2010, 3:45 am, Kostya Vasilyevkmans...@gmail.com  wrote:

17.12.2010 23:03, cellurl пишет:


More info. It says RemoteView doesnt have setImageResource().
Q: Does that mean I am out of luck??
-cellurl

RemoteViewshas setImageViewResource.

http://developer.android.com/reference/android/widget/RemoteViews.htm...,
int)

Put an ImageView into your RelativeLayout, size it to fit the entire
layout, and it's as good as having abackgroundimage.

Might want to also setbackground=@android:color/transparent for the
relative layout, as an optimization.

--
Kostya Vasilyev -- WiFi Manager + prettywidget--http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] No option to download the API documentation in the Android SDK and AVD Manager

2011-01-28 Thread Dinesh Bajaj
Thanks for your response, Mark.

I too had earlier downloaded documentations for Android Platforms, but 
yesterday I had to uninstall the whole SDK package due a problem, and when I 
re-installed it, I saw that there was no option to download the 
documentation. I just ran  the SDK manager to check whether the option was 
available now, but it was not.

The images are not there as perhaps they have been removed by the group 
moderator. No problem as here are the links for the images:

Image 1 http://img835.imageshack.us/img835/5356/availablepackages.png,Image 
2http://img651.imageshack.us/img651/2015/installedpackages.png
(If images are not supposed to be included in the posting, then why the heck 
the option to insert the image has been made available)

As you can see from the images that the option to download the documenation 
for Android 3 preview is also available to me, but not the option to 
download the documentation for earlier platforms.

As an aside Mark, I would like to say thank you to you as among the 
resources that I am using to learn Android is also your book Beginning 
Android 2.

-- 
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: Is it possible to use official Android icons in paid apps?

2011-01-28 Thread Brill Pappin
Thats a good questions.

I know that even Google Engineers will suggest that if you want to use
the icons in the SDK that you make your own copy to bundle with the
app. Although based on what you've highlighted here thats not supposed
to happen.

However, at the same time all the source is license under the Apache
License, which would suggest that you can do that.

I'm not expert though, so if it's a concern for you, talk to your own
lawyer.

- Brill Pappin

On Jan 28, 4:06 am, Mariux mariu...@gmail.com wrote:
 Hello,

 is there some sort of prohibition to use official Android icons in
 paid apps?

 The Android SDK Terms of use reports this:

 3.3 Except to the extent required by applicable third party licenses,
 you may not copy (except for backup purposes), modify, adapt,
 redistribute, decompile, reverse engineer, disassemble, or create
 derivative works of the SDK or any part of the SDK. Except to the
 extent required by applicable third party licenses, you may not load
 any part of the SDK onto a mobile handset or any other hardware device
 except a personal computer, combine any part of the SDK with other
 software, or distribute any software or device incorporating a part of
 the SDK.

 3.6 Nothing in this License Agreement gives you a right to use any of
 Google's trade names, trademarks, service marks, logos, domain names,
 or other distinctive brand features.

 Icons should be considered part of the SDK or distinctive brand
 features?

 Thanks

 Mariux

-- 
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: Honeycomb browser broken?

2011-01-28 Thread Marcin Orlowski
On 28 January 2011 12:22, H m...@howardb.com wrote:

 Ordinarily I would probably believe you. But I saw this picture for a
 specific android website posted on their own site makes me think they
 definitely managed to get it to work:

 http://images.androidcentral.com/sites/androidcentral.com/files/articleimage/684/2011/01/honeycomb-screens/thumb_550_honeycomb-screen-1a.png


http://images.androidcentral.com/sites/androidcentral.com/files/articleimage/684/2011/01/honeycomb-screens/thumb_550_honeycomb-screen-1a.png


What make you 100% certain it's real screenshot and not hand-made image?

-- 
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] Honeycomb Preview SDK: HTTP Live Streaming support validation

2011-01-28 Thread Samuh
I have tried playing via MediaPlayer Apple's test stream:
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8

The emulator displayed just a black screen. A trace was written to the
logs which can also be found here: http://pastebin.com/kNXWYYhf

Questions:
1. Can someone please try this test stream on HoneyComb and post back
here whether they can get it to work?
2. Do we have to set up MediaPlayer in any other way to get this
streaming to work?


Note: This post is related to
http://groups.google.com/group/android-developers/browse_thread/thread/84f85f4643dd02f5/5b2b78a37885ba50#5b2b78a37885ba50

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: openFileOutput, FileNotFoundException

2011-01-28 Thread Michael
Thanks for the answer and for testing the code. I'm developing on
Eclipse - this is my first try on android developing and my java isn't
that good in the first place. I'm using a virtual andriod phone for
testing, but i can't even compile the code because of the error
message. I will try and reinstall Eclipe or another API and see if it
helps.

On 28 Jan, 14:40, Kostya Vasilyev kmans...@gmail.com wrote:
 Michael,

 Your code (as posted) is correct. Just in verify, I just pasted in
 verbatim into my application and verified that it works (as it should).

 Try removing and reinstalling the application, see if that helps.

 Other than that - is this a Samsung Galaxy S with 2.2.1 firmware, by any
 chance?

 -- Kostya

 28.01.2011 15:45, Michael пишет:

  On 27 Jan, 19:52, TreKingtreking...@gmail.com  wrote:
  You do not need external storage permission to save local data.
  Any other permissions than can be the issue? I've tried reading some
  documentation for the answer, but i can't find anything about internal
  storage and permission.

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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


Re: [android-developers] No option to download the API documentation in the Android SDK and AVD Manager

2011-01-28 Thread Kostya Vasilyev
Just checked on my computer - the only documentation package I get is 
Documentation for Android Honeycomb Preview SDK. The documentation for 
API 9 is no longer on the list.


So it's not just your computer - either it's deliberate and the 
Honeycomb docs include all the older stuff, or else this looks like an 
issue that needs fixing on the Google side.


-- Kostya

28.01.2011 16:46, Dinesh Bajaj ?:

Thanks for your response, Mark.

I too had earlier downloaded documentations for Android Platforms, but 
yesterday I had to uninstall the whole SDK package due a problem, and 
when I re-installed it, I saw that there was no option to download the 
documentation. I just ran  the SDK manager to check whether the option 
was available now, but it was not.


The images are not there as perhaps they have been removed by the 
group moderator. No problem as here are the links for the images:


Image 1 
http://img835.imageshack.us/img835/5356/availablepackages.png,Image 
2 http://img651.imageshack.us/img651/2015/installedpackages.png
(If images are not supposed to be included in the posting, then why 
the heck the option to insert the image has been made available)


As you can see from the images that the option to download the 
documenation for Android 3 preview is also available to me, but not 
the option to download the documentation for earlier platforms.


As an aside Mark, I would like to say thank you to you as among the 
resources that I am using to learn Android is also your book 
Beginning Android 2.

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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

Re: [android-developers] Re: openFileOutput, FileNotFoundException

2011-01-28 Thread Kostya Vasilyev

Ah!!! So you have a *compile* error!

Ok, try this:

String fil = test2;
String string = exempeltext;

FileOutputStream fos;

try {

fos = openFileOutput(fil, Context.MODE_PRIVATE);

fos.write(string.getBytes());
fos.close();
} catch (IOException x) {
   Log.i(TAG, Cannot open file:  + x.toString());
}

Eclipse (or any other Java compiler) checks exception signatures at 
compile time.


The compiler knows that openFileOutput *can* throw a 
FileNotFoundException, since it's declared like this:



public FileOutputStream openFileOutput(String name, int mode)
*throws FileNotFoundException*


It also knows that write() and close() *can* throw IOException.

Since onCreate says it does not throw any exceptions, the compiler flags 
this as an error, and suggests that you either:


1) catch any exceptions from the above methods, and don't let them 
propagate out of onCreate or


2) change the signature of onCreate to indicate that it, too, can throw 
exceptions (which is not really an option, because onCreate is an 
override of a method of Activity, and you can't add new exceptions when 
overriding methods).


Since exception handling is one of the fundamentals of Java, you should 
take some time to learn more about them. There are lots of articles and 
samples on the net, here is one (from 1998, and things haven't changed 
since then):


http://www.javaworld.com/jw-07-1998/jw-07-exceptions.html

-- Kostya

28.01.2011 16:58, Michael пишет:

Thanks for the answer and for testing the code. I'm developing on
Eclipse - this is my first try on android developing and my java isn't
that good in the first place. I'm using a virtual andriod phone for
testing, but i can't even compile the code because of the error
message. I will try and reinstall Eclipe or another API and see if it
helps.

On 28 Jan, 14:40, Kostya Vasilyevkmans...@gmail.com  wrote:

Michael,

Your code (as posted) is correct. Just in verify, I just pasted in
verbatim into my application and verified that it works (as it should).

Try removing and reinstalling the application, see if that helps.

Other than that - is this a Samsung Galaxy S with 2.2.1 firmware, by any
chance?

-- Kostya

28.01.2011 15:45, Michael пишет:


On 27 Jan, 19:52, TreKingtreking...@gmail.comwrote:

You do not need external storage permission to save local data.

Any other permissions than can be the issue? I've tried reading some
documentation for the answer, but i can't find anything about internal
storage and permission.

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: openFileOutput, FileNotFoundException

2011-01-28 Thread Michael
Thanks alot for the help Kostya. I'll definitely follow your advice
and learn som more about exceptions and debuggning.
/Micke

On 28 Jan, 15:12, Kostya Vasilyev kmans...@gmail.com wrote:
 Ah!!! So you have a *compile* error!

 Ok, try this:

          String fil = test2;
          String string = exempeltext;

          FileOutputStream fos;

          try {

              fos = openFileOutput(fil, Context.MODE_PRIVATE);

              fos.write(string.getBytes());
              fos.close();
          } catch (IOException x) {
                 Log.i(TAG, Cannot open file:  + x.toString());
          }

 Eclipse (or any other Java compiler) checks exception signatures at
 compile time.

 The compiler knows that openFileOutput *can* throw a
 FileNotFoundException, since it's declared like this:

  public FileOutputStream openFileOutput(String name, int mode)
  *throws FileNotFoundException*

 It also knows that write() and close() *can* throw IOException.

 Since onCreate says it does not throw any exceptions, the compiler flags
 this as an error, and suggests that you either:

 1) catch any exceptions from the above methods, and don't let them
 propagate out of onCreate or

 2) change the signature of onCreate to indicate that it, too, can throw
 exceptions (which is not really an option, because onCreate is an
 override of a method of Activity, and you can't add new exceptions when
 overriding methods).

 Since exception handling is one of the fundamentals of Java, you should
 take some time to learn more about them. There are lots of articles and
 samples on the net, here is one (from 1998, and things haven't changed
 since then):

 http://www.javaworld.com/jw-07-1998/jw-07-exceptions.html

 -- Kostya

 28.01.2011 16:58, Michael пишет:





  Thanks for the answer and for testing the code. I'm developing on
  Eclipse - this is my first try on android developing and my java isn't
  that good in the first place. I'm using a virtual andriod phone for
  testing, but i can't even compile the code because of the error
  message. I will try and reinstall Eclipe or another API and see if it
  helps.

  On 28 Jan, 14:40, Kostya Vasilyevkmans...@gmail.com  wrote:
  Michael,

  Your code (as posted) is correct. Just in verify, I just pasted in
  verbatim into my application and verified that it works (as it should).

  Try removing and reinstalling the application, see if that helps.

  Other than that - is this a Samsung Galaxy S with 2.2.1 firmware, by any
  chance?

  -- Kostya

  28.01.2011 15:45, Michael пишет:

  On 27 Jan, 19:52, TreKingtreking...@gmail.com    wrote:
  You do not need external storage permission to save local data.
  Any other permissions than can be the issue? I've tried reading some
  documentation for the answer, but i can't find anything about internal
  storage and permission.
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com- Dölj citerad text -

 - Visa citerad text -

-- 
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] Why is the GIT repository so slow lately?

2011-01-28 Thread niko20
Why is the GitWeb interface about 500% slower than it used to be?
Maybe from parsing such a huge database of GIT entries...?

-niko

-- 
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: Problem move to sd card

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 1:52 AM, a3g a3g.astur...@gmail.com wrote:

 Can you undestand me now?


Yes. Post the manifest section where you specify the install location.

-
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

[android-developers] showing map and a saving location

2011-01-28 Thread Atif Musaddaq
Hi,

I would like to show map of the current location along with a small form a
text field with a submit button. what exactly i want to do is:

to let user save his desired location, but with addition of that i would
like to show him on the map where he/she is.

Is it possible to do in a single activity ? any sample code, tutorial etc

-- 
Atif Musaddaq

-- 
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] Custom button border

2011-01-28 Thread Premier
Hello, i want to make a breadcrumb for my android app. In breadcrumb
on the left there is an imagebutton with arrow border. On the right
there is a text title. When user tap on imagebutton, application
performs specific task.

So, how i can create a button with arrow on border right?

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


[android-developers] Shell Console for Android

2011-01-28 Thread Abhyudai Shanker
Hi everyone,

I am trying to build a shell console for Android, much like a command prompt
in windows or any OS on the PC.

However I am unable to understand how to start with the process. I cant
really understand the underlying working which would be required to get the
console working.

If anyone has idea in this sector, please help me.

Thanks

Abhyudai

-- 
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] Shell Console for Android

2011-01-28 Thread Kostya Vasilyev

If you're doing this in Java, use ProcessBuilder:

http://developer.android.com/reference/java/lang/ProcessBuilder.html

-- Kostya

28.01.2011 18:05, Abhyudai Shanker пишет:

Hi everyone,

I am trying to build a shell console for Android, much like a command 
prompt in windows or any OS on the PC.


However I am unable to understand how to start with the process. I 
cant really understand the underlying working which would be required 
to get the console working.


If anyone has idea in this sector, please help me.

Thanks

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Android SDK is so slow that is ridiculous.

2011-01-28 Thread JAlexoid (Aleksandr Panzin)
I'm not complaining about the performance, since I know the problems
behind it.

But, with the inevitable performance problems maybe a simulated
environment(with x86 architecture) or a Android x86 VM would be a
better option(in performance).
Problems will probably arise with the optimisations of native code for
ARM architecture.

On 28 янв, 04:44, Zsolt Vasvari zvasv...@gmail.com wrote:
 Honestly, what do people expect?  You are trying to emulate a 1GHz
 computer on a 2GHz computer with a completely different architecture.
 I can't imagine it will ever be fast.  I used do MAME development and
 can tell you that it's hard to get the emulation running for even a 10
 year old system with a GPU.

 On Jan 28, 4:21 am, JAlexoid (Aleksandr Panzin) jalex...@gmail.com
 wrote:

  I have the same problem with all AVDs, regardless of the version.
  The emulator in general sucks in performance.

  I'm on 64 bit Ubuntu, bus same goes for Windows XP and Windows 7.

  On 27 янв, 03:58, Jake Basile jakerbas...@gmail.com wrote:

   I have a Core i7-920, 6GB of DDR-1333 RAM, and an ATI 5770. I get maybe 
   5-10
   FPS on the Honeycomb emulator. This thing needs serious performance 
   testing
   and improvement.- Hide quoted text -

  - Show quoted text -

-- 
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: NFC Secure Element

2011-01-28 Thread mtk
I added the code to set wired mode in
com_android_nfc_NativeNfcManager.cpp. I also added some additional
methods on NFcService so I can conveniently call it from my test
activity. For sending APDU commands in SWP mode, I use another
activity with TAG_DISCOVERED action in android manifest, (just like
the tag reader same program) and then use RawTagConnection to send
APDU bytes. Btw I think the SE is GP compliant! When I send the select
command with zero AID (Select ISD per GP, 00 a4 04 00 00) - it
promptly responds back with FCI template! So it looks like we can use
install apps into the SE, once we have the keys? Sorry I'm new to GP
so learning stuff as I go...

On Jan 27, 10:25 pm, nemik ne...@nemik.net wrote:
 mtk, very cool! So when you did that call directly (somewhere in init
 of the jni code?) you got it to detect? How are you sending APDU
 commands? Also, if I understand wired mode correctly, the tag is not
 emulated externally to other readers; it's only available internally
 using the NFC API?

 gusdgg, yes, I saw the secure elements using the
 getSecureElementList() and just doing logging with those and observing
 them using `adb logcat`. I think that is in one of the diffs I posted.
 It worked OK for me and I wasn't seeing any permission errors. Though
 I never even bothered to do it via reflection on the stock firmware
 since I figured it would just deny it. Your findings clearly confirm
 that.
 As for the SmartMX chip, maybe you're right. But I suppose it could
 also be built into the PN544 chip itself. I have no idea, I wasn't
 able to find any datasheets that talk about it and have no details on
 the NXP chips Samsung's been sourcing for the Nexus S.

 On Jan 21, 11:28 am, gusdgg gus...@gmail.com wrote:



  Nemik,

  Thanks for posting the diff's and great work! I'll patch the codebase
  and see what happen. In the meantime and coming back to your question
  about the Nexus S hardware containing a secure element like SmartMX,
  did you get the secure element list with the method
  getSecureElementList() in the patched version? I called this method
  (via reflection, no patched yet) but it gets the error message
  WRITE_SECURE_SETTINGS permission required

  As you may know, there are an excelent nexus s teardown 
  (http://www.ifixit.com/Teardown/Nexus-S-Teardown/4365/1) from iFixit. You'll
  see there, in the step 7 - 2nd picture, the NXP PN544NFCchip closely
  located to the UICC slot, but as far I can see there isn't any SmartMx
  chip in that picture, nor in the others.

  Regards,
  gusdgg

-- 
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: Data Transfer between Android Phone and PC

2011-01-28 Thread JAlexoid (Aleksandr Panzin)
http://download.oracle.com/javase/tutorial/networking/sockets/
http://www.oracle.com/technetwork/java/socket-140484.html
http://www.google.com/search?client=ubuntuchannel=fsq=java+sockets+tutorialie=utf-8oe=utf-8
These should help

On 28 янв, 01:33, Joseph bates josephbate...@gmail.com wrote:
 considering it. but i don;t know much about TCP/IP
 can you give me a link? (i dont wanna ask you for an brief intro as u
 may not have time)

 On Jan 24, 4:16 pm, JAlexoid (Aleksandr Panzin) jalex...@gmail.com
 wrote:

  What's wrong with TCP/IP?

  Other than that quick search for C# Bluetooth gives a lot 
  results.http://stackoverflow.com/questions/1057220/bluetooth-in-c-which-stack...

  On 23 янв, 03:43, Joseph bates josephbate...@gmail.com wrote:

   So, I'm in the early stages of developing an Android app that is
   supposed to transfer data between it and the PC (Windows Only for
   now). Not really files, but data. (I can't reveal what the app will be/
   do just yet. Sorry)
   Anyways, I am having trouble thinking of a way to complete data
   transfers. So far I've considered using Bluetooth, however I am having
   trouble finding Bluetooth api's for Windows that use Visual C# (the
   language im using). I was wondering if there was a way to do what
   Google did with chrome2phone. I believe they transfered data through a
   user's google account. If anyone has any other ideas, let me know!
   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: Problem releasing activities

2011-01-28 Thread JAlexoid (Aleksandr Panzin)
Try getting the phone memory filed up. So it starts GC'ing and killing
off processes to release the memory. Or try filling up the heap with
total garbage and trigger a GC.
If after that point you actually have the unused(or what you would
expect to become garbage) Activities and Views retained, then you have
a leak.

High mem usage does not mean that there is a leak, by itself.

And to have a low mem usage, you need to carefully create new objects
and hold on to them for a long time. That goes also for Strings,
resources and goes double for Bitmaps.

On 28 янв, 00:26, Joan Pujol joanpu...@gmail.com wrote:
 I've an application that has a service that updates some widgets and
 also has some normal foreground activities to let the user view some
 data.
 My problem is that I discovered [1] that my application consumes a lot
 of memory. That memory is mainly consumed by the activities, and the
 big problem is that I'm not been able to release the memory of the
 activities once they are started.

 I've look at various articles about memory leaks and I've tried to
 don't retain activity contexts.
 I've tried to put a finish() in onPause() of activity to try to force
 to release
 I've tried to analyze with MAT with dominator tree but it doesn't
 shows any class of my app as a dominator.
 Also I've tried to analyze one of the activities with MAT, but I don't
 see why memory is retained. Here is an extract of ingoing references
 to one of the activities:
 It seems that all of this references are from the view, or is one of
 them suspicious?

 Class
 Name
 | Shallow Heap | Retained Heap
 ---
 cat.joanpujol.eltemps.PredictionActivity @
 0x482b70e0                           |          192 |        16.304
 |- mContext android.widget.ToggleButton @
 0x48195bf8                            |          536 |         2.800
 |- mContext com.android.internal.policy.impl.PhoneWindow$DecorView @
 0x4819f4b8 |          368 |           696
 |- mContext com.android.internal.policy.impl.PhoneLayoutInflater @
 0x481a5dc0   |           32 |            56
 |- mContext com.android.internal.policy.impl.PhoneLayoutInflater @
 0x481a5e08   |           32 |            88
 |- [0] java.lang.Object[2] @
 0x481a5e30                                         |           24
 |            56
 |- mContext android.widget.ScrollView @
 0x481b3cc8                              |          384 |
 1.392
 |- mCallback, mContext com.android.internal.policy.impl.PhoneWindow @
 0x481c74c8|          176 |         2.320
 |- mContext android.widget.FrameLayout @
 0x481ce8a8                             |          328 |           648
 |- mContext android.widget.LinearLayout @
 0x481d66a0                            |          328 |         5.112
 |- referent java.lang.ref.WeakReference @
 0x481ef528                            |           24 |            24
 |- activity android.app.LocalActivityManager$LocalActivityRecord @
 0x48226cc0   |           48 |            48
 |- mOuterContext android.app.ContextImpl @
 0x4827ee48                           |          152 |           320
 |- mContext android.widget.ToggleButton @
 0x4828f3a0                            |          536 |         2.808
 |- mContext android.widget.TextView @
 0x48292838                                |          504 |
 3.880
 |- mContext android.widget.LinearLayout @
 0x4829b620                            |          328 |           584
 |- mContext android.widget.ToggleButton @
 0x482b54e0                            |          536 |         2.808
 |- mContext android.widget.ImageView @
 0x482ca830                               |          312 |
 720
 '- Total: 17
 entries
 |              |
 ---

 Some one can give me some ligth?
 I'm doing something bad?
 Any information or suggerence will be very apreciated.

 A lot of thanks in advance,

 [1]http://groups.google.com/group/android-developers/browse_thread/threa...

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

2011-01-28 Thread TreKing
On Thu, Jan 27, 2011 at 11:16 PM, tushar sahni tusharsahn...@gmail.comwrote:

 I will be greatly thankful to u for any contribution or coordination


Step 1 - Reread your own post.
Step 2  - Ask, does this make sense to anyone that knows nothing about my
project?.
Step 3 - Answer yourself, No, it doesn't.
Step 4 - Read this: http://www.catb.org/~esr/faqs/smart-questions.html
Step 5 - Try again.

-
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

[android-developers] Re: Vanishing apps in the Market with 2.2.2

2011-01-28 Thread jarkman
Yes, our apps are. And, based on our previous experience, we can't un-
copy-protect them without making their data unreadable. I suppose we
just have to wait for the Market folks to fix their database.

Richard


On Jan 27, 12:17 am, Peter Sinnott psinn...@gmail.com wrote:
 Sometimes new firmwares cause copy protected apps to disappear for a
 while.
 Are your apps copy protected?

 On Jan 25, 10:33 pm,jarkmanjark...@gmail.com wrote:







  We've had a number of complaints of our apps vanishing from theMarket
  with OTA updates over the last few days. And, lo and behold, when our
  Nexus One got 2.2.2 a day or so ago, it also lost our paid apps from
  theMarket.

  There are one or two other devs complaining of the same thing in 
  theMarketforums, but no comment from Google as yet. Anyone else seen
  it ? Any clues about what might be going on ?

  Thanks,

  Richard

-- 
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: Suggested Android Phone for Unity Game Development Testing?

2011-01-28 Thread JAlexoid (Aleksandr Panzin)
Get a Nexus One. Unity guys that ported their engine to Android were
using G1 originally and now Nexus One.

On 25 янв, 02:29, HV-Charley charles.holmes.pr...@gmail.com wrote:
 Hey everyone,

 I'm new to Android development and am looking to sort out what I
 should be getting as a development device for non-emulator testing
 purposes. Naturally, my goal would be to get a device that best
 represents the most common end-user device looking ahead to the next
 4-12 months when our first title(s) are likely to be released.

 Of course, there are a host of devices out there, and analyzing the
 direction of the market is entirely speculative. Nonetheless, I'm
 pretty much just looking to make the most informed choice I can and
 then will work around the other details.

 My limited research on phone penetration has been a bit inconclusive.
 Nonetheless, these were the components that I’ve been trying to take
 into account:

 --ARMv7 ENABLED--
 Given that we will be developing with Unity, it appears that I will
 need to get an ARMv7 enabled phone (per the post 
 below):http://forum.unity3d.com/threads/73598-Before-you-buy-Android-for-Uni

 --UNITY TESTED PHONES--
 Per Unity's site, they specifically cite a few phones that they have
 tested extensively. Ideally the target phone would be found among this
 list (presumably Unity was looking at market penetration as well)

 http://unity3d.com/unity/publishing/android
 Nexus One, Motorola Droid, Motorola Droid X, HTC Droid Incredible, HTC
 EVO 4G, Samsung Galaxy S

 --ANDROID PLATFORM VERSION--
 Unity requires 2.0+. Per the oft-referenced platform versions site:

 http://developer.android.com/resources/dashboard/platform-versions.html

 It looks like 2.2 is the current standard, and will likely persist
 given that there is a substantial foundation of users that are now
 working with that version.  So, naturally, it seems I’ll want a phone
 that is 2.2 enabled.

 --EXISTING PHONES--
 My business partners have a Motorola Droid X and HTC EVO 4G as their
 personal phones. While we’ll ultimately test on those devices, we’d
 like to have one phone entirely devoted to being a development device.

 I know that’s a fair amount of data, but I’d like to try and make the
 most informed decision I can given the circumstances. Still learning
 the ins and outs.

 Thanks in advance for any help/advice you may be able to provide!

-- 
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: Problem move to sd card

2011-01-28 Thread JAlexoid (Aleksandr Panzin)
I think, Copy protection disables Move to SD.

On 28 янв, 09:52, a3g a3g.astur...@gmail.com wrote:
 When I download my app from Android Market and I try to move to sd
 card, I can't move it because the button is disabled but If I run the
 app in my phone by usb I can move it, because the button is enabled.

 Can you undestand me now?

 On 27 ene, 20:09, TreKing treking...@gmail.com wrote:

  On Thu, Jan 27, 2011 at 12:59 PM, a3g a3g.astur...@gmail.com wrote:
   In Android Market I see the button disabled. Why?

  Where in the Android Market are you seeing this button?

  -
  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


[android-developers] How to convert a image into Base64

2011-01-28 Thread saex
Hi

Can someone tell me the code to transforma image (maximum of 200KB)
into Base64 ???

i need to know how to do it with android, because i have to add the
functionality to upload images to a remote server in my main app

i am searching in google but i can't find easy examples that i can
aford

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] How to convert a image into Base64

2011-01-28 Thread Kumar Bibek
There are a few Base64Encoders available. Search for them.

http://www.source-code.biz/base64coder/java/

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Fri, Jan 28, 2011 at 10:03 PM, saex elpablos...@gmail.com wrote:

 Hi

 Can someone tell me the code to transforma image (maximum of 200KB)
 into Base64 ???

 i need to know how to do it with android, because i have to add the
 functionality to upload images to a remote server in my main app

 i am searching in google but i can't find easy examples that i can
 aford

 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.comandroid-developers%2bunsubscr...@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: Is it possible to use official Android icons in paid apps?

2011-01-28 Thread Mariux
This is really hard to find out. There's no clear statement that SDK
components as platform images are effectively Open Source (under
Apache License).

There are a lot of paid apps that use, for example, Gingerbread icons
and drawables, even full apps ripped or reverse-engineered from
Gingerbread SDK platform.

So it can be done? Or are these apps violating Android Terms of Use?

Thanks

On 28 Gen, 14:52, Brill Pappin br...@pappin.ca wrote:
 Thats a good questions.

 I know that even Google Engineers will suggest that if you want to use
 the icons in the SDK that you make your own copy to bundle with the
 app. Although based on what you've highlighted here thats not supposed
 to happen.

 However, at the same time all the source is license under the Apache
 License, which would suggest that you can do that.

 I'm not expert though, so if it's a concern for you, talk to your own
 lawyer.

 - Brill Pappin

 On Jan 28, 4:06 am, Mariux mariu...@gmail.com wrote:







  Hello,

  is there some sort of prohibition to use official Android icons in
  paid apps?

  The Android SDK Terms of use reports this:

  3.3 Except to the extent required by applicable third party licenses,
  you may not copy (except for backup purposes), modify, adapt,
  redistribute, decompile, reverse engineer, disassemble, or create
  derivative works of the SDK or any part of the SDK. Except to the
  extent required by applicable third party licenses, you may not load
  any part of the SDK onto a mobile handset or any other hardware device
  except a personal computer, combine any part of the SDK with other
  software, or distribute any software or device incorporating a part of
  the SDK.

  3.6 Nothing in this License Agreement gives you a right to use any of
  Google's trade names, trademarks, service marks, logos, domain names,
  or other distinctive brand features.

  Icons should be considered part of the SDK or distinctive brand
  features?

  Thanks

  Mariux

-- 
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 convert a image into Base64 string?

2011-01-28 Thread saex
Hi

Can someone tell me the code to transforma image (maximum of 200KB)
into Base64 String???

i need to know how to do it with android, because i have to add the
functionality to upload images to a remote server in my main app
putting them into a ROW of the database, as a string.

i am searching in google and in StackOverflow but i can't find easy
examples that i can afford. And also i find some examples but they are
not talking about to transform into String... and i need to transform
into string to upload by JSON to my remote server.

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: How to convert a image into Base64 string?

2011-01-28 Thread Hari Edo

This kind of question seems more like a school homework
assignment, but in case the question is practical, here goes.

What Base64 is:

  http://en.wikipedia.org/wiki/Base64

This article gives plenty of examples and details that someone
can write their own fully-tested implementation in an hour.

But in twenty seconds of using Google, I tried the search string
of base64 encode in java and got tons of hits.  The third link
has a fully-tested implementation (based on the same Wikipedia
example data and algorithms).

  http://www.wikihow.com/Encode-a-String-to-Base64-With-Java

Now, it's not good form to just copy code without asking, but
since this is a How-To article published on the web, I don't
think you'll run into copyright issues if you adapt their code
into your application.  There's good discussion in the article
about how the code works, and advice on learning to program.

However, this question is even sillier than that.  The
Android platform even includes a class called Base64 which
does all the encoding and decoding for you.  Without
worrying about incompatibility, testing, or license issues!

  http://developer.android.com/reference/android/util/Base64.html

That class even has an .encodeToString() method that turns
your arbitrary byte[] data into a String ready for use in
sqlite TEXT fields.

Beyond that, I'm really not sure what the actual problem is.

I'm not trying to be rude, but it's depressing when people
ask questions that are so quickly answered with even the
most cursory search first.

On Jan 28, 11:40 am, saex elpablos...@gmail.com wrote:
 Hi

 Can someone tell me the code to transforma image (maximum of 200KB)
 into Base64 String???

 i need to know how to do it with android, because i have to add the
 functionality to upload images to a remote server in my main app
 putting them into a ROW of the database, as a string.

 i am searching in google and in StackOverflow but i can't find easy
 examples that i can afford. And also i find some examples but they are
 not talking about to transform into String... and i need to transform
 into string to upload by JSON to my remote server.

 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: How to convert a image into Base64 string?

2011-01-28 Thread Hari Edo

Perhaps the actual question is how to get a byte[] for a given
Bitmap or vice versa.  This is, indeed, Android-specific and not
as obvious as the Base64 part of your question.

However, again, with a couple minutes of Google use, I found
this snippet:

 // have Bitmap bitmap from somewhere
 ByteArrayOutputStream bos = new ByteArrayOutputStream();
 bitmap.compress(CompressFormat.JPEG,100,bos);
 byte[] array = bos.toByteArray();
 // now have byte[] array to use, e.g., base64 encode

And then on the decompression side,

 // have byte[] array from somewhere, e.g., base64 decode
 Bitmap bitmap =
BitmapFactory.decodeByteArray(array, 0, array.length);
 // now have Bitmap bitmap to use, e.g., to make a drawable



On Jan 28, 11:40 am, saex elpablos...@gmail.com wrote:
 Hi

 Can someone tell me the code to transforma image (maximum of 200KB)
 into Base64 String???

 i need to know how to do it with android, because i have to add the
 functionality to upload images to a remote server in my main app
 putting them into a ROW of the database, as a string.

 i am searching in google and in StackOverflow but i can't find easy
 examples that i can afford. And also i find some examples but they are
 not talking about to transform into String... and i need to transform
 into string to upload by JSON to my remote server.

 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] Re: How to convert a image into Base64 string?

2011-01-28 Thread Kostya Vasilyev
This class (as well as Base64OutputStream) is only available starting 
with API level 8, which may not work for all applications.


-- Kostya

28.01.2011 19:56, Hari Edo пишет:

However, this question is even sillier than that.  The
Android platform even includes a class called Base64 which
does all the encoding and decoding for you.  Without
worrying about incompatibility, testing, or license issues!

   http://developer.android.com/reference/android/util/Base64.html

That class even has an .encodeToString() method that turns
your arbitrary byte[] data into a String ready for use in
sqlite TEXT fields.



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Honeycomb SDK - TabHost issue

2011-01-28 Thread Romain Guy
Hi,

Could you please post your stack trace? We've made extensive changes to the
rendering system in Android 3.0 and I want to make sure we catch any issue
we might have missed. Note that the preview SDK is not a final version and
that we are still actively fixing bugs, so we might already have resolved
this particular issue.

Thanks,

On Fri, Jan 28, 2011 at 3:38 AM, roundhill danroundh...@gmail.com wrote:

 Tried our app (WordPress for Android) on the Honeycomb preview, when
 it gets to the point where it uses a TabHost the app crashes on
 ViewRoot.draw()  Anyone else having problems with a tab layout in
 Honeycomb?

 --
 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.comandroid-developers%2bunsubscr...@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

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them

-- 
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] Table row content disappearing on rotate

2011-01-28 Thread FractalBob
Hi,

I have an app that includes two TableLayouts whose rows are filled in 
dynamically. Whenever I rotate the device, the rows are cleared for both 
tables. This only happens with the tables, not with other views, like 
TextViews. The relevant XML and Java code are as follows:

*play.xml:*

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent 

TextView android:id=@+id/new_guess_label
android:layout_alignParentLeft=true
android:layout_below=@id/my_secret_word_text
android:textStyle=bold
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/new_guess/
 EditText android:id=@+id/new_guess_text
android:layout_toRightOf=@id/new_guess_label
android:layout_below=@id/my_secret_word_text
android:singleLine=true
android:capitalize=none
android:maxLength=5
android:maxEms=5
android:layout_width=100dp
android:layout_height=wrap_content/
TextView android:id=@+id/your_guesses
android:text=@string/your_guesses
android:layout_alignParentLeft=true
android:layout_below=@id/new_guess_text
android:layout_width=wrap_content
android:textColor=#00ff00
android:layout_height=wrap_content /

TextView android:id=@+id/their_guesses
android:text=@string/their_guesses
android:layout_below=@id/new_guess_text
android:layout_alignParentRight=true
android:textColor=#ff
android:layout_width=wrap_content
android:layout_height=wrap_content /

ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/my_scroller
android:layout_alignParentLeft=true
android:layout_below=@id/your_guesses
android:layout_width=wrap_content
android:layout_height=180dp 

TableLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/my_guesses
android:layout_alignParentLeft=true
android:layout_below=@id/your_guesses
android:lines=4
android:keepScreenOn=true
android:layout_width=wrap_content
android:layout_height=wrap_content
android:background=#ff
android:shrinkColumns=*
/TableLayout

   /ScrollView

ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/his_scroller
android:layout_alignParentRight=true
android:layout_below=@id/their_guesses
android:layout_width=wrap_content
android:layout_height=180dp 
TableLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/his_guesses
android:layout_alignParentRight=true
android:layout_below=@id/their_guesses
android:lines=4
android:keepScreenOn=true
android:layout_width=wrap_content
android:layout_height=wrap_content
android:background=#ff
android:shrinkColumns=*

/TableLayout
/ScrollView
/RelativeLayout

*PlayActivity.java: *

@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); 
setContentView(R.layout.play); 
.
.
.
my_guesses = (TableLayout) findViewById(R.id.my_guesses); 
.
.
.
tr = new TableRow(context); tr.setLayoutParams(new LayoutParams( 
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); word_view = new 
TextView(context); word_view.setTextColor(Color.BLACK); 
word_view.setText(guess); tr.addView(word_view); count_view = new 
TextView(context); count_view.setTextColor(Color.BLACK); 
count_view.setText(String.valueOf(match_count)); tr.addView(count_view); 
my_guesses.addView(tr, new TableLayout.LayoutParams( 
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

Any ideas would be appreciated.

Bob

-- 
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] Table row content disappearing on rotate

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 11:31 AM, FractalBob ruom...@gmail.com wrote:

 Any ideas would be appreciated.


http://developer.android.com/guide/topics/fundamentals.html#actlife

-
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] Play Wav file with dynamic path

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 12:47 AM, Amit Mangal
forum.amit.man...@gmail.comwrote:

 i want to decide at run time which file need to play. i have file name in
 string.

 how to get the path of the file and using which api i can play that file.


http://developer.android.com/reference/android/content/res/Resources.html#getIdentifier(java.lang.String,
java.lang.String, java.lang.String)

-
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] Stop installation of package

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 1:56 AM, rashmi rashmi@gmail.com wrote:

 Can I stop the installation of package?. Please let me know if any
 observer is there for installation of package to get to know about the
 status of installation and how can I stop/cancel the installation.


Don't think so. You can get alerted when a package is installed but can't
stop it, AFAIK.

-
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

[android-developers] Getting NullPointer Exception while inserting into database!!!

2011-01-28 Thread Pink
Hi,

   I am trying to insert data my content provider.

   But getting NullPointer exception, though every thing is seems ok.

   I checked evry thing in code. But got no clue.

  I have been getting irritated.

  I am getting following Exception.

  /AndroidRuntime( 3077): Caused by: java.lang.NullPointerException

E/AndroidRuntime( 3077):at
android.os.Parcel.readException(Parcel.java:1266)

E/AndroidRuntime( 3077):at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
160)

E/AndroidRuntime( 3077):at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
114)

E/AndroidRuntime( 3077):at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:
408)

E/AndroidRuntime( 3077):at
android.content.ContentResolver.insert(ContentResolver.java:587)

  Any help ???

-- 
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] Communicating with the browser

2011-01-28 Thread kypriakos

Hi all,

if I run a client (any kind of a client, let's say javascript) on the
native
browser which access a remote web server and retrieves a page
I can theoritically intercept that request and have a local agent
return to the browser (on the socket that it was writing to) a
response
using standard HTTP headers in test. Yes? I can easily do that
with many browsers (Firefox, IE, Safari etc.). Does anyone know as
to why I cannot do this in Android and its native browser? I have been
trying to go over the com.android.browser and the commons HTTP
libs from the source but are not too easy to follow. Any suggestions
would be greatly appreciated.

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] TextView - how to make appended text visible?

2011-01-28 Thread John Lussmyer
I have a TextView that frequently has text appended from a service.
I can append the text just fine, but how do I make the TextView scroll so
the newly appended text is visible?
Once the view fills, the new text is below the bottom edge.

-- 
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] Getting NullPointer Exception while inserting into database!!!

2011-01-28 Thread Kumar Bibek
You are using Parcel? There might be something wrong there.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Fri, Jan 28, 2011 at 11:16 PM, Pink sivareddy.j...@gmail.com wrote:

 Hi,

   I am trying to insert data my content provider.

   But getting NullPointer exception, though every thing is seems ok.

   I checked evry thing in code. But got no clue.

  I have been getting irritated.

  I am getting following Exception.

  /AndroidRuntime( 3077): Caused by: java.lang.NullPointerException

 E/AndroidRuntime( 3077):at
 android.os.Parcel.readException(Parcel.java:1266)

 E/AndroidRuntime( 3077):at
 android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
 160)

 E/AndroidRuntime( 3077):at
 android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
 114)

 E/AndroidRuntime( 3077):at
 android.content.ContentProviderProxy.insert(ContentProviderNative.java:
 408)

 E/AndroidRuntime( 3077):at
 android.content.ContentResolver.insert(ContentResolver.java:587)

  Any help ???

 --
 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.comandroid-developers%2bunsubscr...@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] Table row content disappearing on rotate

2011-01-28 Thread FractalBob
Thanks for the link. I read it but I couldn't see the relevance. Does device 
rotation require that the activity state, including the entire row data, be 
saved by the app?

-- 
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] Table row content disappearing on rotate

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 11:55 AM, FractalBob ruom...@gmail.com wrote:

 Thanks for the link. I read it but I couldn't see the relevance. Does
 device rotation require that the activity state, including the entire row
 data, be saved by the app?


If you are populating it dynamically, as you indicated, then yes.

Remember, rotating the device causes a change in configuration which cause
the system to kill and restart your app. Built-In views will normally retain
their state, but other changes you've made dynamically are your
responsibility.

-
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] Table row content disappearing on rotate

2011-01-28 Thread Kostya Vasilyev

28.01.2011 20:58, TreKing пишет:


Remember, rotating the device causes a change in configuration which 
cause the system to kill and restart your app. Built-In views will 
normally retain their state, but other changes you've made dynamically 
are your responsibility.


They cause Android to destroy and recreate the Activity. The app 
(meaning the process) keeps running.


There are callbacks for passing any dynamically created data from the 
old instance to the new instance of the activity:


http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html

--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] is it possible to override 9 patch pngs?

2011-01-28 Thread kernelpanic
specifically, I am trying to change the 9 patch image used for
btn_dropdown_normal.9.png

anyone know how to override the stock 9 patch images without rooting
the device or other silly ideas?

I was hoping that selection of a 9 patch image file would cascade
through from my project's drawable-mdpi to drawable to the platform
default such that if I put that image in my project's drawable or
drawable-mdpi, it would be used instead.

so far I have had no success - any ideas welcome

-- 
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 change the background color of ToggleButton?

2011-01-28 Thread Roger Podacter
I was interested in doing something like this as well. My app has 6
toggle buttons in a row on one line, and it doesn't quite fit on
portrait screen. I wanted to make a custom toggle button, color,
width, etc.

You could also make your own state-list drawable I think It's called.
Anyway in the source of the s d k I think you can find the toggle
button and then edit it, not sure though.

On Jan 27, 7:08 pm, TreKing treking...@gmail.com wrote:
 On Tue, Jan 25, 2011 at 10:43 PM, Eric Chow eric...@gmail.com wrote:
  How can I change the background color of a ToggleButton?

 Go to the documentation, find the entry for ToggleButton, then start
 reading. There-in lies the answer.

 --- 
 --
 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] Table row content disappearing on rotate

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 12:04 PM, Kostya Vasilyev kmans...@gmail.comwrote:

 They cause Android to destroy and recreate the Activity. The app (meaning
 the process) keeps running.


Yeah, sorry, by app I meant what you're currently running / seeing on the
screen (meaning the activity). Good distinction.

-
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] is it possible to override 9 patch pngs?

2011-01-28 Thread Kostya Vasilyev
You can copy the platform defaults into your project, edit them as you 
like, and use with buttons by setting android:background. This would 
affect your own application.


As for changing an Android resource so it affects other apps - sorry, no.

-- Kostya

28.01.2011 21:07, kernelpanic пишет:

specifically, I am trying to change the 9 patch image used for
btn_dropdown_normal.9.png

anyone know how to override the stock 9 patch images without rooting
the device or other silly ideas?

I was hoping that selection of a 9 patch image file would cascade
through from my project's drawable-mdpi to drawable to the platform
default such that if I put that image in my project's drawable or
drawable-mdpi, it would be used instead.

so far I have had no success - any ideas welcome




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Getting NullPointer Exception while inserting into database!!!

2011-01-28 Thread H
It may be PArcel, but unlikely - the contentprovidernative code uses Parcels 
to return errors/messages from/to the contentprovider.

Can you post the code in your contentprovider for the insert() method..?

-- 
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] Strange orange background color when custom 9 patch button is pressed...

2011-01-28 Thread Jarrette
I made a custom background for the buttons in my app.  Here is my 
btn_blue.xml markup

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_focused=true 
  android:state_pressed=false 
  android:drawable=@drawable/btn_blue_pressed /
item android:state_focused=true 
  android:state_pressed=true
  android:drawable=@drawable/btn_blue_pressed /
item android:state_focused=false 
  android:state_pressed=true
android:drawable=@drawable/btn_blue_pressed /
item android:drawable=@drawable/btn_blue_normal /
/selector

Everything seems to work fine - except for one thing.  When I press the 
button, my pressed image appears, however behind the image, is an orange 
background color
Does anyone know how to get rid of this?  


-- 
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: is it possible to override 9 patch pngs?

2011-01-28 Thread kernelpanic
ok, let me clarify that I only want to affect my app. I created a
spinner with an image and text, and the drop down arrow gets stretched
in the middle - and it looks kinda like this guy's here

http://androidforbeginners.blogspot.com/2010/10/spinner-down-arrow-stretching.html

i just want to change it (for my app) such that it stretches above and
below the arrow.

On Jan 28, 12:11 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You can copy the platform defaults into your project, edit them as you
 like, and use with buttons by setting android:background. This would
 affect your own application.

 As for changing an Android resource so it affects other apps - sorry, no.

 -- Kostya

 28.01.2011 21:07, kernelpanic пишет:

  specifically, I am trying to change the 9 patch image used for
  btn_dropdown_normal.9.png

  anyone know how to override the stock 9 patch images without rooting
  the device or other silly ideas?

  I was hoping that selection of a 9 patch image file would cascade
  through from my project's drawable-mdpi to drawable to the platform
  default such that if I put that image in my project's drawable or
  drawable-mdpi, it would be used instead.

  so far I have had no success - any ideas welcome

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: How to convert a image into Base64 string?

2011-01-28 Thread H
If you do need to convert a byte[] to base64 and back again, the android LVL 
has a utility class called Base64 which does exactly that. It is completely 
standalone and has no imports whatsoever, so it should work fine with any 
version of Android.

-- 
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: How to change the background color of ToggleButton?

2011-01-28 Thread Kostya Vasilyev
If you only want to change the way a ToggleButton looks (not behaves), 
you can replace the background from XML with your own.


Note that ToggleButton uses a layer-list drawable to overlay the toggle 
state over the standard button background, to reduce the number of 
needed images.


You can find the resource in data directory inside the 
platforms\platform-API version\data\res folder on your computer.


-- Kostya

28.01.2011 21:08, Roger Podacter пишет:

I was interested in doing something like this as well. My app has 6
toggle buttons in a row on one line, and it doesn't quite fit on
portrait screen. I wanted to make a custom toggle button, color,
width, etc.

You could also make your own state-list drawable I think It's called.
Anyway in the source of the s d k I think you can find the toggle
button and then edit it, not sure though.

On Jan 27, 7:08 pm, TreKingtreking...@gmail.com  wrote:

On Tue, Jan 25, 2011 at 10:43 PM, Eric Choweric...@gmail.com  wrote:

How can I change the background color of a ToggleButton?

Go to the documentation, find the entry for ToggleButton, then start
reading. There-in lies the answer.

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Re: Honeycomb browser broken?

2011-01-28 Thread H
I guess I'm just a glass half full kind of guy and presumed they wouldn't 
goto all that effort. If they did have to because the browser was broken 
then surely they would have made at least a throwaway comment in the blog 
about the flaky browser as well. But they made no mention at all. So I 
assume it works for them... :-)

Maybe we should be asking: Does anyone out there have a *working* browser in 
their honeycomb emulator..? And by working, I mean you can browse to at 
least one website without it crashing and closing.

-- 
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] Detect Default Camera Directory

2011-01-28 Thread joshbeck
Hello:

I have an app that uses this standard code to get a list of pictures
stored on the phone:
(It seems to only works when the device in question utilizes /DCIM/
camera) --Many use different folders for default picture storage.


--My question: What might be the best way to detect what the default
camera storage directory is:
(I considered getting a directory list and having the code iterate
through what it finds.)
Is there a way to retrieve it exactly?


public static final String CAMERA_IMAGE_BUCKET_NAME =
Environment.getExternalStorageDirectory().toString()
+ /DCIM/Camera;

//BEGIN CODE
final String[] projection = { MediaStore.Images.Media.DATA };
final String selection = MediaStore.Images.Media.BUCKET_ID 
+ 
= ?;
final String[] selectionArgs = { CAMERA_IMAGE_BUCKET_ID };
final Cursor cursor =
context.getContentResolver().query(Images.Media.EXTERNAL_CONTENT_URI,
projection,
selection,
selectionArgs,
null);
ArrayListString result = new
ArrayListString(cursor.getCount());
if (cursor.moveToFirst()) {
final int dataColumn =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
do {
final String data = cursor.getString(dataColumn);
result.add(data);
} while (cursor.moveToNext());
}

cursor.close();
//END CODE


Thanks for any help,
Josh Beck

-- 
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] Table row content disappearing on rotate

2011-01-28 Thread FractalBob
Thanks, that puts me in the right direction!

-- 
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] Table row content disappearing on rotate

2011-01-28 Thread FractalBob
Thanks for the link, Kostya. 

Yeah, I understood that TreKing meant Activity, not the app process.

-- 
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: is it possible to override 9 patch pngs?

2011-01-28 Thread Kostya Vasilyev
You *could* copy the standard spinner image, edit it in Draw9Patch to 
add stretch areas in more proper places, but I wouldn't recommend this: 
if this image is replaced by the firmware, your application will not 
match the rest of the phone's UI. To be specific, the Motorola Droid X 
does this, as does the Samsung Galaxy S family, and maybe others.


I would try to fit whatever content you have on one line, using TextView 
singleLine=true, and a smaller image, or come up with a different way 
to show the current selection (a spinner that looks so different that 
the user won't know it's a spinner?)


-- Kostya

28.01.2011 21:15, kernelpanic пишет:

ok, let me clarify that I only want to affect my app. I created a
spinner with an image and text, and the drop down arrow gets stretched
in the middle - and it looks kinda like this guy's here

http://androidforbeginners.blogspot.com/2010/10/spinner-down-arrow-stretching.html

i just want to change it (for my app) such that it stretches above and
below the arrow.

On Jan 28, 12:11 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

You can copy the platform defaults into your project, edit them as you
like, and use with buttons by setting android:background. This would
affect your own application.

As for changing an Android resource so it affects other apps - sorry, no.

-- Kostya

28.01.2011 21:07, kernelpanic пишет:


specifically, I am trying to change the 9 patch image used for
btn_dropdown_normal.9.png
anyone know how to override the stock 9 patch images without rooting
the device or other silly ideas?
I was hoping that selection of a 9 patch image file would cascade
through from my project's drawable-mdpi to drawable to the platform
default such that if I put that image in my project's drawable or
drawable-mdpi, it would be used instead.
so far I have had no success - any ideas welcome

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: is it possible to override 9 patch pngs?

2011-01-28 Thread kernelpanic
yes you're right - thanks

I hadn't considered future proofing or customized implementations, but
it makes good sense.

mine doesn't look near as bad as the example I posted

http://test-icu.com/images/android/stretched-arrow.png

the icons I'm using are only 32x32 but I'll vamp them down so that
they don't force the stretching



On Jan 28, 12:27 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 You *could* copy the standard spinner image, edit it in Draw9Patch to
 add stretch areas in more proper places, but I wouldn't recommend this:
 if this image is replaced by the firmware, your application will not
 match the rest of the phone's UI. To be specific, the Motorola Droid X
 does this, as does the Samsung Galaxy S family, and maybe others.

 I would try to fit whatever content you have on one line, using TextView
 singleLine=true, and a smaller image, or come up with a different way
 to show the current selection (a spinner that looks so different that
 the user won't know it's a spinner?)

 -- Kostya

 28.01.2011 21:15, kernelpanic пишет:



  ok, let me clarify that I only want to affect my app. I created a
  spinner with an image and text, and the drop down arrow gets stretched
  in the middle - and it looks kinda like this guy's here

 http://androidforbeginners.blogspot.com/2010/10/spinner-down-arrow-st...

  i just want to change it (for my app) such that it stretches above and
  below the arrow.

  On Jan 28, 12:11 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  You can copy the platform defaults into your project, edit them as you
  like, and use with buttons by setting android:background. This would
  affect your own application.

  As for changing an Android resource so it affects other apps - sorry, no.

  -- Kostya

  28.01.2011 21:07, kernelpanic пишет:

  specifically, I am trying to change the 9 patch image used for
  btn_dropdown_normal.9.png
  anyone know how to override the stock 9 patch images without rooting
  the device or other silly ideas?
  I was hoping that selection of a 9 patch image file would cascade
  through from my project's drawable-mdpi to drawable to the platform
  default such that if I put that image in my project's drawable or
  drawable-mdpi, it would be used instead.
  so far I have had no success - any ideas welcome
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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


Re: [android-developers] Tab layout problem

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 5:55 AM, vnv nikola1...@gmail.com wrote:

 My activity is already ListActivity so I cannot extend it to TabActivity ?


You can make it a TabActivity and manage the ListViews within the Activity
yourself.
Otherwise your tab content section can be a ViewSwitcher or ViewFlipper that
swaps out on pressing the tab buttons.

-
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

[android-developers] Re: Retrieve tweets from my twitter account

2011-01-28 Thread gvenugopal
 Hi Albert, you said that, I have seen that there are
libraries to integrate your app with twitter and post messages, etc .
I stucked with posting the tweets from my music app while sharing. If
you have any sample codes or related web urls to post the tweets from
android application, can you please forward them to my mail.

thanks
venu


On Jan 17, 4:51 pm, Albert albert8...@googlemail.com wrote:
 Hi,

 I would like to retrieve tweets from my own account. I have seen that
 there are libraries to integrate your app with twitter and post
 messages, etc but all I want is to read from an account. Is that
 possible? and more importantly, is it easy to implement? :) can't
 really afford to spend a lot of time on this as it is just an idea.

 Thanks in advance for your help

 Alberto

-- 
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] Two methods of dialogs button tuning. What the difference

2011-01-28 Thread TreKing
On Fri, Jan 28, 2011 at 6:22 AM, Aevea zi...@mail.ru wrote:

 There is two methors to add buttons to AlertDialog
 1. using AlertDialog.Builder and calling builder.setPositiveButton
 or setNegativeButton
 2. using AlertDialog dialog; dialog.setButton dialog.setButton2.
 What the difference


Probably nothing.


 By the way, if I inherit my class from Dialog should I override
 all constructors, or only one


You should override the ones you need to use.

-
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

[android-developers] looking for 2d game developer in toronto/ontario

2011-01-28 Thread social hub
We are looking for 2d game developer for a small project(3 months) in
Toronto/Ontario region.

If you are interested please contact me

Thanks

Social

-- 
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: Retrieve tweets from my twitter account

2011-01-28 Thread gvenugopal
Hi Ali,  I stucked with posting the tweets from my android
application. If you know how to post the tweets can please guide me in
that way. or send me any useful codes or website urls.

thanks
venu

On Jan 18, 1:42 am, Muhammad Ali zaandr...@gmail.com wrote:
 Hi,
  You should use the twitter4j for this purpose. It is very easy to
 retrieve the tweets and all the information from the account.
 Regards,
 Ali Hassan

 On Jan 18, 2:51 am, Albert albert8...@googlemail.com wrote:

  Hi,

  I would like to retrieve tweets from my own account. I have seen that
  there are libraries to integrate your app with twitter and post
  messages, etc but all I want is to read from an account. Is that
  possible? and more importantly, is it easy to implement? :) can't
  really afford to spend a lot of time on this as it is just an idea.

  Thanks in advance for your help

  Alberto

-- 
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: Troubleshooting some memory leaks

2011-01-28 Thread TheRain
Thank you very much-  I did a lot more work on this after posting my
question here and I found this excellent guide on troubleshooting
Android memory leaks
http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

The MAT plugin for eclipse mentioned in that article is the kind of
tool I was looking for and really helped me sort out the problem I was
having.

In short, other than my Bitmap issues, which were solved by
doing .release() and set to null on any Bitmap when I'm done using
it...   our application had some leaks due to passing some objects by
hard reference through the Application instance.   The objects in
question had several Bitmap references, and using the MAT tool I was
able to see that this was linking all the way back to a List of
similar objects in a previous activity.  So GC was not collecting on a
lot of things because of that.   I solved it by doing a shallow copy
of the objects in the Activity they were passed to, and then nulling
out the reference in the application context.

I would have posted some relevant code in my original question, but
the application is pretty complicated and at the time I wrote my
question, I wasn't even sure what portions were relevant to my
problem ;)

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: Detect Default Camera Directory

2011-01-28 Thread joshbeck
Forgot to mention the CAMERA_IMAGE_BUCKET_ID string:

It is defined as:

public static final String CAMERA_IMAGE_BUCKET_ID =
getBucketId(CAMERA_IMAGE_BUCKET_NAME);



On Jan 28, 12:22 pm, joshbeck josh.beck2...@gmail.com wrote:
 Hello:

 I have an app that uses this standard code to get a list of pictures
 stored on the phone:
 (It seems to only works when the device in question utilizes /DCIM/
 camera) --Many use different folders for default picture storage.

 --My question: What might be the best way to detect what the default
 camera storage directory is:
 (I considered getting a directory list and having the code iterate
 through what it finds.)
 Is there a way to retrieve it exactly?

 public static final String CAMERA_IMAGE_BUCKET_NAME =
         Environment.getExternalStorageDirectory().toString()
         + /DCIM/Camera;

 //BEGIN CODE
 final String[] projection = { MediaStore.Images.Media.DATA };
                     final String selection = 
 MediaStore.Images.Media.BUCKET_ID + 
 = ?;
                     final String[] selectionArgs = { CAMERA_IMAGE_BUCKET_ID };
                     final Cursor cursor =
 context.getContentResolver().query(Images.Media.EXTERNAL_CONTENT_URI,
                             projection,
                             selection,
                             selectionArgs,
                             null);
                     ArrayListString result = new
 ArrayListString(cursor.getCount());
                     if (cursor.moveToFirst()) {
                         final int dataColumn =
 cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
                         do {
                             final String data = cursor.getString(dataColumn);
                             result.add(data);
                         } while (cursor.moveToNext());
                     }

                     cursor.close();
 //END CODE

 Thanks for any help,
 Josh Beck

-- 
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: Import package does not work...

2011-01-28 Thread Peruzzo
You have installed the Google APIs by Google Inc.?



On 27 jan, 09:32, Marko Mijatovic jom...@gmail.com wrote:
 Hi!

 I code android app that uses Google Maps. I added uses-library
 android:name=com.google.android.maps/ in manifest file, and when in java
 class try to import that package, I get: The import com.google cannot be
 resolved.
 What can I do to fix this?
 Thnx

-- 
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] Google Maps Broken

2011-01-28 Thread Nick Friederich
I'm developing an app that uses Google Maps, it was all working fine
until a few days ago until it seems that silently maps now shows only
X's. I have deleted my debug key generated a new one and used the new
fingerprint to register a new API key, to no avail.  I've even created
a new project and copied code over. 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] Excluding specific .xml files from being built by Android.mk

2011-01-28 Thread red
Hello,

I wish to be able to exclude a few named xml files from being included
in the resulting .apk file.  Specifically, the Makefile I *think* I
need to edit is: /frameworks/base/core/res/Android.mk

The resulting package file is /out/target/product/camden/system/
framework/framework-res.apk

I can't see where in the Android.mk any files are explicitly included,
I therefore cannot see how to explicitly remove a few .xml files.

Is there a variable or macro I can use within the Android.mk file to
achieve 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=en


  1   2   3   >