[android-developers] Re: how to detect if a phone is running HTC sense UI

2010-08-03 Thread joebowbeer
There are also subtle differences in the way some of the standard apps
work, such as Contacts (aka People).  The handling of Phone contacts
is different in HTC Sense, for example.

This difference exists whether the HTC Sense Launcher is selected or
not.

On Aug 3, 10:08 am, Jonas Petersson jonas.peters...@xms.se wrote:
 On 08/03/2010 06:31 PM, Dianne Hackborn wrote:

  I would really like to know why people want to know they are running
  with Sense UI.  Is it just for notifications?  Are there other things?

  We really don't want apps to be dealing with this stuff.

 Personally, I would very much like to agree.

 However, speaking on behalf of my Swedish users it would seem that there
 is a significant portion (you may call them misinformed) that want my
 application to look like the standard applications which for a
 significant portion is Sense (Desire and Hero sell like mad around here).

 My interpretation is that they are used to phones (say Nokia) where a
 globally selected theme is applied to just about everything but games. A
 number of users have very boldly stated that they withhold one star
 until this bug is fixed.

 As there (currently) is nothing like that, it is somewhat tempting to
 explicitly alter the UI for a few of the most common styles around. I've
 personally elected not to do that so far, but I can understand why some
 might.

                         Best / Jonas

-- 
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: onCreate, onStop..... super.onCreate, super.onStop... called before code or after?

2010-08-03 Thread William Ferguson
Yes, whether/when to call an overridden method in a subclass is one of
the unfortunate consequences of using implementation inheritance.
Its a shame that the Android SDK makes such heavy use of it
(inheritance), Over the last 10 years I had thought enough of us in
the Java world had finally gotten the message that its too fragile a
way to construct a strong base for development.  Most frameworks of
recent years had tended to favour composition using interfaces and a
set of concrete (typically final) implementations, and rightly so.

Its one of my two beefs with the Android SDK.

The other being the profileration of int constants instead of enums.
Trying to choose the correct constant value from an vast list of
similarly named constants that all have the same type. consumes too
much dev time and is fraught with danger.
Just look at the number of constants in the android.media package and
try to work which constants of which class go with with methods.

Yes I understand the performance trade off between ints and enums, but
a) We know that JVM perofrmance continues to improve
b) The compiler/jvm could be tuned to cut weight from any unused
portion of an enum.


On Aug 4, 7:38 am, Bob Kerns r...@acm.org wrote:
 I have found that setting the theme needs to happen before the
 super.onCreate() call.

 Otherwise, I put it first -- there definitely many things that need to
 happen later.

 I've complained before that this isn't well-specified. It really,
 really should be.

 On Aug 3, 8:09 am, TreKing treking...@gmail.com wrote:

  On Mon, Aug 2, 2010 at 10:12 PM, Moto medicalsou...@gmail.com wrote:
   I guess since it's not really enforced I'm not sure it really matters?

  Usually, no, it doesn't matter. Of course you could run into issues where
  your derived functions depend on state that is altered by calling super.
  This does not seem to be the case in Android, at least as far as the life
  cycle methods are concerned, AFAIK.

   I tried both ways and it works but I'm afraid to maybe get some memory
   leaks or things that are not apparent now but can cause harm or unexpected
   issues on some users...

  I think you're over-thinking the issue. In general, I'd say just call super
  first and then do your work, unless you have a good reason to do otherwise
  (the documentation tells you to or you know the implementation and know why
  you're doing it differently).

   Mark, not calling super at onCreate will lead to a crash... :)

  To clarify, Mark said:

   There's nothing in Java that forces you to have super.onCreate() at the
   beginning.

  Which is true - a) *Java* does not require this - you will compile and run
  fine. The crash you get when omitting onCreate is an *Android* requirement.
  And b) it's not required to be at the beginning of the function as calling
  super in the constructor is.

   I got maybe a little more insight on this but still no definite answer...
   maybe is not much of a big deal? :P

  It's really not, unless it breaks your app. It probably won't though.

  --- 
  --
  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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Tommy
Hm well I get this error when I use uses-library
android:name=com.google.android.maps/uses-library in the manifest
file

So does that mean the HTC aria can't use google maps?

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Tuesday, August 03, 2010 5:46 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

On Tue, Aug 3, 2010 at 5:29 PM, Tommy droi...@gmail.com wrote:
 I am trying to get the mapView into my app. For a long time I was
 working/testing with my HTC Aria getting the error
 INSTALL_FAILED_MISSING_FEATURE. I then got frustrated with the HTC and
 tried debugging the app on my Moto Droid and to my surprise it ran
 just fineWHY?

INSTALL_FAILED_MISSING_FEATURE is when you attempt to reference a
feature (e.g., uses-feature) that a device does not have.

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

Android Development Wiki: http://wiki.andmob.org

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

-- 
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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Mark Murphy
On Tue, Aug 3, 2010 at 7:41 PM, Tommy droi...@gmail.com wrote:
 Hm well I get this error when I use uses-library
 android:name=com.google.android.maps/uses-library in the manifest
 file

 So does that mean the HTC aria can't use google maps?

Beats me -- I don't own one. Are you running the original ROM? Do you
have the Google Maps application on there?

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

Android Development Wiki: http://wiki.andmob.org

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


RE: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Tommy
Yeah its right from the store new. And Yeah there is a google maps app on
the aria

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Tuesday, August 03, 2010 7:44 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

On Tue, Aug 3, 2010 at 7:41 PM, Tommy droi...@gmail.com wrote:
 Hm well I get this error when I use uses-library
 android:name=com.google.android.maps/uses-library in the manifest
 file

 So does that mean the HTC aria can't use google maps?

Beats me -- I don't own one. Are you running the original ROM? Do you
have the Google Maps application on there?

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

Android Development Wiki: http://wiki.andmob.org

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

-- 
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: DDMS Allocations tracker not picking up activity when using a real phone

2010-08-03 Thread fadden
On Aug 3, 3:27 pm, Mark Murphy mmur...@commonsware.com wrote:
 Many DDMS features only work on the emulator. It would not surprise me
 if this does not work on a device.

The Allocation Tracker feature should work equally well on both.
Pretty much everything but Emulator Control should work, really.  What
other DDMS features don't work on a device?

OP: did you remember to mark your application debuggable in the
manifest?

-- 
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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Mark Murphy
On Tue, Aug 3, 2010 at 7:46 PM, Tommy droi...@gmail.com wrote:
 Yeah its right from the store new. And Yeah there is a google maps app on
 the aria

Well, now, that's disturbing.

First, try this project:

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/

That'll eliminate some coding error as being the source of your
difficulty. I expect this app will fail, too, but you never know.

If I'm correct, and that app fails, try browsing the Market on the
Aria and see if you can download any existing apps that integrate
Maps. Puttering through Androlib, it looks like GPS Compass Map might
use it:

http://www.androlib.com/android.application.com-gpscompassmap-jjqnj.aspx

If you don't see any apps that appear to use Maps, or you cannot
install them, then there's something messed up either with the Aria in
general or, somehow, your device specifically.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] Re: DDMS Allocations tracker not picking up activity when using a real phone

2010-08-03 Thread Mark Murphy
On Tue, Aug 3, 2010 at 7:58 PM, fadden fad...@android.com wrote:
 On Aug 3, 3:27 pm, Mark Murphy mmur...@commonsware.com wrote:
 Many DDMS features only work on the emulator. It would not surprise me
 if this does not work on a device.

 The Allocation Tracker feature should work equally well on both.
 Pretty much everything but Emulator Control should work, really.  What
 other DDMS features don't work on a device?

-- Process listing (only see debuggable projects)
-- File browsing (/data is off limits)
-- Most of the Sysinfo tab (I only get Memory to work)
-- The VM Heap tab (Heap updates are NOT ENABLED for this client)

And, FWIW, the separate hierarchyviewer tool does not work with devices.

But, you're right, Allocation Tracker does work. My apologies. I also
probably should have said some rather than many DDMS features
don't work on devices -- I thought it was a longer list.

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

Android Development Wiki: http://wiki.andmob.org

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


[android-developers] HTC EVO RTSP issues... Anyone experience issues in this area?

2010-08-03 Thread Moto
I'm currently getting issues with the RTSP client of the HTC EVO
running Android 2.2.

The purpose of this post is to know if anyone has issues in that area
or if there is known bug on this... Just to know it's not only
me... :P

Thanks!
-Moto!

-- 
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 store questions for quiz type application

2010-08-03 Thread Bob Kerns
True enough, and if you are only reading, atomicity doesn't matter.

But if you want to record answers?

Files are well suited to either read-only uses. But once you start
writing, you have the potential for partial updates unless you use a
rename or delete to mark the end of the update. Which is done far too
seldom.

SQL and databases are a skill I recommend for any well-rounded
programmer.

On Aug 3, 12:18 pm, DanH danhi...@ieee.org wrote:
 Further, while with some careful attention to detail, you can get
 reliable operation with files, even if the device is turned off at a
 bad moment -- too often people don't manage to get it right. (Key idea
 - the only atomic filesystem operations are rename and delete). 

 Seems to me that opening a file read-only is fairly atomic.  Don't
 attempt to modify the questions (or store result data in the same
 file) and there's no atomicity problem.

 On Aug 3, 1:48 pm, Bob Kerns r...@acm.org wrote:



  I agree.

  My experience with this sort of thing is that frequently, if you don't
  start out with a SQL database, you ultimately end up having to convert
  it later. So often it's better to start there.

  Here's why. Using a database scales better. If you end up with a large
  quiz, you'll have to load it all into memory at once -- or split it up
  into lots of files. XML or JSON become the wasty approach, as Paul
  put it, beyond a certain point.

  Further, while with some careful attention to detail, you can get
  reliable operation with files, even if the device is turned off at a
  bad moment -- too often people don't manage to get it right. (Key idea
  - the only atomic filesystem operations are rename and delete).

  With a database, you still have to think about transactions, but you
  can group any set of operations in a transaction, and there is a
  single, reliable mechanism for reliable transactions. You don't have
  to invent your own.

  I would definitely use multiple tables. For example

  Question:
  * id (primary key)
  * answerID (foreign key constraint on answer table, do not chain on
  delete)
  * number (if you want to define a numbering for your questions).
  * text

  Answer:
  * id (primary key)
  * questionId (foreign key constraint on question table, chain on
  delete -- i.e cause this to be deleted if the question is deleted).
  * number (if you want to control for a consistent order, rather than
  randomize it).
  * text

  If you're recording the responses:

  Response:
  * id (primary key)
  * questionID (foreign key constraint on question table, chain on
  delete)
  * answerID (foreign key constraint on answer table, chain on delete).

  You'll also want to define indexes -- for example, on
  Response.questionID, which should probably also be unique (and
  Answer.questionId, which should not, or Answer.questionId, number,
  which should).

  Then you can quickly find question #2345098 and its answers, and
  consume no more storage and little more time than if you had just 10.

  On Aug 3, 6:09 am, saify.zeenwala saifyzeenw...@gmail.com wrote:

   Hi

   Better opt for SQL as it would be convenient for you to do further SQL
   query.
   where as in property file you have to do manual search and have to do 
   string
   operation.

   create table with 3 columns

   question
    possibleanswer
   correct answer

   Might be this will help you

   On Tue, Aug 3, 2010 at 2:19 AM, amos milan.ku...@gmail.com wrote:
Hello,
I want to create such application that would show a question to user
and possible 3 (or n) answers and user should pick correct answer
(some kind of learning quiz). I'm not sure about the storage for those
data - questions and possible answers. What would be most natural way
for Android. I know that I can either use property files or tables in
sqlite database. There will be about 500 items (1 question, 3 answers,
1 correct answer ).
Any ideas?
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%2Bunsubs
 cr...@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: Resource Directory Qualifier Limitation?

2010-08-03 Thread Greg
Yes, this is definitely the issue - however now I am lost trying to
decode what these fields are.  After searching through previous posts
and testing, it looks like inScaled = false will not scale any
resource even if it's resource directory indicates it should, and
setting it to true gives me this default behavior.

Can someone shed some light on the right combinations of density
settings such that if a resource is found in the specific density
folder that matches the target density it does not perform scaling and
if it is found in drawable it does?

Thanks,
-Greg

On Aug 3, 7:34 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Aug 2, 2010 at 7:14 PM, Greg gdub...@yahoo.com wrote:
  Mark, thanks for getting back to me.  I zipped up my sample project
  that has a surfaceview and a thread (based off of the lunar lander
  example) just because it is a very similar format to my application.
  I uploaded it here:

 http://www.megaupload.com/?d=VKBXZU9C

  The only thing it does is draw a background image and a smaller image
  - the blue square - on top of it.  This is what I want to accomplish
  in my app - a high res background and a scalable smaller image.  In
  the top level of the folder you will see a screen shot of what I see
  when running it on a 480x800 emulator with 2.2.  You can see that it
  has loaded and correctly scaled the blue square from the drawable
  folder, yet it has taken the background image from the hdpi folder and
  scaled it as if it was also located in drawable.  I put some text to
  make it easier to see relatively what part of the image you are
  looking at and unfortunately, the normal/hdpi text just got cut off,
  but you can still tell that it must be the zoomed hdpi image.

  I am hoping I am making a fundamental mistake in my manifest or
  something that you can quickly point out...

 Well, I see what you're seeing.

 My best guess is that it has to do with
 BitmapFactory.decodeResource(). I have not used this method before.
 Looking at BitmapFactory.Options, I see a variety of density-related
 settings. It is possible you will need to fiddle with these.

 For example, if you nuke your view and use an ImageView showing the
 background image, it shows up fine.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] getAlpha for ImageView

2010-08-03 Thread Ozymandias
How do you get the alpha of an ImageView? You can setAlpha, but I can
find no way to retrieve it afterwords. Anyone know?

-- 
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] communicate between java javascript (i.e. pass string)

2010-08-03 Thread Anamika
I'm trying to verify page content rendered through webview by my
android app pro grammatically. Using javascript I'm able get the value
of those.

For example

 document.getElementById(color-link-box-
top).getElementsByTagName(p)[0].innerHTML

above line returns me string value within javascript,  but now I want
to get that string value back in my java test application using
something like below code.

mWebView.loadUrl(javascript:window.demo.value =
document.getElementById(\color-link-box-top
\).getElementsByTagName(\p\)[0].innerHTML);

I tried addJavaInterface method of webview  tried passing string as
member and through method, but none seems to work.

Please 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] Re: How to store a drawable in database?

2010-08-03 Thread jerryfan2000
I want to store all install app's icons in a database so that I don't
need to query from lengthy package manager query every time after
reboot.

On Aug 3, 1:53 am, Matty busbus...@gmail.com wrote:
 I can't help but wonder why you would want to do this?

 On Aug 1, 9:12 am, Jerry Fan jerryfan1...@gmail.com wrote:

  Hi folks,
  is there anyway that I can store drawables into database?

-- 
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 test OpenGL?

2010-08-03 Thread SChaser
Robert Green, thanks again for your informative answer.

I added the MODELVIEW mode right after setting the viewport, and did a
loadIdentity  after that. No change, but I agree its the correct thing
to do.

Still zero lines visible on the emulator (even when I scale up its
display). Looks fine on the G1.

Off to read the manuals again ;-(

Per your question:
gl.glScalef(1, _hgt2width, 1);

 float lscale = .002f*MyApp._curScale;

It could be that I just don't understand what this is supposed to do
but magic multipliers like .002 never look good to me when you're
having issues with drawing precision.

I am drawing in a geographical coordinate space, not pixel space. So
the scaling is used to transform from that space to the viewing space.
In my geographical space, my coordinates are in (projected) lat/long
specified with higher precision than even float can deal with (which,
fortunately, isn't a problem with this app).

My test case uses simple coordinates, but I left in the same scaling
as in the real app.

// ditch the fixed point (it's only faster on first-gen devices and
only in certain cases)

For now, I'll keep it because a bunch of code is in it, and I am
testing on a first gen device.

// now if you want a line 1px wide on the 10th line, draw a line with
x on 9.5f

I just want my lines to show up, and my reading of the openGl
documents indicates that they should, if drawn with a line width of 1,
no matter where I put them. Of course, offsetting them from pixel
edges would be a good idea, except I am not drawing in pixel
coordinate space.

-- 
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 test OpenGL?

2010-08-03 Thread SChaser


On Aug 3, 4:33 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 But I am surprised no one has mentioned: your settings for glOrtho's
 near_val and far_val are odd, to say the least. The default is exactly
 the other way around with near_val=-1.0 and far_val=+1.0. Your values
 put the near plane behind the viewer, but the far plane in front. Is
 this really what you want?

Thanks for pointing this out. I have reversed them (no effect) as a
result of your suggestion.

I threw them in at the last moment, well into this thread. Originally
they were at 0,0 (I'd drawing in 2D), but when I turned on debugging,
it showed me this was causing a divide by zero (duh - if I'd looked at
the resulting transform matrix I'd have seen that). So I just added
the values, and got them backwards.

-- 
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] LG Cookie Pep GD510 Price

2010-08-03 Thread vikram singh
The GD510 Pop touch screen feature phone. users can listen to plenty
of music and watch movies, or they can create their own memories with
the GD510^s 3.0 megapixel camera. The GD510 will also launch with an
optional solar panel add-on that will fit onto the back of the device
for charging the battery with the power of the sun.

The key features of the new LG Cookie Pep GD510 mobile phone are:
•   3 MP Camera
•   3-inch TFT Resistive Touch Screen
•   Music player, Video player
•   Facebook, MySpace, Twitter integration
•   Bluetooth, USB
•   Video Records
•   8GB MicroSD
•   Silver, Black Colour
•   3hrs 20min Talk time with Standard Battery
•   MP3, Polyphonic Ringtone Type

To know more about LG Cookie Pep GD510 price and features visit:
http://www.naaptol.com/price/729237-LG-Cookie-Pep-GD510.html

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


[android-developers] How to implement your own LocationProvider

2010-08-03 Thread Marcus Wolschon

Hello,

I would like to implement a new LocationProvider.
In this case, one that uses OpenCellID.org.
I figured the pattern wou be quite similar to providing an
AccountAuthenticator
but was stunned that I could not find any documentation on this.

Looking at the source
http://www.netmite.com/android/mydroid/frameworks/base/location/java/android/location/
all the relevant code seems to be in a service providing the
ILocationManager.aidl -interface
that I cannot navigate to or find using Goole Code Search.

Is it supported to provide your own LocationProvider at all?
If so, what do I have to do to acomplish this?

Regards,
Marcus Wolschon

-- 
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: Launch application or service from html link?

2010-08-03 Thread rajesh rao
hi friends if you want earn more money? then don't waste your time just copy
and the address given below.*
http://www.AWSurveys.com/HomeMain.cfm?RefID=raothetechy*

-- 
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 use AT Commands in android ril (Linux)

2010-08-03 Thread kishore
hi all,

plz give reply to that subject

regards,
kishore

-- 
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: LVL returns always LICENSED...

2010-08-03 Thread Kirky
Devesh:

Yes that's clear to me but shouldn't any phones that are not synced to
accounts listed in the portal simply just get not NOT_LICENSED back
from the service?

-- 
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] Options for widget loading

2010-08-03 Thread kaundinya
how to add radio group in the widget to display options on the screen
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


[android-developers] Re: Unable to retrieve the GIVEN_NAME or FAMILY_NAME from database

2010-08-03 Thread Donatello Indino
This code snippet works for me

cursor = contentResolver.query(Data.CONTENT_URI, null, Data.LOOKUP_KEY
+ =' + lookupKey + ', null, null);

cursor.moveToFirst();
int columnIndex =
cursor.getColumnIndexOrThrow(StructuredName.DISPLAY_NAME);
Log.i(TAG, DisplayName:  + cursor.getString(columnIndex));
contactInfo.setContactDisplayName(cursor.getString(columnIndex));
columnIndex = cursor.getColumnIndexOrThrow(StructuredName.GIVEN_NAME);
Log.i(TAG, GivenName:  + cursor.getString(columnIndex));
contactInfo.setContactGivenName(cursor.getString(columnIndex));
columnIndex =
cursor.getColumnIndexOrThrow(StructuredName.FAMILY_NAME);
Log.i(TAG, FamilyName:  + cursor.getString(columnIndex));
contactInfo.setContactFamilyName(cursor.getString(columnIndex));
cursor.close();

Hope it helps

On 30 Lug, 23:37, j jac...@gmail.com wrote:
 Thanks for the reply.  I agree the API doc is very ambiguous.

 On Jul 30, 12:39 am, William Ferguson william.ferguson...@gmail.com
 wrote:

  You appear to be using a combination of Android 1.5 and Android 2.0
  mechanisms.
  Ie passing Android 2.0 constants to an Android 1.5 mechanism.

  Android 1.5

           Uri uri = Phone.CONTENT_URI;
   Phone.CONTACT_ID,
   Phone.DISPLAY_NAME,
   Phone.NUMBER,
   Phone.TYPE, Phone.LABEL,

  Android 2.0

   ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,

  But I could be wrong. The ContactsContract provider is pretty unclear
  IMHO.
  I think you'll gain some mileage 
  from:http://stackoverflow.com/questions/1721279/how-to-read-contacts-on-an...

  On Jul 30, 7:47 am, j jac...@gmail.com wrote:

   While iterating through my contacts database, the firstName
   (GIVEN_NAME) always returns an integer (0, 1, 2, ... 7) while the
   lastName (FAMILY_NAME) always returns null.  I am running on HTC
   Incredible.  What am I doing wrong?

           Uri uri = Phone.CONTENT_URI;
           String[] projection = new String[] {
   Phone.CONTACT_ID,
   Phone.DISPLAY_NAME,
   Phone.NUMBER,
   Phone.TYPE, Phone.LABEL,
   ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
   ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME

   };

           Cursor managedCursor = mContext.getContentResolver()
                 .query(uri, projection, null, null, null);
           if(managedCursor == null) {
               Log.w(LOG_TAG, managedCursor null);
               return null;
           }

           while(managedCursor.moveToNext()) {

                   long contactId = managedCursor.getLong(

   managedCursor.getColumnIndex(Phone.CONTACT_ID));
                   String name = managedCursor.getString(

   managedCursor.getColumnIndex(Phone.DISPLAY_NAME));

                   String firstName = managedCursor.getString(

   managedCursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME));//
   getFirstNameFromId(contactId);
                   Log.d(LOG_TAG, firstName: + firstName);
                   String lastName = managedCursor.getString(

   managedCursor.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME));//
   getLastNameFromId(contactId);
                   Log.d(LOG_TAG, lastName: + lastName);

   }

-- 
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] Does all Android Devices support Map API

2010-08-03 Thread Jingwen Xiong
Hi all,

I am currently developing an android application that uses android
google map API.
I am wondering does all android devices support this add-on api??
If not, how could I detect wheter the device support or doesn't
support map API programatically.

Any comments and suggestion are welcome.

Thanks very much!

Jingwen

-- 
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] Closing the Application Window Programatically

2010-08-03 Thread Neetu
hello,
 I am doing small project Location Finder in android.In that i
have used different menu items,which include Close menu.On click of
that menu i want to close the application.i have tried it with
finish(),but it just the finish the current activity.
   so can you plz guide me how to close the application
programtically.


Thanks,
Neeta

-- 
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] Android Appwidget resolveUri failed on bad bitmap uri

2010-08-03 Thread Christian
Hello everybody,

I'm programming an appwidget that downloads an image from a website
and displays it. The approach is easy, but I get an error, if I want
to set the imageView to the URI of the downloaded image.

First I set the imageView with updateViews.setImageViewBitmap, where
updateViews is a RemoteViews Object. The Problem was an Transaction
Binding Error, because the images gets serialized and the transaction
became to big. So good so far. Then I decided I want to save the
picture on the ! internal ! (not external / not sd-card) memory. The
download works fine and in my preferences activity of the appwidget
the downloaded image gets displayed. But, when I go back from the
preferences activity then the Widget doesn't show the image.

The error occurs is: INFO/System.out(151): resolveUri failed on bad
bitmap uri: /data/data/com.mywidget/files/temp.jpg

But the preference activity can display the image with exactly this
URI!

So where is the problem, I really can't find it!

This is the part where I create my UpdateViews. This gets called by
the UpdateService!

String filename = temp.jpg;
context.deleteFile(filename);
FileOutputStream fos;
File file = context.getFileStreamPath(filename);
Log.d(TAG, BuildUpdate: +file.toString());
try {
Bitmap bmImg = 
BitmapFactory.decodeByteArray(data, 0,
data.length); //options am Ende einfügen
fos = context.openFileOutput(filename, 
Context.MODE_PRIVATE);
BufferedOutputStream bos = new 
BufferedOutputStream(fos);

bmImg.compress(Bitmap.CompressFormat.JPEG, 100, bos);
bos.flush();
bos.close();
fos.close();

} catch (FileNotFoundException e) {
Log.d(TAG, e.toString());
e.printStackTrace();
} catch (IOException e) {
Log.d(TAG, e.toString());
e.printStackTrace();
}
updateViews.setImageViewUri(R.id.ImageView01,
Uri.parse(file.toString()));



I hope someone can help me with this error.

Thanks a lot,
Christian

-- 
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] Option Menu to choose before loading widget

2010-08-03 Thread kaundinya
Hi all,
I need to know how to give an interface to the user to choose an
option before the widget is loaded. in other words, when user selects
the widget on the screen, there should be 3 options which pop up for
the user to select, once selected the application will navigate to
corresponding intent depending upon the option.

Know, please let me know how to get these options on the screen when
the widget is loaded

Thanks in advance
Nagaraj Padmanabha Rao

-- 
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] UPnP C Library

2010-08-03 Thread msnkm
Hi ,

Im trying to use UPnP for service discovery,i need a C library which
implements this.Has anybody done this earlier.Share the link

Regards,
Kiranmai

-- 
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 Head First Android Book exists?

2010-08-03 Thread rajesh rao
hi friends if you want to earn more money then don't waste your time just
copy and paste the address given below.
*http://www.AWSurveys.com/HomeMain.cfm?RefID=raothetechy*

-- 
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] Cordinates provided by geo fix command to emulator are different in location listener

2010-08-03 Thread tty
Hello,
I use Android emulator to test my location based application. The
cordinates are provided by geo fix command (for example: geo fix
2.31278 48.9533 10). But when the new location event is fired, the
cordinates are not the same as those in the command: I got latitude =
48.9580005334, longitude = 2.30335447 (I use
Location.getLatitude() and Location.getLongitude() methods). Does
anyone have an idea of my trouble ?

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 can get the latest version of google apks (market ,gmail ,yotube)

2010-08-03 Thread appel
The same as with everything else that is part of the firmware, you
wait for your phone manufacturer/carrier to release updates with newer
versions of the Google apps. :(

On Aug 3, 9:39 am, GPU gopuraj...@gmail.com wrote:
 So what is procedure to get these apks from google ?

 On Aug 3, 3:35 pm, Kumar Bibek coomar@gmail.com wrote:



  You cannot. These are not open sourced apps. Sorry

  -Kumar Bibekhttp://tech-droid.blogspot.com

  On Aug 3, 11:09 am, GPU gopuraj...@gmail.com wrote:

   Hi ,

   How can i get the latest version of google apks ? .Is their any git
   repository for this apk's .I am not able to find these apk's in the
   android.git  QCT git .

   Thanks
   Gopu

-- 
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: Many app share one Class?

2010-08-03 Thread James Becwar
You need to make a JAR and add them to both projects as external libs.
-James
http://www.jamesbecwar.com


On Aug 3, 12:04 am, 汪健飞 wangjf...@gmail.com wrote:
 I mean don't find MessageVo in the testTwoApp,because testTwoApp and
 MessageVo don't together project.

 2010/8/3 Floaters puhao7117...@gmail.com





  I think it's easy, maybe you can refre this document:
 http://developer.android.com/guide/topics/intents/intents-filters.html

  2010/8/3 汪健飞 wangjf...@gmail.com

  I want many app share one class,for example,I have MessageVo,I want
  testApp and testTwoApp share MessageVo.but I don't know TestTwoApp use
  MessageVo.

  --
  Cary

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

 --
 Cary

-- 
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 can i know that emulator is fully loaded (which display home screen )

2010-08-03 Thread jadav
Hi All,

Is there any way by which I know, now emulator has been loaded fully.

(
I am asking this because some commands like adb install mypk.apk 
need fully loaded emulator. adb wait-for-device is there but it doen't
serve my purpose.
)

Thanks,
Jadav

-- 
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] Which Background model to run

2010-08-03 Thread SifuDarryl
Hello,

I am trying to develop an application which will require a service to
run in the background.  I am relatively new to android programming,
and after reading many posts, blogs, how-to's and books on creating
and managing services, I am still pretty confused about which model I
should try to use.

First, let me present (in general) the application requirements: I
need an application which will spawn a background process (service?)
which will connect to a bluetooth device.  The bluetooth device is
designed to deliver data to the android device.  The issue is that the
data could come in at any moment, so the bluetooth connection has to
stay active.  Note that the application is a VERY SPECIFIC app and is
NOT intended for public use.  I do understand the arguments for not
having background apps running all the time, but please understand
that this is a very specific application for a very specific client.

Now, in general, I think the program flow would be to start the
application (and launch a UI activity).  Then I need to configure and
connect to the bluetooth device.  At this point, the user should be
able to do other things - make phone calls, check their email, etc.,
while the bluetooth connection is still active and potentially
receiving data.  If data comes in, a notification is fired, etc.

So here are my questions and concerns:

1. If I start an app (which spawns a UI activity and ultimately my
bluetooth connection service) but the app is killed, apparently, the
service handling the bluetooth connection is killed as well.  How can
I keep that alive?  I read that Service.setForeground() was
depricated, but even if I were to set it to the foreground, if the app
is killed, the service is killed as well.  I need to have it run in
the background with as high of a priority as possible (again, I do
understand that this is considered bad form, but this is a specific
app and this functionality has been requested by the client).

2. If I started the app (and the service, etc.), but the user, say,
answers a phone call, the app is put into the background.  However,
let's say the user goes back to the home screen and starts a DIFFERENT
instance of the app, i.e., he doesn't hold down the home key to select
the already running app from the task manager but starts a completely
new one.  If the service handling the bluetooth connection is still
running, how will this new instance behave?  i.e., how can I get it to
connect to the bluetooth service which is ALREADY running in the FIRST
instance of the app instead of this new instance?  Do I have to use
some form of a Remote service instead of a local service?  This is
where I'm a little confused by things as it seems remote services and
defining an AIDL seems to create a lot of extra overhead, and since
I'm already creating a lot of overhead with the service running in the
background all the time, I want to keep that as small as possible.
How can I insure I am connecting to the same service already running?

Thank you for your time and any advice you can give me.

Darryl

-- 
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] DFW Developer Group

2010-08-03 Thread javahead76
Greetings Fellow Robo-Automaton Developers,

I'm trying to get a group together in the DFW area.  In the spirit of
not spamming, please just comment here or send me a message if you are
interested in joining.

Thanks and happy coding!

Randall

-- 
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] Who recycled My Bitmap?

2010-08-03 Thread Napoleon Liu
Hi:
   First of all , sorry for my poor English.
  I have some questions about Bitmap, I have an app A which have a
full screen ImageView in it, and i have another app B which have
ImageView too and use large of memory,  B was callded and start from
A(A and B in different process). The app B have a bug and it was
memory leak, So when i start B and click Back key return to A
repeatly, B throws Out of memory,  but sometime when useage memory
of B is larger than system app Max memory, B throws Canvas: trying to
use a recycled bitmap,  and then A throws Canvas: trying to use a
recycled bitmap too.
I know this exception throwed when canvas draw a recycled bitmap, but
I never manually recycle bitmap in A.
Is there anyone have the same problem ? Or is there anyone tell me
why...

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


[android-developers] Re: Why is Android so buggy?

2010-08-03 Thread nadavnaz
From the point of view of a (relative to you) dumb user of a nexus
one, I'd be glad to add a bit to the disscusion.

I'm running android 2.2 froyo on a nexus one, and i'm loving it. No
other phone comes completely unlocked, allows tethering and a huge app
catalog while not being on any carriers leash.
I love pretty much about android but there ARE many glitches that have
nothing to do with the sdk or developer tools that (except maybe when
i flash my phone) I've never used.

I found this discussion through search:
After i went out of alarm clock mode and the phone got stuck in a
weird kind of state. Any time I tried to interact with the home screen
i'd get haptic feedback and zero response at the homescreen. After a
couple of seconds trying to kick it out of that state the phone kind
of bricked and I had to hard reset it (take out the battery) to get it
working again. Stuff like that happens to me from time to time.

Besides this incident, just a couple of interface refinements would do
android quite good, like auto-fitting text in browser when using multi
touch and not the zoom buttons etc.

All that said, it's the best platform out there today (together with
iOs, no offence), and my only real choice. Definitely the only truly
customizable portable platform that exists today for mobile at all,
and that's HUGE for 2 years of work. It's pretty buggy at times, but
that'll go with time I guess (:

Running FRF91 on an att band nexus one. Cellcom, Israel.

Thanks so much for this amazing product, I'm excited to see where
android and the phones running it evolves, and I'm anxious to see
android market share roar, because honestly I think that besides the
Iphone android is the only real decent mobile os out there. Iphone
being the simplistic platform with a great fluid physics-interface UI,
and android being everything that the iphone blatently isn't.


Nadav

-- 
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: Tab layout navigation issue

2010-08-03 Thread kaundinya
Hi Rajesh,
Firstly, im new to android, just take a look on the following if it
help u.

u can assign the icon for the tab using
mTabHost.getTabWidget().getChildAt(0).getBackground()
where mTabHost is the TabHost control from the layout.

for changing the image when clicked, u can use
mTabHost.getTabWidget().getChildAt(0).setOnClickListener()
and reassign the tab with new icon or text here.

Thanks and regards
Nagaraj P Rao

On Aug 3, 4:21 pm, Rajesh Pelluru mail2pell...@gmail.com wrote:
 Hi,
  In my layout I have three tabs are there Tab1,Tab2,and Tab3.

 In Tab1 content ,I have a image called image1 and on click of that image I
 need to change the content of tab.

 If I change content also , my tab needs to be highlighted ...

  How can I achieve that one ??

 --Rajesh

-- 
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] Connect to desktop application

2010-08-03 Thread Tom
I have an application that will run on a desktop behind a router.  The
application makes a call to a webservice and updates its connection
information periodically.  The desktop has a database that I need to
retrieve information from via an Android phone.  The phone needs to
request the information from the application.  How do I connect the
application on the phone to the desktop application behind the router?
Thanks in advance,
Tom

-- 
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 preprocessor, //#ifdef...

2010-08-03 Thread bruce
So much to say about Java except that's just talking religion.

So back to the original topic.  Sometimes just because you are adding
in debug code doesn't mean you want a performance degradation.  Java
has mechanisms for some of this but just for example, tracing.
Doesn't matter what you are tracing/tracking, if you are storing some
sort of ownership for easy of debugging, you might just want this is
production.  Especially, 1.0 products that tend to have many more
deficiencies.  Whether that fits RichardC's reasons is another story.

While not specific to Java, I've had enough failures between xml
generation, aidl, etc., that there always seems to be preprocessing of
some sort whether it got included in a language or not.

Cheers

On Aug 3, 10:10 am, Leigh McRae leigh.mc...@lonedwarfgames.com
wrote:
 I object to the fact the people who write Java are real programmers...  
 Sorry,  couldn't help myself, likely should hit send, oh well.

 On 8/3/2010 1:30 AM, Frank Weiss wrote:



  This thread is a little like schadenfreude to me. A lot of it is about
  taste - of which arguing about is of little use. I just saw some Java
  code where every closing brace is commented with // end of if, //
  end of for, // end of method, etc. Yech!. That, to me, is worth
  arguing about!

  If the OP wants to use preprocessor, nothing's stopping them. Indeed,
  as Bob Kearns points out, Android SDK generates R.java from several
  XML files, which is pretty darn close to what a preprocessor does.
  Would it be that hard for the determined developer to add a
  preprocessor hook into the SDK build script - even on Eclipse? Come on
  folks, this is open source code! Even Atlassian lets you modify the
  Jira and Confluence source code!

  My $0.02 is that even if javac did have a preprocessor, few real
  Java programmers would deign to use it. Nonetheless, I'm sure there
  are a few cases where a preprocessor is Just The Right Way To Program.

 --
 Leigh McRaewww.lonedwarfgames.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] Setting an Intent extra value that's an array of String and Integer

2010-08-03 Thread Herb Jellinek
I have a program that sends a broadcast Intent that needs an extra
value.  The value is declared as being of type Object[], though I know
that the elements are always of type Integer or String.  That's part
of an API not under my control.

What's the most concise and/or efficient way to do the equivalent of
the putExtra call below?  I am willing to convert foo to another data
type for the putExrta and convert back in the receiver(s).

Object[] foo = new Object[FOO_SIZE];
...
foo[0] = new Integer(7);
...
foo[6] = Hello;

Intent broadcastIntent = new Intent(MY_INTENT);
// assert: all elements of foo are Integer or String
broadcastIntent.putExtra(MY_EXTRA, foo); // XXX not correct

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: A very strange ServerSocket.accept problem

2010-08-03 Thread Ricardo León
The port the device is not open, I have the same problem but i dont
know how to open the port, for example in J2ME is Connector.open but I
dont know in android.

On Aug 3, 10:26 am, Alex Xin xinxi...@gmail.com wrote:
 Hi Oscar

 I have no firewall installed..

 Alex



 On Tue, Aug 3, 2010 at 11:11 PM, Oscar oscar...@gmail.com wrote:
  Do you have a firewall or something like that, it´s maybe the problem

  On Aug 3, 8:56 am, Alex Xin xinxi...@gmail.com wrote:
   Hi,

   I have asked this question before but no answers, so I post again hope
  that
   someone might help me, thank you.

   I'm now facing a very strange server socket problem, I have a server that
   will listen on a TCP port, I use the following code to do this work.

   public class RequestListenerThread extends Thread {

   private final ServerSocket serversocket;

   public RequestListenerThread(int port, final String docroot)
   throws IOException {
   this.serversocket = new ServerSocket(port);
   setDaemon(true);

   }

   public void run() {
   Log.v(FE, SMB Server Listening on port 
   + this.serversocket.getLocalPort());

   while (!Thread.interrupted()) {
   try {
   // Setup incoming client connection
   Socket socket = this.serversocket.accept();
   Log.v(FE, Incoming connection from 
   + socket.getInetAddress());
   // Start worker thread
   Thread t = new WorkerThread(socket);
   t.start();} catch (InterruptedIOException ex) {
   break;
   } catch (IOException e) {

   Log.v(FE, Network I/O error: 
   + e.getMessage());
   break;}
   }
   }

       }

   My target device is running on Android 1.6  2.1

   When I run this code, it can start to listen on port but can't accept any
   incoming connections. When it runs into serversocket.accept function, it
   never return, just like dead lock.

   I found that if I establish any connections from my phone to computer,
  then
   my phone could be successfully found that there're incoming connections
  and
   of course, accept them.

   In emulator, above code works fine, has no this strange problem.

   Is that my phone's bug or I have something wrong in my code?

   Thanks a lot!

   Alex

  --
  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%2Bunsubs 
  cr...@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] Android keyboard

2010-08-03 Thread morpheus
Hi to the list.
I'm planning to install Android onto a device which does not have a
keyboard, nor a touch screen.
Such device will show it's interface via a DLP projector and will be
controlled with a remote with few keys (only direction, confirm and
menù buttons).
So, the problem; I'm trying access to the system keyboard to configure
the device (wi-fi networking, browser, and so on), but I'm not able to
interact with the keyboard. When I focus on a text field, the system
keyboard appear, but I cannot interact with it; I also tryed to
implement a keyboard, getting the same results
Does someone solved the problem ? Interact with the system keyboard
without a phisical keyboard and wothout a touch screen.

Thanks.

Mauro

-- 
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: Looking for a design tip/advice/doc

2010-08-03 Thread bruce
If you are just doing a few items, it's not going to be a big deal.
Same with grabbing data from a database.  It's an issue when you have
to scroll through lots of data and repopulate views, deal with flings,
etc., while maintaining good speed.  Sounds like you won't have to
deal with this.

Another way to approach this is to work with something like
SimpleCursorAdapter and map your database onto the layout so it
automagically populates.  This only makes sense if you are going to
display a set of info; lists/grid.

Cheers

On Aug 2, 10:11 am, Sebastián Treu sebastian.t...@gmail.com wrote:
 Hi all,

 I'm kind of new to android development. I have read from many sources
 that findViewById() is a costly operation. I'm making an application
 that deals with 5 TextViews to provide different kinds of information
 (distance, duration, title, description, etc) from a database. I'm
 using listeners to catch touch/click events and feedbacks a handler.
 The main function of the handler is to received a position in the
 Cursor where the new information needs to be displayed.

 I mentioned earlier that findViewById() is a costly operation. So, I
 don't call this method in the handler. Doing so, it will retrieve
 every time the Views when user touchs/clicks some widget.

 Is it right to populate the Activity with private members of the
 Views/Layout it displays? I mean, I don't like it. I don't know why,
 but seems that I'm populating too much the activity. I'm aware of the
 android:onClick xml attribute, but in my case I also use long click
 listeners. So, a piece of onCreate() looks like:

 imageTitle  = (TextView)findViewById(R.id.title_image_view);
 title             = (TextView)findViewById(R.id.title;
 desc           = (TextView)findViewById(R.id.desc);
 duration     = (TextView)findViewById(R.id.duration);
 distance     = (TextView)findViewById(R.id.distance);

 And all of those are private members, wihout mention the
 cursor.getColumnIndex() for each. I thought on implementing
 Handler.Callback and set on the Hanlder.Callback constructor
 implementer a View array or a View list or something, but I also need
 this objects later to set other listeners and setups.

 Is this right? I cannot think another way, as I need the reference to
 the object, and also the Cursor reference that the handler will move
 to the position provided and update the correspondent View.

 I will really appreciate either an advice or a useful link/info/doc to
 read in what concern in this kind of designs. What I do not like is
 that It looks like imperative programming filling the Activity with
 global variables.

 Thanks,
 --
 If you want freedom, compile the source.

 Sebastián Treuhttp://labombiya.com.ar

-- 
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: Emulator loses network connection issue

2010-08-03 Thread Tronman
I have the same problem... the Internet connection just stops, and I
have to restart the emulator.  I'm using 2.2 now, but it's happened to
me using other versions as well.  It happens at least once a day.

-- 
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] Auto upgrade of manually installed app that gets published in market

2010-08-03 Thread Mike
If I install an application manually via the apk, and then an updated
version goes in the market, will the device recognize the upgrade
automatically?

-- 
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: Activities and Multiple Views

2010-08-03 Thread Jef
You can override the onKey... methods in your Activity and any
keystrokes not handled by the views in your activity will fall through
to the Activity. Does this help?

Regards,
Jef

On Aug 3, 3:31 am, Revathi K J Ramanan revathiramana...@gmail.com
wrote:
 Hi,

 I start a browser and from the browser,I start  a video which occupies
 only a small part of the screen,say the bottom right corner.

 Now the browser will be pushed to the 2nd position in the window order
 and Video will come to the first position.
 Is it possible that browser can have the control for active window and
 receive the key events though the video is the Top Most window.

 Please help me out.

 Thanks in advance.

 Regards,
 Revathi K J

-- 
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] ACTION_PACKAGE_REPLACED and Widgets

2010-08-03 Thread jbella
Hi,

I'm trying to handle upgrade of my widget. I catch
ACTION_PACKAGE_REPLACED and then i want to loop through all
AppWidgetIds but after upgrade getAppWidgetIds does not return any
AppWidgetIds. Anyone have an idea of how i should handle this?

// Johan B

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

2010-08-03 Thread Mica
this is good news, do you know when next ver of ADT will be available
through Eclipse update?

On Jul 9, 2:36 pm, Xavier Ducrohet x...@android.com wrote:
 Just to give an update to anyone still reading this thread.

 The next version of ADT will include fixes for:
 - Issue with the library needing to have a single source folder called
 src. Any number of source folder, of any name, even under other
 folder (src/java).
 - Issue with project name containing characters that aren't valid for
 folder names.
 - Libraries depending on libraries.

 We've also made the link of the library source folders in the main
 project much more robust.

 By the way, we highly recommend to people using library projects in
 Eclipse to set their workspace to automatically refresh.
 This is due to Eclipse not realizing that the code inside the linked
 folder (in the main app) is the same as the code in the library. Since
 Eclipse considers them to be different, editing the code in one
 location requires a refresh in the other location. Setting the
 workspace to refresh automatically helps a lot.

 Xav





 On Fri, Jul 9, 2010 at 11:13 AM, Mark Carter mjc1...@googlemail.com wrote:
  On 7 July 2010 20:58, Vladimir Lebedev-Schmidthof dair@gmail.com
  wrote:

  Hello Mark,

  I faced the same problem with attrs.xml in Library Project. Have you
  finally found the solution?

  Sorry Vladimir - I stopped using the Library Project system I while ago -
  and never found a solution to that particular problem.

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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.

 Please do not send me questions directly. 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] Android 2.2 and 3 stencil set

2010-08-03 Thread Ryan
Hello,

I've got some great ideas and i wonder what tools are people using to
develop wire frames for android applications?

I've found this:
http://www.graffletopia.com/stencils/578

And obviously the source is available to make my own stencil but i was
wondering what google uses internally and whether it could be
released?

I'm looking for a stencil set that works with google docs.

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] Launch an Android App from an HTML webpage

2010-08-03 Thread Mgengo
Hello all,

Apologies if this has already been posted, but I did search the group
before writing.

I am trying to launch an Android app via a hyperlink from an HTML site
- i.e. tel:+448458001020 would call play.com from my phone upon
clicking the button that has aforementioned hyperlink.
Or putting a hyperlink on a button geo:0,0?z=17 opens up google maps
on my phone with my location at a zoom of 17, mailto:n...@email.com
would email and obviously http:// would take the user to another
webpage.

Is it possible to launch an Android app already installed on the phone
this way?

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] TouchListener invoked twice

2010-08-03 Thread Manish Sharma
Hi All,

I am facing  a problem. I have implemented a touchlistener. i touch
the button once but the listener is invoked twice.
Please suggest.

Thanks in advance.
Manish Sharma

-- 
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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Tommy
Hm this is strange. The trapster app uses google maps and it seems to work.
I am to tired to continue messing with this random crap tonight, Time for
some Modern Warfare 2. I'll get that source code tomorrow from the first
link you gave and see if that works on the device if so I'll try to dissect
it to see where the difference is. 

In order to use the maps do you have to place the uses-library tag inside
the application tag in the manifest or are there other ways of using it?
If i still can't get it to work I might just publish the app to the market
download to the HTC from there and see if it works when installed from the
market. Maybe it has something to do with ATT and their BS lockdown of the
android OS.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Tuesday, August 03, 2010 8:01 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

On Tue, Aug 3, 2010 at 7:46 PM, Tommy droi...@gmail.com wrote:
 Yeah its right from the store new. And Yeah there is a google maps app on
 the aria

Well, now, that's disturbing.

First, try this project:

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/

That'll eliminate some coding error as being the source of your
difficulty. I expect this app will fail, too, but you never know.

If I'm correct, and that app fails, try browsing the Market on the
Aria and see if you can download any existing apps that integrate
Maps. Puttering through Androlib, it looks like GPS Compass Map might
use it:

http://www.androlib.com/android.application.com-gpscompassmap-jjqnj.aspx

If you don't see any apps that appear to use Maps, or you cannot
install them, then there's something messed up either with the Aria in
general or, somehow, your device specifically.

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

Android Development Wiki: http://wiki.andmob.org

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

-- 
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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Mark Murphy
On Tue, Aug 3, 2010 at 9:47 PM, Tommy droi...@gmail.com wrote:
 In order to use the maps do you have to place the uses-library tag inside
 the application tag in the manifest or are there other ways of using it?

No, that's pretty much it.

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

Android Development Wiki: http://wiki.andmob.org

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


Re: [android-developers] Re: Many app share one Class?

2010-08-03 Thread 汪健飞
ok,I see

在 2010年8月3日 下午8:35,James Becwar jbec...@gmail.com写道:

 You need to make a JAR and add them to both projects as external libs.
 -James
 http://www.jamesbecwar.com


 On Aug 3, 12:04 am, 汪健飞 wangjf...@gmail.com wrote:
  I mean don't find MessageVo in the testTwoApp,because testTwoApp and
  MessageVo don't together project.
 
  2010/8/3 Floaters puhao7117...@gmail.com
 
 
 
 
 
   I think it's easy, maybe you can refre this document:
  http://developer.android.com/guide/topics/intents/intents-filters.html
 
   2010/8/3 汪健飞 wangjf...@gmail.com
 
   I want many app share one class,for example,I have MessageVo,I want
   testApp and testTwoApp share MessageVo.but I don't know TestTwoApp use
   MessageVo.
 
   --
   Cary
 
   --
   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.comandroid-developers%2Bunsubs
 cr...@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.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Cary

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




-- 
Cary

-- 
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: Update delete a directory and how to prevent this from happening?

2010-08-03 Thread Mystique
Thanks Mark, I have your books and use it here and there.
I didnt use getExternalFilesDir(), I hardcore it directly. You mean a
bug if I had getExternalFilesDir() in my code and it will delete the
directory each time I call it?


On Aug 4, 1:23 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 3, 2010 at 12:43 PM, Mystique joven.ch...@gmail.com wrote:
  Yep, sounds logical and that is what I understood too. I have the
  directory in the SD and I believe it should not be deleted.

 Oh, wait. If you're using the new getExternalFilesDir(), what you are
 experiencing is a bug. I'd consider holding off using that until
 Gingerbread.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
It's long been my opinion that the minimum development environment
should be 8 GB, quad core. And, ideally, solid-state disks.

Definitely *NOT* a 5200 RPM or slower hard drive! Ever!

I run on a 4GB, dual core laptop, SATA 7200 RPM hard drive. But I've
also run on 8 GB, quad core, and know what a difference it makes.

I figure there's no point in replacing my computer until I can hit
that benchmark. This was the benchmark about 4 years ago.

But it makes a HUGE difference what else you are running. Here are
some of the worst offenders:
* GMail -- any browser.
* Firefox -- any content
* Eclipse -- don't open more stuff than you need. And you can
experiment with giving it more memory, so it doesn't have to GC quite
as often. But that makes the GCs it does do touch somewhat more pages.

Also, make sure your hard drive is defragmented, and that you clean up
your temp directories from time to time. A huge temp directory can
make a lot of things really beat on the disk as they do trivial things
with tiny temp files. It's surprisingly easy to get a huge temp
directory over time.

And finally: Pay attention to antivirus and online backup software
configuration. You do NOT want your antivirus software looking at
every file you touch in your build tree. You do NOT want your backup
software instantly backing up every intermediate file created during
the build process.

Still, insufficient memory is the biggest cause of poor development
environment performance in my experience. Eclipse does a huge amount
of stuff for you, but it requires RAM to hold all that parse data,
etc. Closing editor buffers, projects you don't actively need (like
the demo project!), etc. can significantly reduce Eclipse's memory
usage.


On Jul 30, 4:22 am, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I'm on Win7 32-bit with 4GB RAM. Why my Eclipse always become so slow
 until it take so long to response to my mouse or keyboard. I have to
 force terminate it, restart and use it for like 20min and repeat the
 same thing again...

 Anyone facing this or have experience dealing with it?

 Regards.

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


[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread dm1973
if (Platform.OS == BLACKBERRY){
   // DO blackberry
}else{
 // DO JAVA
}

class Platform{
static final int OS = BLACKBERRY;
}

The only trick part is doing the imports. Stub classes are a one way.
Interfaces (don't worry about the performance overhead. Count on the
JIT to optimize the code until it is proven to be a problem. HotSpot
is great at optimizing simple cases like this. I expect Dalvik will be
also in  another year) are another way. You could also do a build
system approach (include different versions depending on what you are
doing). Even in C/C++ #define code like this is rarely the best way to
go. I always put platform specific code in platform specific files.
Some of that is personal preference but my team found it much easier
to maintain.





On Aug 3, 1:39 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote:
 On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list 
 the faults of the C language, the
  preprocessor is very near the top.

 Just your opinion.
  That's why C++ went to great lengths to mostly remove the need for
  using it, with inline functions, constants, and the like.

 Now your just talking specifically about macros which still can be
 useful and there are somethings that can only be done using a macro. It's 
 too bad they didn't remove it. It causes all kinds of difficulty
  for tools. The tools for Java are generally far better than for C++ --
  and the lack of a preprocessor to screw up and ambiguate the
  interpretation of any piece of syntax you look at, is a huge part of
  the reason.

 MS tools destroy what Java has to offer IMHO.  Only the re-factoring is
 better for Java.  It's all opinion either way.

 I think you have to realize that preprocesing is just a tool and isn't
 to be used to solve all problems.  Just because I want a hammer doesn't
 mean I regard every issue as being a nail.  It's very appropriate to
 handle cross platform issues, hardware issue, diagnostic code etc.  All
 of these issues are very relevant to Android.  Sure these issues might
 be handled differently for a desktop solution where resources aren't as
 big of an issue.

 Why force everyone to do it the so called right way?  Why does C# have
 conditional compile?  Just because SUN chose not to support
 preprocessing in javac doesn't mean they aren't behind it.  Maybe they
 chose to support it through tools so that j2me code would still work
 with j2se?  That would make a lot of sense to me.  For something they
 aren't behind they sure put a lot of effort into it.





  It's also a major compilation performance hit. With a significant
  amount of pain, you can get Visual Studio to avoid a lot of the
  reparsing it requires, but the language basically says that to compile
  any particular program file, you have to parse all the #includes,
  recursively, processing the same file over and over and over again --
  possibly differently each and every time, because INTEGER may mean int
  in one case, unsigned int in another, and unsigned long long in yet
  another.

  And that's a problem for programmers, too. No, I don't mean a problem
  for me, that a good C++ programmer knows how to avoid the problems. I
  mean its a problem I've had to help MANY experienced C++ programmers
  resolve time and time again -- often in vendor-supplied code, rather
  than their own. Or when two different vendor's include files conflict
  -- or one vendor's include files conflict with their own.

  My long experience is that every time someone tells me they need a
  preprocessor -- there turns out to be a better way. Sometimes you
  replace that with code generation -- but most of the time, code
  generation isn't the ultimate solution, either. Often, proper use of
  introspection and metadata (the annotation facility, for example)
  provide a superior (more robust, more compact, and more maintainable)
  solution.

 Solve this one for me.  BlackBerry has a version of atan2 that is
 fixed-point and is much faster that the Math.atan2.  How can I take
 advantage of this without an interface or an extra function call?

      public static final float VecToHeading( float x, float y )
      {
 //#if PLATFORM_BLACKBERRY
          float    fAngle = ((float)Fixed32.atand2( (int)(x * 65536.0f), 
 (int)(y * 65536.0f) )) / 65536.0f;
 //#else
 //@        float    fAngle = ((float)Math.atan2( x, y )) * 
 57.295779513082320876798154814105f;
 //#endif
          if ( fAngle  0.0f )
              return fAngle + 360.0f;

          return fAngle;
      }

 Here is another one. The math function is in two different packages.

 //#if PLATFORM_BLACKBERRY
         omega = (float)net.rim.device.api.util.MathUtilities.acos( cosom );
 //#else              
 //@     omega = (float)java.lang.Math.acos( cosom );
 //#endif

  And that includes the use here -- of selecting what code to run. For
  that, often the solution lies in correct modularity of the program.

  Trust me -- littering your code with conditionals does 

Re: [android-developers] Re: Update delete a directory and how to prevent this from happening?

2010-08-03 Thread Mark Murphy
On Tue, Aug 3, 2010 at 9:52 PM, Mystique joven.ch...@gmail.com wrote:
 Thanks Mark, I have your books and use it here and there.

Thanks!

 I didnt use getExternalFilesDir(), I hardcore it directly.

That is not a good idea, though I think you are confusing two methods.
Environment has a getExteranlStorageDirectory() method, which points
to the root of the external storage (e.g., /mnt/sdcard). I was
referring to the getExternalFilesDir() method on Context, new to
Android 2.2:

http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String)

 You mean a
 bug if I had getExternalFilesDir() in my code and it will delete the
 directory each time I call it?

No, but a bug in getExternalFilesDir() will cause that directory to be
deleted on an upgrade, which I thought was your problem.

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

Android Development Wiki: http://wiki.andmob.org

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


[android-developers] How to use Intent in the service?

2010-08-03 Thread 汪健飞
I want startActivity in the service.first I new Intent(),but I don't know
how to new Intent().Because Activity and Service don't together project.I
don't know Intent how to find this Activity.

-- 
Cary

-- 
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 preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
To take this a bit further: Platform can be an Enum, that implements
an IPlatform interface, and you can attach methods to BLACKBERRY and
friends to do the platform-specific stuff.

Then this becomes:

Platform.OS.doStuff();

And you don't have to touch it when you add a new platform.

On Aug 3, 6:55 pm, dm1973 david050...@gmail.com wrote:
 if (Platform.OS == BLACKBERRY){
    // DO blackberry

 }else{
  // DO JAVA
 }

 class Platform{
     static final int OS = BLACKBERRY;

 }

 The only trick part is doing the imports. Stub classes are a one way.
 Interfaces (don't worry about the performance overhead. Count on the
 JIT to optimize the code until it is proven to be a problem. HotSpot
 is great at optimizing simple cases like this. I expect Dalvik will be
 also in  another year) are another way. You could also do a build
 system approach (include different versions depending on what you are
 doing). Even in C/C++ #define code like this is rarely the best way to
 go. I always put platform specific code in platform specific files.
 Some of that is personal preference but my team found it much easier
 to maintain.

 On Aug 3, 1:39 pm, Leigh McRae leigh.mc...@lonedwarfgames.com wrote:



  On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list 
  the faults of the C language, the
   preprocessor is very near the top.

  Just your opinion.
   That's why C++ went to great lengths to mostly remove the need for
   using it, with inline functions, constants, and the like.

  Now your just talking specifically about macros which still can be
  useful and there are somethings that can only be done using a macro. It's 
  too bad they didn't remove it. It causes all kinds of difficulty
   for tools. The tools for Java are generally far better than for C++ --
   and the lack of a preprocessor to screw up and ambiguate the
   interpretation of any piece of syntax you look at, is a huge part of
   the reason.

  MS tools destroy what Java has to offer IMHO.  Only the re-factoring is
  better for Java.  It's all opinion either way.

  I think you have to realize that preprocesing is just a tool and isn't
  to be used to solve all problems.  Just because I want a hammer doesn't
  mean I regard every issue as being a nail.  It's very appropriate to
  handle cross platform issues, hardware issue, diagnostic code etc.  All
  of these issues are very relevant to Android.  Sure these issues might
  be handled differently for a desktop solution where resources aren't as
  big of an issue.

  Why force everyone to do it the so called right way?  Why does C# have
  conditional compile?  Just because SUN chose not to support
  preprocessing in javac doesn't mean they aren't behind it.  Maybe they
  chose to support it through tools so that j2me code would still work
  with j2se?  That would make a lot of sense to me.  For something they
  aren't behind they sure put a lot of effort into it.

   It's also a major compilation performance hit. With a significant
   amount of pain, you can get Visual Studio to avoid a lot of the
   reparsing it requires, but the language basically says that to compile
   any particular program file, you have to parse all the #includes,
   recursively, processing the same file over and over and over again --
   possibly differently each and every time, because INTEGER may mean int
   in one case, unsigned int in another, and unsigned long long in yet
   another.

   And that's a problem for programmers, too. No, I don't mean a problem
   for me, that a good C++ programmer knows how to avoid the problems. I
   mean its a problem I've had to help MANY experienced C++ programmers
   resolve time and time again -- often in vendor-supplied code, rather
   than their own. Or when two different vendor's include files conflict
   -- or one vendor's include files conflict with their own.

   My long experience is that every time someone tells me they need a
   preprocessor -- there turns out to be a better way. Sometimes you
   replace that with code generation -- but most of the time, code
   generation isn't the ultimate solution, either. Often, proper use of
   introspection and metadata (the annotation facility, for example)
   provide a superior (more robust, more compact, and more maintainable)
   solution.

  Solve this one for me.  BlackBerry has a version of atan2 that is
  fixed-point and is much faster that the Math.atan2.  How can I take
  advantage of this without an interface or an extra function call?

       public static final float VecToHeading( float x, float y )
       {
  //#if PLATFORM_BLACKBERRY
           float    fAngle = ((float)Fixed32.atand2( (int)(x * 65536.0f), 
  (int)(y * 65536.0f) )) / 65536.0f;
  //#else
  //@        float    fAngle = ((float)Math.atan2( x, y )) * 
  57.295779513082320876798154814105f;
  //#endif
           if ( fAngle  0.0f )
               return fAngle + 360.0f;

           return fAngle;
       }

  Here is another one. The math function 

Re: [android-developers] Re: LVL returns always LICENSED...

2010-08-03 Thread Trevor Johns
Hi everyone,
So far, I haven't been able to reproduce this on my end. If you're getting
LICESNED response from an paid application on a brand new test account (not
the developer of the application, and not listed as a test account) which
hasn't purchased the application, can you please send me:

1. A copy of your logcat output.

2. The name of the test account you're using, as well as your developer
account. (We can check the server logs and hopefully see what response we're
sending you.)

3. The environment you're running under. (Phone model, OS version, OS build,
etc.)

3. (Optional, but highly useful.) The source code to a simple application
which demonstrates this behavior. (A modified version of the sample app
that's published with the library would be perfect.)

-- 
Trevor Johns
Google Developer Programs, Android
http://developer.android.com



On Tue, Aug 3, 2010 at 12:49 AM, Kirky rob.kirkbr...@gmail.com wrote:

 Devesh:

 Yes that's clear to me but shouldn't any phones that are not synced to
 accounts listed in the portal simply just get not NOT_LICENSED back
 from the service?

 --
 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] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Dianne Hackborn
It may help a lot to actually include the log output during the install to
see what error messages are printed.

On Tue, Aug 3, 2010 at 6:47 PM, Tommy droi...@gmail.com wrote:

 Hm this is strange. The trapster app uses google maps and it seems to work.
 I am to tired to continue messing with this random crap tonight, Time for
 some Modern Warfare 2. I'll get that source code tomorrow from the first
 link you gave and see if that works on the device if so I'll try to dissect
 it to see where the difference is.

 In order to use the maps do you have to place the uses-library tag inside
 the application tag in the manifest or are there other ways of using it?
 If i still can't get it to work I might just publish the app to the market
 download to the HTC from there and see if it works when installed from the
 market. Maybe it has something to do with ATT and their BS lockdown of the
 android OS.

 -Original Message-
 From: android-developers@googlegroups.com
 [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
 Sent: Tuesday, August 03, 2010 8:01 PM
 To: android-developers@googlegroups.com
 Subject: Re: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

 On Tue, Aug 3, 2010 at 7:46 PM, Tommy droi...@gmail.com wrote:
  Yeah its right from the store new. And Yeah there is a google maps app on
  the aria

 Well, now, that's disturbing.

 First, try this project:

 http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/

 That'll eliminate some coding error as being the source of your
 difficulty. I expect this app will fail, too, but you never know.

 If I'm correct, and that app fails, try browsing the Market on the
 Aria and see if you can download any existing apps that integrate
 Maps. Puttering through Androlib, it looks like GPS Compass Map might
 use it:

 http://www.androlib.com/android.application.com-gpscompassmap-jjqnj.aspx

 If you don't see any apps that appear to use Maps, or you cannot
 install them, then there's something messed up either with the Aria in
 general or, somehow, your device specifically.

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

 Android Development Wiki: http://wiki.andmob.org

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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.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

[android-developers] Re: Android preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
Well, perhaps this illustrates your second point, but:

http://tinyurl.com/sun-concurrent-gc

Or it may be that they're not concurrent enough for you. Concurrency
isn't an absolute, and there are various ways of describing the upper
bounds on how much delay a concurrent algorithm can impose on other
threads. (Your point about stringent response time requirements
suggests this may be your issue with calling it concurrent).

GC benchmarking is hard work and tricky, and I haven't done it in a
long time. I appreciate the anecdotal data; do you have benchmarks
behind it? You've aroused my curiosity about the current state.

I have generally been more concerned with compatibility in huge code
bases rather than performance differences (which can generally be
overcome with hardware -- not concurrency, though), so I've mostly
avoided non-Sun JVMs when possible. But I like that there are
alternatives of increasing quality.

Especially given recent corporate history...

Thanks.

On Aug 3, 6:07 am, DanH danhi...@ieee.org wrote:
 Well, none of Sun's implementations are concurrent -- they all force
 the application to stop for a time.  They're not generally well-
 designed for LARGE applications (eg, a fast 8-way running a heavy
 transaction system), or anything with really stringent response time
 requirements.  The IBM iSeries Java implementation ran rings around
 Sun's, and the newer IBM portable Java implementation runs rings
 around the iSeries implementation.

 One of the problems with Sun's GC scheme is the vast number of
 parameters -- no one understands them, or how to set them for a given
 set of circumstances (especially if those circumstances vary
 dynamically).

 On Aug 2, 9:57 pm, Bob Kerns r...@acm.org wrote:



  OT, but I'll bite.

  What do you consider a really good GC setup?

  Sun's GC is good enough that I would hesitate to make blanket
  statements that it is better than X or worse than X. (Though I will
  say that the newer Sun GC implementations are clearly better than the
  older ones). There are a lot of different parameters to evaluate a GC
  by -- and not just CPU overhead.

  I don't ask in order to dispute your choice, BTW -- just to understand
  what you're considering a good GC and why -- and perhaps learn of a
  really good GC I don't know about!

  (It's been a while, but I've implemented, debugged, and maintained a
  number of GCs over the years, and worked with many of the true
  pioneers in the field of GC.  So you can see why I'm curious).

  On Aug 2, 12:53 pm, DanH danhi...@ieee.org wrote:

   (don't get me started on GC based languages)

   I know it's off-topic, but I have to say something.  Having done large
   applications in both I much prefer GCed languages (provided the GC is
   well implemented).  More robust and less overhead (yes, faster), with
   fewer ways for the programmer to shoot himself in the foot.
   (Unfortunately, Sun's GC implementations are only mediocre, so it's
   possible you've never seen a really good GC setup.)

   On Aug 1, 2:33 pm, RichardC richard.crit...@googlemail.com wrote:

My background is C and C++ ... 25 years and no longer counting :)

So I had some ingrained expectations when I started learning Java;
amongst them was the expectation that the Java language would support
conditional compliation.

I have had to learn to live without conditional compliation.  The only
area where I really miss having a lanugage constuct like #ifdef is
when I need to remove instrumentation and/or debugging code.  I now
write less of this type of code and try to remember to mark what I do
wite with a remove me comment, which gets picked up by the Eclipse
to-do list.  I then remove it during my pre-QA code review.

I have yet to feel the need to use conditional compilation to deal
with the often quoted platform fragmentation as the differences in
the platforms mostly impacts the amout of time I spend testing and I
have yet to write ANY code that differs by supported hardware.  Using
the resource qualifiers has been all I have needed to do so far.

I still don't like some aspects of the Java language (don't get me
started on GC based languages) but Android is much more than just a
language and writing off a complete platform for one feature you
consider missing is very strange position to take.

On Jul 31, 11:09 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

 I'm sorry for my rude and really not too much kind speaking,
 but I can't belive that android doesn't support preprocessor.

 I can't think on mobile programming without preprocessor, too many
 different configurations,
 think only to LVL and android market and preprocessor could be
 useful...
 Ok we can live without it, but codes becomes really unelegant...
 Sincerely I really don't like the non preprocessor way but
 unfortunantly,
 masses told that android is good and I need to 

RE: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

2010-08-03 Thread Tommy
So this is STRANGE I was thinking about what you said the error meant
and a feature not being available. Well I use the camera and I have the
uses-feature android:name=android.hardware.camera.flash /. Now the HTC
aria has no flash but my droid does. Whenever i place the code for the maps
lib it causes the error BUT if i remove uses-feature
android:name=android.hardware.camera.flash / and keep the maps lib
refrence there IT WORKS haha. 


Next question is. How do I allow cameras that have a flash to use
uses-feature android:name=android.hardware.camera.flash / and phones
without a flash not to use uses-feature
android:name=android.hardware.camera.flash / 

?

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Tuesday, August 03, 2010 9:50 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] INSTALL_FAILED_MISSING_FEATURE Question

On Tue, Aug 3, 2010 at 9:47 PM, Tommy droi...@gmail.com wrote:
 In order to use the maps do you have to place the uses-library tag
inside
 the application tag in the manifest or are there other ways of using it?

No, that's pretty much it.

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

Android Development Wiki: http://wiki.andmob.org

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

-- 
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: Why is Android so buggy?

2010-08-03 Thread Dianne Hackborn
On Tue, Jun 15, 2010 at 7:08 AM, Zigurd zigurd.medni...@gmail.com wrote:

 It looks like Google has about 7 people working on bug fixing plus a
 few other engineers with assigned issues. So it looks like there is no
 resource imbalance.


For what it's worth, all engineers work on bug fixing (and this is well more
than 7).  Only a few interact with the public bug system; there is an
internal issue tracker where most of the bug activity happens.  (And most of
that is not stuff you'll be aware of, because it involves feature work and
bug fixing / stabilization of those new features prior to pushing out a new
platform.)

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

[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Doug
The issue isn't what else is running on the computer.  The issue is
that Eclipse gets into an unrecoverable state where it lags horribly
when switching between editors, at least on OSX.  I can typically go 5
or 6 hours of steady use (more with intermittent use) until that state
kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
apps at that point doesn't make any difference.  The resource leak
explanation is the only one that makes sense given my observations,
which are daily since I do this to pay my mortgage.

-- 
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] Does all Android Devices support Map API

2010-08-03 Thread Dianne Hackborn
As far as I know, yes, but this is not a guarantee.  This is not something
you need to worry about, because to use the maps API you need to have
uses-library in your manifest, and Market will then hide your app from
devices that don't have the library.

You can also do this yourself on newer platforms by making the library
optional and when running use the normal Java facilities to check if the
maps APIs are available in your ClassLoader.

On Mon, Aug 2, 2010 at 9:06 PM, Jingwen Xiong jeanie_...@hotmail.comwrote:

 Hi all,

 I am currently developing an android application that uses android
 google map API.
 I am wondering does all android devices support this add-on api??
 If not, how could I detect wheter the device support or doesn't
 support map API programatically.

 Any comments and suggestion are welcome.

 Thanks very much!

 Jingwen

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

[android-developers] Re: LVL - live test

2010-08-03 Thread Trevor Johns
Richard,
Could you please let me know what email address you're using for the
test account? (Feel free to email me off-list if you'd like.) We
should be able to pull the server logs and see what's happening here.

Also, can you let me know how you've published this application? I
seem to be getting an error when I try to pull up the details for
com.apptude.android.apps.test.lvltest using the Android Market admin
tools. (I can definitely see an entry for it, but no details. Is it
saved as a draft right now?)

--
Trevor Johns
Google Developer Programs, Android
http://developer.android.com

On Aug 2, 2:51 am, RichardC richard.crit...@googlemail.com wrote:
 Update - tried it on my phone - same result LVL Test is ALLOWED; note:
 my phone (HTC Magic) was not using my Market Account.

 On Aug 2, 6:02 am, a1 arco...@gmail.com wrote:

  I do not test on emulator, since my games are GL based emulator is
  unusable (also it's slower than actual device), but from what I read
  LVL do not work on emulator, it's only stub implementation since
  actual LVL relies on vending app (market) for making calls to market
  server.

 Incorrect - from the 
 docs:http://developer.android.com/guide/publishing/licensing.html#runtime-...

 Because the standard Android platforms provided in the Android SDK do
 not include Android Market, you need to download the Google APIs Add-
 On platform, API Level 8 (or higher), from the SDK repository. After
 downloading the add-on, you need to create an AVD configuration that
 uses that system image. 

 ...

 Several versions of the add-on are available in the SDK repository,
 but only Google APIs Add-On, API 8 (release 2) or higher version of
 the add-on includes the necessary Android Market services. This means
 that you cannot use Google APIs Add-On API 7 or lower as a runtime
 environment for developing licensing on an emulator.

-- 
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: LVL - live test

2010-08-03 Thread Trevor Johns
Also, can you confirm that if you use your developer account and set
the test response in the Market publisher console to NOT_LICENSED, you
get a NOT_LICENSED response in your application?

--
Trevor Johns
Google Developer Programs, Android
http://developer.android.com


On Aug 3, 7:19 pm, Trevor Johns trevorjo...@google.com wrote:
 Richard,
 Could you please let me know what email address you're using for the
 test account? (Feel free to email me off-list if you'd like.) We
 should be able to pull the server logs and see what's happening here.

 Also, can you let me know how you've published this application? I
 seem to be getting an error when I try to pull up the details for
 com.apptude.android.apps.test.lvltest using the Android Market admin
 tools. (I can definitely see an entry for it, but no details. Is it
 saved as a draft right now?)

 --
 Trevor Johns
 Google Developer Programs, Androidhttp://developer.android.com

 On Aug 2, 2:51 am, RichardC richard.crit...@googlemail.com wrote:



  Update - tried it on my phone - same result LVL Test is ALLOWED; note:
  my phone (HTC Magic) was not using my Market Account.

  On Aug 2, 6:02 am, a1 arco...@gmail.com wrote:

   I do not test on emulator, since my games are GL based emulator is
   unusable (also it's slower than actual device), but from what I read
   LVL do not work on emulator, it's only stub implementation since
   actual LVL relies on vending app (market) for making calls to market
   server.

  Incorrect - from the 
  docs:http://developer.android.com/guide/publishing/licensing.html#runtime-...

  Because the standard Android platforms provided in the Android SDK do
  not include Android Market, you need to download the Google APIs Add-
  On platform, API Level 8 (or higher), from the SDK repository. After
  downloading the add-on, you need to create an AVD configuration that
  uses that system image. 

  ...

  Several versions of the add-on are available in the SDK repository,
  but only Google APIs Add-On, API 8 (release 2) or higher version of
  the add-on includes the necessary Android Market services. This means
  that you cannot use Google APIs Add-On API 7 or lower as a runtime
  environment for developing licensing on an emulator.

-- 
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: LVL returns LICENSED with anonymous accounts...

2010-08-03 Thread Trevor Johns
Yes, it's necessary. We need the application to be listed in Android Market
so that we can actually check and see if you've purchased it. (We send the
package name and version code of the application to the licensing server --
if your app isn't published, we won't find a match for the package name.)

Also, your developer account will always return a test response or
NOT_LICSENSED (since you can't purchase your own app), so you'll need to
test with a temporary account if you want to test the behavior an end user
will see.

-- 
Trevor Johns
Google Developer Programs, Android
http://developer.android.com

On Tue, Aug 3, 2010 at 11:00 AM, OldSkoolMark m...@sublimeslime.com wrote:

 I'm seeing the same behavior using the sample activity, using the
 gmail account that is associated with my developer account. The one
 thing I haven't done is upload the sample activity APK to the Market.
 Is that necessary?

 On Aug 2, 12:45 pm, Trevor Johns tjo...@google.com wrote:
  It's a little hard to figure out what the initial report is describing
 here,
  but I suspect it's this:
 
  The test response settings in the Market publisher console only affect
 users
  who are (a) the developer who owns the publisher account, or (b) listed
 as
  test accounts.
 
  Normal users are unaffected by the test response setting. This is so
 that
  you can test your account without disturbing users who have already
  purchased your application.
 
  So, if your dummy account purchased the application, they should always
 be
  getting LICENSED -- because they purchased the application. (Likewise, if
  you sideload an application onto phone that's using a dummy account that
  hasn't ever purchased the application, they'll get NOT_LICENSED.)
 
  There's also one exception to this: free apps. While we won't allow
  uploading a free APK that uses the CHECK_LICENSE permission to the Market
  publisher console, *requests* for these applications currently will
 always
  return LICENSED. However, since (again) you can't upload these APKs, this
  isn't something that should happen often.
 
  --
  Trevor Johns
 
  On Mon, Aug 2, 2010 at 1:30 AM, ojpdev ojp...@gmail.com wrote:
   I'm getting the same problem. It works on two phones (Nexus One and
   HTC Hero). Fails on a HTC Legend. Not sure whether that's important or
   not!
 
   I don't understand how it can say it's licensed.
 
   On Aug 1, 11:46 am, sblantipodi perini.dav...@dpsoftware.org wrote:
I opened a similar thread recently but I doesn't let me enter any new
post on it so I opened a new one.
 
I'm having problem with LVL, I'm using the MainActivity.java
from the LVL sample.
 
When I call the check() method from LVL it always returns LICENSED.
The strange things is that with my developer account it works well, I
got licensed, unlicensed etc
on the base of what I set on the developer console.
With dummy email settings I got always LICENSED.
 
It's strange, It always return LICENSED also if I log into different
GMAIL account
into the account and sync in the emulator.
- I deleted AVD,
- recreated a new one,
- logged into the emulator with a gmail account with no rights,
- setted NOT LICENSED form my developer console,
- installed the software on the new avd.
 
In this way, If I login the emulator with the developer account it
works well,
if I login with an anonimous email address it always return LICENSED.
 
Is this a bug? I have no idea on how to go forward.
 
   --
   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

Re: [android-developers] Re: Android Market Licensing: Now Available!

2010-08-03 Thread Trevor Johns
And even if you skip the request refund step, we'll see a large number of
license checks for a single account in our logs.

So, not only can we disable that account, but we'll also know who was
responsible. :P

-- 
Trevor Johns
Google Developer Programs, Android
http://developer.android.com

On Tue, Aug 3, 2010 at 3:43 AM, Mark Carter mjc1...@googlemail.com wrote:

 As soon as you request a refund then the license server will return
 NOT_LICENSED for that Google account.


 On 3 August 2010 12:37, andreas.walt...@googlemail.com 
 andreas.walt...@googlemail.com wrote:

 On Jul 31, 11:21 pm, keyeslabs keyes...@gmail.com wrote:
  ... someone to crack the
  app.  The process looks something like this:  decompile the apk using
  a freely available open source tool, find the code that invokes the
  licensing check, skip it, recompile and repackage the apk.

 Isn't there is a much simpler way to circumvent the whole thing due to
 a security leak in the LVL process? (Please tell me I'm wrong!):

 1) create a new google account, e. g. my.wa...@googlemail.com
 2) switch your Android phone to this account
 3) Buy app, copy apk, request refund
 4) Upload apk to warez server
 5) Sell google account and password to interested downloaders. (e. g.
 at a 50% discount compared to the original market price).

 The reason for this is that the license check is google-account-based,
 not device-based. Any device being linked to the google account the
 app has been purchased with will run the app. The licensing mechansim
 will change nothing in this behaviour.

 Andreas

 --
 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.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] Re: LVL - A Massive Concern

2010-08-03 Thread Trevor Johns
I just checked using my Evo running Froyo, and the license check is indeed
mentioned. However, it's not considered dangerous, so you need to click on
Show All to see it.

-- 
Trevor Johns
Google Devloper Programs, Android
http://developer.android.com

On Mon, Aug 2, 2010 at 12:49 PM, Mark Carter mjc1...@googlemail.com wrote:

 When I install an app (with that permission) I don't see the CHECK_LICENSE
 permission mentioned. The other permissions are mentioned but not that one.
 This is on N1 Froyo.

 Am I missing something!?

 On 2 August 2010 21:40, Trevor Johns tjo...@google.com wrote:

 On Mon, Aug 2, 2010 at 12:33 PM, Mark Carter mjc1...@googlemail.comwrote:

 When the user makes a purchase, he usually does not know whether the app
 is LVL-secured or not. Certainly, consider all purchases made before last
 week - the users did not know anything about LVL.


 If a developer uses the LVL, they must request the CHECK_LICENSE
 permission. The user will be informed of this, just like any other
 permission.

 So yes, it's possible to tell at purchase time that an application is
 using the LVL.

 --
 Trevor Johns
 Google Developer Programs, Android
 http://developer.android.com

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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.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] Re: LVL NOT_MARKET_MANAGED

2010-08-03 Thread Trevor Johns
The reason this happens is because we store the RSA keypair used for license
checks on a per-app/per-version basis. The old version of your application
doesn't have a license key associated with it.

(We probably could make this a bit more clear.)

-- 
Trevor Johns
Google Developer Programs, Android
http://developer.android.com

On Sat, Jul 31, 2010 at 2:45 PM, Brian avalo...@caerleon.us wrote:

 I've done some testing on this, myself, and it seems that it only
 returns the NOT_MARKET_MANAGED error for an app in the market if the
 version code (the integer form of the version number in the manifest)
 in the copy making the check is higher than the one currently in the
 market.  If the version code in the copy of the app making the check
 is less than or equal to the current one in the market, then the
 normal license valid/invalid response is given unless there's another
 error.

 That seems acceptable to me, even if it is a bit odd considering the
 docs imply that it indicates only a package name mismatch.

 --
 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: Update delete a directory and how to prevent this from happening?

2010-08-03 Thread Mystique
I did use getExteranlStorageDirectory() method but i realize Android
always mount it to /sdcard I am starting to think why not hardcode.
I guess Google team will not change it (maybe the source /mnt/sdacrd
but not the mount path), then again I guess it is a good practise and
I will change it.
:) thank for the advice.

On Aug 4, 9:55 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 3, 2010 at 9:52 PM, Mystique joven.ch...@gmail.com wrote:
  Thanks Mark, I have your books and use it here and there.

 Thanks!

  I didnt use getExternalFilesDir(), I hardcore it directly.

 That is not a good idea, though I think you are confusing two methods.
 Environment has a getExteranlStorageDirectory() method, which points
 to the root of the external storage (e.g., /mnt/sdcard). I was
 referring to the getExternalFilesDir() method on Context, new to
 Android 2.2:

 http://developer.android.com/reference/android/content/Context.html#g...)

  You mean a
  bug if I had getExternalFilesDir() in my code and it will delete the
  directory each time I call it?

 No, but a bug in getExternalFilesDir() will cause that directory to be
 deleted on an upgrade, which I thought was your problem.

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

 Android Development Wiki:http://wiki.andmob.org

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


Re: [android-developers] Re: A very strange ServerSocket.accept problem

2010-08-03 Thread Alex Xin
Hi Arjun

I'm now trying to implement a Web server, and I use IE and Chrome to connect
to my server.

On Wed, Aug 4, 2010 at 3:38 AM, Arjun arjunf...@gmail.com wrote:

 Can you please show some more information from the log cat..
 and at the same time need to see the client code where it gets
 connected to the server port.

 I think it is sucefully creating the server socket, the problem seems
 with the client and where client is not polling to the server port.

 Thanks,
 Arjun.

 On Aug 3, 8:26 am, Alex Xin xinxi...@gmail.com wrote:
  Hi Oscar
 
  I have no firewall installed..
 
  Alex
 
  On Tue, Aug 3, 2010 at 11:11 PM, Oscar oscar...@gmail.com wrote:
   Do you have a firewall or something like that, it´s maybe the problem
 
   On Aug 3, 8:56 am, Alex Xin xinxi...@gmail.com wrote:
Hi,
 
I have asked this question before but no answers, so I post again
 hope
   that
someone might help me, thank you.
 
I'm now facing a very strange server socket problem, I have a server
 that
will listen on a TCP port, I use the following code to do this work.
 
public class RequestListenerThread extends Thread {
 
private final ServerSocket serversocket;
 
public RequestListenerThread(int port, final String docroot)
throws IOException {
this.serversocket = new ServerSocket(port);
setDaemon(true);
 
}
 
public void run() {
Log.v(FE, SMB Server Listening on port 
+ this.serversocket.getLocalPort());
 
while (!Thread.interrupted()) {
try {
// Setup incoming client connection
Socket socket = this.serversocket.accept();
Log.v(FE, Incoming connection from 
+ socket.getInetAddress());
// Start worker thread
Thread t = new WorkerThread(socket);
t.start();} catch (InterruptedIOException ex) {
break;
} catch (IOException e) {
 
Log.v(FE, Network I/O error: 
+ e.getMessage());
break;}
}
}
 
}
 
My target device is running on Android 1.6  2.1
 
When I run this code, it can start to listen on port but can't accept
 any
incoming connections. When it runs into serversocket.accept function,
 it
never return, just like dead lock.
 
I found that if I establish any connections from my phone to
 computer,
   then
my phone could be successfully found that there're incoming
 connections
   and
of course, accept them.
 
In emulator, above code works fine, has no this strange problem.
 
Is that my phone's bug or I have something wrong in my code?
 
Thanks a lot!
 
Alex
 
   --
   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: HTC EVO RTSP issues... Anyone experience issues in this area?

2010-08-03 Thread r01carlsonr
Looks like you aren't alone...

http://forum.androidcentral.com/htc-evo-4g/26814-htc-streaming-media-player-problems.html

http://groups.google.com/group/testtubeandroid/browse_thread/thread/d6882525035d2915

On Aug 3, 7:53 pm, Moto medicalsou...@gmail.com wrote:
 I'm currently getting issues with the RTSP client of the HTC EVO
 running Android 2.2.

 The purpose of this post is to know if anyone has issues in that area
 or if there is known bug on this... Just to know it's not only
 me... :P

 Thanks!
 -Moto!

-- 
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] Why is Android so buggy?

2010-08-03 Thread Alex Xin
Android is buggy, yes, I totally agree with you. The most buggy release is
Froyo, in Froyo, I cannot use Java NIO selector anymore, but it works fine
in previous releases.


On Mon, Jun 7, 2010 at 5:25 AM, blahblah...@gmail.com blahblah...@gmail.com
 wrote:

 It seems that Android is very buggy compared not only to the iPhone,
 but to pretty much any other software. It's not just minor bugs either
 - pretty much every developer will come across many serious bugs. Some
 examples:

 - When you run the sdk setup.exe, the very first thing that happens
 is that it informs you that it can't connect using https, so you have
 to change the options to use 'http' instead. This appears to be a bug
 in the .exe rather than any kind of user issue because the https url
 works fine in the browser and this error seems to affect everyone.
 Sure, it's trivial to work around (just do a google search and you
 figure it out in 5 seconds), but the user shouldn't have to do that.
 It makes it look unprofessional.

 - When you view a TabWidget in the layout editor it crashes.

 - Every time you run an app in the emulator, it starts off with the
 screen locked so you need to press the Menu key.

 - Various socket bugs (or perhaps all the same bug) related to
 IOException not happening. Even something as simple as just trying to
 connect to a remote host that is not listening will cause it to hang
 instead of immediately returning an error.

 All of these bugs have been logged for months (some by me, some by
 other people) with no indication of any fix.

 At the moment I'm just using the emulator, but I'm wondering if the
 phones themselves are this buggy or if all the bugs are just in the
 development environment and emulator.

 --
 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] Do you know the reason why any files cannot be uploaded via android browser?

2010-08-03 Thread Hiko
Hello, everyone.

I have one question regarding the android browser.
As the title of this post, I do not know the reason why any files in
the device cannot be uploaded to the web via android browser.

When I try to upload the file in website,the text dialog where the
file path is usually written is expressed as Uploads Disabled.
If specification that any files is not allowed to upload is
established, then I do not mention.
But, I would like to know the reason why...

Please let me know if you know that reason.

In addition, I verify the behavior of this on SEMC X10i(android 1.6)

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: HTC EVO RTSP issues... Anyone experience issues in this area?

2010-08-03 Thread Moto
So yeah MediaPlayer RTRSP for the HTC EVO is not as good... :(

On Aug 3, 10:44 pm, r01carlsonr overvoltag...@gmail.com wrote:
 Looks like you aren't alone...

 http://forum.androidcentral.com/htc-evo-4g/26814-htc-streaming-media-...

 http://groups.google.com/group/testtubeandroid/browse_thread/thread/d...

 On Aug 3, 7:53 pm, Moto medicalsou...@gmail.com wrote:

  I'm currently getting issues with the RTSP client of the HTC EVO
  running Android 2.2.

  The purpose of this post is to know if anyone has issues in that area
  or if there is known bug on this... Just to know it's not only
  me... :P

  Thanks!
  -Moto!



-- 
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: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread objectuser
Doug, I'm surprised you can go for 5 or 6 hours.  It grinds to a halt
for me in less than an hour.  But I guess it depends on what you're
doing (Java vs resources).

But I'll echo what you said: it's not that the IDE is generally slow,
it's something else that is chewing up resources.  It's not the
emulator, as I can exit that and Eclipse is still the same.  As people
reported above, you can code all you like, but it seems that if you
mess with the resource files, you're doomed.

On Aug 3, 9:17 pm, Doug beafd...@gmail.com wrote:
 The issue isn't what else is running on the computer.  The issue is
 that Eclipse gets into an unrecoverable state where it lags horribly
 when switching between editors, at least on OSX.  I can typically go 5
 or 6 hours of steady use (more with intermittent use) until that state
 kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
 apps at that point doesn't make any difference.  The resource leak
 explanation is the only one that makes sense given my observations,
 which are daily since I do this to pay my mortgage.

-- 
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 preprocessor, //#ifdef...

2010-08-03 Thread Bob Kerns
You have a very limited view of the techniques available.

On Aug 3, 10:39 am, Leigh McRae leigh.mc...@lonedwarfgames.com
wrote:
 On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list 
 the faults of the C language, the
  preprocessor is very near the top.

 Just your opinion.

False:
   Preprocessor usage should be eliminated.
   -Bjarne Stroustrup, An Overview of the C++ Programming Language,
page 3, under table Language-technical rules:

This concept carried over into the C++ standard committee. Hardly
just my opinion. It's not removed, because C compatibility is a
higher-priority concern.

  That's why C++ went to great lengths to mostly remove the need for
  using it, with inline functions, constants, and the like.

 Now your just talking specifically about macros which still can be
 useful and there are somethings that can only be done using a macro.

No, I am not. I have nothing against macros -- on the contrary, I met
my wife teaching a class on macros.

Preprocessors are not the place for them. Lots of languages have
macros without preprocessors. Macros are great! I wish Java had them.

(They do have their drawbacks, but no on the scale of a preprocessor.
And the power of any macros I'd envision is substantially more than is
offered by the C/C++ preprocessor).

 MS tools destroy what Java has to offer IMHO.  Only the re-factoring is
 better for Java.  It's all opinion either way.

Are you comparing MS C++ tools to Java tools, or C# and friends?

Anyway, it's not all opinion. Such comparisons can be done quite
objectively. Which tools you prefer to USE is opinion.

 I think you have to realize that preprocesing is just a tool and isn't
 to be used to solve all problems.  Just because I want a hammer doesn't
 mean I regard every issue as being a nail.  It's very appropriate to
 handle cross platform issues, hardware issue, diagnostic code etc.  All
 of these issues are very relevant to Android.  Sure these issues might
 be handled differently for a desktop solution where resources aren't as
 big of an issue.

Nobody has shown me a case where you need a preprocessor because of
resource issues. Can use, yes, but need, no.

It is HIGHLY INAPPROPRIATE to handle platform issues and hardware
issues -- it makes porting to a new platform a royal nightmare. Your
best shot there is diagnostic code -- and there are better ways,
involving post-processors rather than preprocessors.

 Why force everyone to do it the so called right way?

Because of the cost to everyone else of the feature you are demanding.
Why not put in every hair-brained feature anyone thinks they'd like to
use?

Because LONG experience shows, that approach makes for major problems
with languages, and makes them harder to use. Trust me -- that
approach has had its day in the language-design world. Even a poorly-
designed API, not part of the language, can have a major adverse
impact on the maintainability of a product.

And in extreme cases (but only extreme cases), even personal code-
formatting idiosyncrasies can have a negative impact.

Let people do whatever they want has, after decades of experience,
been found to not be a good idea. A more careful balance must be
sought.

 Why does C# have conditional compile?

To accommodate the masses of C programmers that Microsoft wanted to
attract, of course!

  Just because SUN chose not to support
 preprocessing in javac doesn't mean they aren't behind it.  Maybe they
 chose to support it through tools so that j2me code would still work
 with j2se?  That would make a lot of sense to me.  For something they
 aren't behind they sure put a lot of effort into it.

Or maybe they wanted to attract all those C programmers who are used
to solving every problem with a #ifdef, and aren't willing to update
their approach?

Or maybe because the J2ME people actually WERE former C programmers.

Language purity is not the only design constraint. Soustroup makes
that point himself. Sometimes you make compromises for acceptance.
Computer languages are partly human languages, and human languages are
a cultural artifact that change slowly.

  It's also a major compilation performance hit. With a significant
  amount of pain, you can get Visual Studio to avoid a lot of the
  reparsing it requires, but the language basically says that to compile
  any particular program file, you have to parse all the #includes,
  recursively, processing the same file over and over and over again --
  possibly differently each and every time, because INTEGER may mean int
  in one case, unsigned int in another, and unsigned long long in yet
  another.

  And that's a problem for programmers, too. No, I don't mean a problem
  for me, that a good C++ programmer knows how to avoid the problems. I
  mean its a problem I've had to help MANY experienced C++ programmers
  resolve time and time again -- often in vendor-supplied code, rather
  than their own. Or when two different vendor's include files conflict
  -- or 

Re: [android-developers] TouchListener invoked twice

2010-08-03 Thread Romain Guy
A touch listener is invoked when the finger is put down on the screen,
when the finger moves and when the finger is lifted up. So that's
normal.

On Tue, Aug 3, 2010 at 11:06 AM, Manish Sharma
manish.android.develo...@gmail.com wrote:
 Hi All,

 I am facing  a problem. I have implemented a touchlistener. i touch
 the button once but the listener is invoked twice.
 Please suggest.

 Thanks in advance.
 Manish Sharma

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




-- 
Romain Guy
Android framework engineer
romain...@android.com

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] Re: Android VNC server

2010-08-03 Thread Danke Xie
Hi Anil,

Thanks for the feedback. Because the client gets the resolution and
color depths from the server, we probably don't need to set the
resolution on the client (hopefully). I used several vnc clients, and
they can all get the resolution from the server, so I haven't tried to
force a specific resolution at the client (i could find out how to do
so though). I guess if the client didn't get the right resolution/
color depth, it may mean that the server didn't get them right either.
Did you check the printout when the server starts up? Does it show the
right resolution? If not, can you please turn on DEBUG and
DEBUG_VERBOSE and send me the logs?

Regards,
Danke

On Aug 2, 11:55 pm, Anil Sasidharan anil...@gmail.com wrote:
 Hi Danke,

                  Great job. I've pulled your sources and re-built with
 Android-eclair. I'm able to deploy and run the vnc server on my target
 board. However there is some incompatibility in terms of color/pixel depth
 between my target and host-PC and because of which the vncviewer shows
 garbled display. The configuration of the target platform's display is
 480x800 and 16bpp. Please provide some tips on what config options to be
 passed to  vncviewer.

 Warm Regards,
 Anil



 On Mon, Aug 2, 2010 at 12:49 AM, Danke Xie danke@gmail.com wrote:
  I put together a vnc server for Android. It is based on some existing
  source scattered around like fbvncserver.c, but didn't really work. I
  have fixed up a few issues like missing frames, keyboard and mouse
  input support, and made it a bit faster.

  Can anyone try it and give me some feedback on any issues that you may
  find? The source/doc is hosted onhttp://code.google.com/p/fastdroid-vnc/

  Thanks
  Danke

  --
  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%2Bunsubs 
  cr...@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: TouchListener invoked twice

2010-08-03 Thread Sarwar Erfan
Hi,
It is expected that two MotionEvents will be generated...
First : ACTION_DOWN
Second: ACTION_UP

You can determine which event has occurred using getAction() method.
//===
@Override
public boolean onTouch(View v, MotionEvent event) {

switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:

break;

case MotionEvent.ACTION_UP:

break;

default:
break;
}

return false;
}
//=


By the way, if this is a button and you are not planning for something
special, you can use OnClickListener instead of OnTouchListener.
If you use OnClickListener, then one click event will be generated per
touch. And, also, you can activate the button from keypad also.


Regards
Sarwar Erfan


On Aug 4, 12:06 am, Manish Sharma manish.android.develo...@gmail.com
wrote:
 Hi All,

 I am facing  a problem. I have implemented a touchlistener. i touch
 the button once but the listener is invoked twice.
 Please suggest.

 Thanks in advance.
 Manish Sharma

-- 
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: DDMS Allocations tracker not picking up activity when using a real phone

2010-08-03 Thread Bob Kerns
Also, you meant, unless it is rooted. Though I haven't reviewed your
list in detail, many at least DO work on a rooted device.

On Aug 3, 5:12 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Aug 3, 2010 at 7:58 PM, fadden fad...@android.com wrote:
  On Aug 3, 3:27 pm, Mark Murphy mmur...@commonsware.com wrote:
  Many DDMS features only work on the emulator. It would not surprise me
  if this does not work on a device.

  The Allocation Tracker feature should work equally well on both.
  Pretty much everything but Emulator Control should work, really.  What
  other DDMS features don't work on a device?

 -- Process listing (only see debuggable projects)
 -- File browsing (/data is off limits)
 -- Most of the Sysinfo tab (I only get Memory to work)
 -- The VM Heap tab (Heap updates are NOT ENABLED for this client)

 And, FWIW, the separate hierarchyviewer tool does not work with devices.

 But, you're right, Allocation Tracker does work. My apologies. I also
 probably should have said some rather than many DDMS features
 don't work on devices -- I thought it was a longer list.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: Clarity on Wi-Fi Based application !!??

2010-08-03 Thread StillALearner
Thanks Kostya  Murphy,

I got a better understanding.. Now its time for some hands-on for me :)

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


[android-developers] Re: My Eclipse 3.5 always lag and have to force close - why?

2010-08-03 Thread Bob Kerns
You missed my point, so let me try to make it more clearly.

I wasn't absolving the IDE of blame. I'm saying it interacts with the
other offenders, if you have them.

So if you have a bloated Firefox, for example, the IDE will start to
flail much earlier. In that case, you can buy some time (but not
eliminate the problem) by killing Firefox.

My point about memory is that you will survive MUCH longer on a less
limited machine, and upgrading your hardware is another workaround.
One that I haven't found financially viable at the moment, but, if you
can, definitely try it.

And as objectuser points out, not all aspects of the IDE are to blame.

Running an emulator worsens things, since that needs memory.
Basically, everything you do that needs significant memory, will cause
you to start to flail earlier.

It's definitely not just Eclipse and Android, however. At 4 GB I can
end up in this state with various applications, without anything
Eclispe- or Android-related running.

I find I have to restart GMail (in Chrome, no less) about as often as
often as I have to restart Eclipse. Hmm, what do these two have in
common?

But that will depend on your usage patterns, too.

I will say, it is not just Android programming, and not just resource
files that will do Eclipse in. But I do think they worsen it -- either
making heavy use of a leaking facility, or adding their own new leaks
to the puddle.

So my advice is, restart Eclipse often, but also look at the other
factors. If you're lucky that will help reduce, but eliminate, the
need to restart.

On Aug 3, 7:17 pm, Doug beafd...@gmail.com wrote:
 The issue isn't what else is running on the computer.  The issue is
 that Eclipse gets into an unrecoverable state where it lags horribly
 when switching between editors, at least on OSX.  I can typically go 5
 or 6 hours of steady use (more with intermittent use) until that state
 kicks in for me (MacBook Pro, 4GB, 2.4GHz Core 2 Duo).  Quitting other
 apps at that point doesn't make any difference.  The resource leak
 explanation is the only one that makes sense given my observations,
 which are daily since I do this to pay my mortgage.

-- 
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: Setting an Intent extra value that's an array of String and Integer

2010-08-03 Thread Sarwar Erfan
Hi,
You can try concatenating the foo's into a single string delimited by
some character that will NOT appear in any of the strings. For
example, I am assuming pipe character (|) will never appear in any of
the strings you want to pass.
Then, create a string like:

7|Hello|This is another string|1123|
Put this string as extra. In the receiving part, tokenize the string
by |, then you get all the elements.

Regards
Sarwar Erfan


On Aug 4, 2:02 am, Herb Jellinek herb.jelli...@gmail.com wrote:
 I have a program that sends a broadcast Intent that needs an extra
 value.  The value is declared as being of type Object[], though I know
 that the elements are always of type Integer or String.  That's part
 of an API not under my control.

 What's the most concise and/or efficient way to do the equivalent of
 the putExtra call below?  I am willing to convert foo to another data
 type for the putExrta and convert back in the receiver(s).

     Object[] foo = new Object[FOO_SIZE];
     ...
     foo[0] = new Integer(7);
     ...
     foo[6] = Hello;

     Intent broadcastIntent = new Intent(MY_INTENT);
     // assert: all elements of foo are Integer or String
     broadcastIntent.putExtra(MY_EXTRA, foo); // XXX not correct

 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 test OpenGL?

2010-08-03 Thread Robert Green
Have you tried different values of gl.glLineWidthx()?  0x1 is 1 in
hex, which, given in fixed converted to float = 0.1 = super,
super, super tiny.  I'd start with 65536 (0x if you really like
using hex to represent FP) and see how it does.

On Aug 3, 8:31 pm, SChaser crotalistig...@gmail.com wrote:
 On Aug 3, 4:33 pm, Indicator Veritatis mej1...@yahoo.com wrote:

  But I am surprised no one has mentioned: your settings for glOrtho's
  near_val and far_val are odd, to say the least. The default is exactly
  the other way around with near_val=-1.0 and far_val=+1.0. Your values
  put the near plane behind the viewer, but the far plane in front. Is
  this really what you want?

 Thanks for pointing this out. I have reversed them (no effect) as a
 result of your suggestion.

 I threw them in at the last moment, well into this thread. Originally
 they were at 0,0 (I'd drawing in 2D), but when I turned on debugging,
 it showed me this was causing a divide by zero (duh - if I'd looked at
 the resulting transform matrix I'd have seen that). So I just added
 the values, and got them backwards.

-- 
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: Stop activity animation problem?

2010-08-03 Thread sagare
Hi All,

  Please help me with this.

Thanks,
Sagar

On Aug 4, 12:08 am, sagare sagar.ekb...@gmail.com wrote:
 Hi All,
    I want dont want the activity animation that comes by default when
 we start a new activity (i.e. the right to left scrolling effect to
 new activity view) so i googled a bit and found a flag
 FLAG_ACTIVITY_NO_ANIMATION in the Intent class also i applied that
 flag to my intent via the setflags() method but somehow i still see
 the activity animation when a new actvity is launced ( i am developing
 in android 2.1 update).

      Please help me in this regards?
 Thanks,
 Sagar

-- 
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 preprocessor, //#ifdef...

2010-08-03 Thread DanH
Notice that they call it low pause, not pause free.  There are
truly pause-free algorithms, and people who need them.  Brokerage
systems, eg, need response in the 10s of milliseconds, and a single GC
can disrupt a thousand transactions.

iSeries had the SPECjbb crown for several years running, first with
its own JVM and then with the IBM J9 portable JVM.  Was finally
displaced by J9 running on other hardware (as the iSeries hardware was
getting out of date).  Sun did eventually build a special IBM killer
box to reclaim the crown by throwing hundreds of processors at the
problem (and building hundreds of tuning parameters into the JVM), but
it was an artificial configuration.

On Aug 3, 9:12 pm, Bob Kerns r...@acm.org wrote:
 Well, perhaps this illustrates your second point, but:

 http://tinyurl.com/sun-concurrent-gc

 Or it may be that they're not concurrent enough for you. Concurrency
 isn't an absolute, and there are various ways of describing the upper
 bounds on how much delay a concurrent algorithm can impose on other
 threads. (Your point about stringent response time requirements
 suggests this may be your issue with calling it concurrent).

 GC benchmarking is hard work and tricky, and I haven't done it in a
 long time. I appreciate the anecdotal data; do you have benchmarks
 behind it? You've aroused my curiosity about the current state.

 I have generally been more concerned with compatibility in huge code
 bases rather than performance differences (which can generally be
 overcome with hardware -- not concurrency, though), so I've mostly
 avoided non-Sun JVMs when possible. But I like that there are
 alternatives of increasing quality.

 Especially given recent corporate history...

 Thanks.

 On Aug 3, 6:07 am, DanH danhi...@ieee.org wrote:

  Well, none of Sun's implementations are concurrent -- they all force
  the application to stop for a time.  They're not generally well-
  designed for LARGE applications (eg, a fast 8-way running a heavy
  transaction system), or anything with really stringent response time
  requirements.  The IBM iSeries Java implementation ran rings around
  Sun's, and the newer IBM portable Java implementation runs rings
  around the iSeries implementation.

  One of the problems with Sun's GC scheme is the vast number of
  parameters -- no one understands them, or how to set them for a given
  set of circumstances (especially if those circumstances vary
  dynamically).

  On Aug 2, 9:57 pm, Bob Kerns r...@acm.org wrote:

   OT, but I'll bite.

   What do you consider a really good GC setup?

   Sun's GC is good enough that I would hesitate to make blanket
   statements that it is better than X or worse than X. (Though I will
   say that the newer Sun GC implementations are clearly better than the
   older ones). There are a lot of different parameters to evaluate a GC
   by -- and not just CPU overhead.

   I don't ask in order to dispute your choice, BTW -- just to understand
   what you're considering a good GC and why -- and perhaps learn of a
   really good GC I don't know about!

   (It's been a while, but I've implemented, debugged, and maintained a
   number of GCs over the years, and worked with many of the true
   pioneers in the field of GC.  So you can see why I'm curious).

   On Aug 2, 12:53 pm, DanH danhi...@ieee.org wrote:

(don't get me started on GC based languages)

I know it's off-topic, but I have to say something.  Having done large
applications in both I much prefer GCed languages (provided the GC is
well implemented).  More robust and less overhead (yes, faster), with
fewer ways for the programmer to shoot himself in the foot.
(Unfortunately, Sun's GC implementations are only mediocre, so it's
possible you've never seen a really good GC setup.)

On Aug 1, 2:33 pm, RichardC richard.crit...@googlemail.com wrote:

 My background is C and C++ ... 25 years and no longer counting :)

 So I had some ingrained expectations when I started learning Java;
 amongst them was the expectation that the Java language would support
 conditional compliation.

 I have had to learn to live without conditional compliation.  The only
 area where I really miss having a lanugage constuct like #ifdef is
 when I need to remove instrumentation and/or debugging code.  I now
 write less of this type of code and try to remember to mark what I do
 wite with a remove me comment, which gets picked up by the Eclipse
 to-do list.  I then remove it during my pre-QA code review.

 I have yet to feel the need to use conditional compilation to deal
 with the often quoted platform fragmentation as the differences in
 the platforms mostly impacts the amout of time I spend testing and I
 have yet to write ANY code that differs by supported hardware.  Using
 the resource qualifiers has been all I have needed to do so far.

 I still don't like some aspects of the Java language (don't get me
  

Re: [android-developers] Re: Tab layout navigation issue

2010-08-03 Thread Rajesh Pelluru
I want to change the content of tab not tab image once I clicked image in
tab content.

Let me explain u clearly :


In MainActivity , I have 3 tabs tab1,tab2,tab3.

tab1 content is Activity1

tab2 content is Activity2

tab3 content is Activity3

In Activity1, I have image called image1 is there .
If I click on image1 , content of tab1 needs to be replaced with another
activity content i.e. Activity4


How can I acheive that one ??

I hope u understand my issue.

--Rajesh



On Tue, Aug 3, 2010 at 7:44 PM, kaundinya nagaraj.kaundi...@gmail.comwrote:

 Hi Rajesh,
 Firstly, im new to android, just take a look on the following if it
 help u.

 u can assign the icon for the tab using
 mTabHost.getTabWidget().getChildAt(0).getBackground()
 where mTabHost is the TabHost control from the layout.

 for changing the image when clicked, u can use
 mTabHost.getTabWidget().getChildAt(0).setOnClickListener()
 and reassign the tab with new icon or text here.

 Thanks and regards
 Nagaraj P Rao

 On Aug 3, 4:21 pm, Rajesh Pelluru mail2pell...@gmail.com wrote:
  Hi,
   In my layout I have three tabs are there Tab1,Tab2,and Tab3.
 
  In Tab1 content ,I have a image called image1 and on click of that image
 I
  need to change the content of tab.
 
  If I change content also , my tab needs to be highlighted ...
 
   How can I achieve that one ??
 
  --Rajesh

  --
 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: Android preprocessor, //#ifdef...

2010-08-03 Thread DanH
Just a few bullet points:
-- I've always thought that C #include processing sucked.  Why did
they never introduce an #includeonce directive that would have
eliminated all the #ifndef stuff to prevent double includes??
-- C macros suck.  They obfuscate without really introducing much
capability.  I've worked on languages that had macros that were their
own language -- you could have real variables in them, loop, do most
normal programming things.  Code was generated via emit statements.
With such a macro language you can do some amazing things, and with
reasonable use (always a problem, I know) the macros served to clarify
rather than obfuscate.
-- Post-processing of Java bytecodes is expensive and error-prone, and
again obscures the logic.  Not that cost should be a criteria, but
post-processing is no panacea.
-- Yes, one should have to cost-justify including a line-number
pseudo-function in javac.  But there are a hundred features of Java
that don't seem to me to be cost-justified, and several hundred
other missing functions that ARE cost-justified.  I never have
figured out how Sun decided what went into Java and what didn't
(though in several cases it appears to have depended on what would
hide the deficiencies in their implementation vs expose them).

On Aug 3, 10:23 pm, Bob Kerns r...@acm.org wrote:
 You have a very limited view of the techniques available.

 On Aug 3, 10:39 am, Leigh McRae leigh.mc...@lonedwarfgames.com
 wrote:

  On 8/2/2010 10:49 PM, Bob Kerns wrote: First of all -- if you want to list 
  the faults of the C language, the
   preprocessor is very near the top.

  Just your opinion.

 False:
    Preprocessor usage should be eliminated.
    -Bjarne Stroustrup, An Overview of the C++ Programming Language,
 page 3, under table Language-technical rules:

 This concept carried over into the C++ standard committee. Hardly
 just my opinion. It's not removed, because C compatibility is a
 higher-priority concern.

   That's why C++ went to great lengths to mostly remove the need for
   using it, with inline functions, constants, and the like.

  Now your just talking specifically about macros which still can be
  useful and there are somethings that can only be done using a macro.

 No, I am not. I have nothing against macros -- on the contrary, I met
 my wife teaching a class on macros.

 Preprocessors are not the place for them. Lots of languages have
 macros without preprocessors. Macros are great! I wish Java had them.

 (They do have their drawbacks, but no on the scale of a preprocessor.
 And the power of any macros I'd envision is substantially more than is
 offered by the C/C++ preprocessor).

  MS tools destroy what Java has to offer IMHO.  Only the re-factoring is
  better for Java.  It's all opinion either way.

 Are you comparing MS C++ tools to Java tools, or C# and friends?

 Anyway, it's not all opinion. Such comparisons can be done quite
 objectively. Which tools you prefer to USE is opinion.

  I think you have to realize that preprocesing is just a tool and isn't
  to be used to solve all problems.  Just because I want a hammer doesn't
  mean I regard every issue as being a nail.  It's very appropriate to
  handle cross platform issues, hardware issue, diagnostic code etc.  All
  of these issues are very relevant to Android.  Sure these issues might
  be handled differently for a desktop solution where resources aren't as
  big of an issue.

 Nobody has shown me a case where you need a preprocessor because of
 resource issues. Can use, yes, but need, no.

 It is HIGHLY INAPPROPRIATE to handle platform issues and hardware
 issues -- it makes porting to a new platform a royal nightmare. Your
 best shot there is diagnostic code -- and there are better ways,
 involving post-processors rather than preprocessors.

  Why force everyone to do it the so called right way?

 Because of the cost to everyone else of the feature you are demanding.
 Why not put in every hair-brained feature anyone thinks they'd like to
 use?

 Because LONG experience shows, that approach makes for major problems
 with languages, and makes them harder to use. Trust me -- that
 approach has had its day in the language-design world. Even a poorly-
 designed API, not part of the language, can have a major adverse
 impact on the maintainability of a product.

 And in extreme cases (but only extreme cases), even personal code-
 formatting idiosyncrasies can have a negative impact.

 Let people do whatever they want has, after decades of experience,
 been found to not be a good idea. A more careful balance must be
 sought.

  Why does C# have conditional compile?

 To accommodate the masses of C programmers that Microsoft wanted to
 attract, of course!

   Just because SUN chose not to support
  preprocessing in javac doesn't mean they aren't behind it.  Maybe they
  chose to support it through tools so that j2me code would still work
  with j2se?  That would make a lot of sense to me.  For something they
  

Re: [android-developers] Programming a target in an Android Application

2010-08-03 Thread Frank Weiss
Should we assume you know how to hit test for a circle and you want to know
if the SDK can do it for you instead?

On Aug 2, 2010 6:33 PM, kingh32 horaceb1...@gmail.com wrote:

Hello

I'm currently trying to program a target as part of an Android
Application.
I want the user to be able to touch a particular band within the
target with the app being able to acknowledge the area selected i.e.
coordinates and put that data into a database.

Does anyone have any suggestions as to how I can make an image of a
target function in this way?

The target is made up of 6-9 bands, each being the same width.

Thanks

Kingh32

--
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] How can get the latest version of google apks (market ,gmail ,yotube)

2010-08-03 Thread GPU
Hi ,

How can i get the latest version of google apks ? .Is their any git
repository for this apk's .I am not able to find these apk's in the
android.git  QCT git .

Thanks
Gopu

-- 
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 Head First Android Book exists?

2010-08-03 Thread Sohan badaya
Hi All,

I am a big fan of Head First Series. so is there any Head First
Android Book exists?
If not please let me know any similar kind of book for a begineer.

Thanks,
Sohan Badaya

-- 
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: Launching Calendar in AgendaView

2010-08-03 Thread Bob Kerns


On Aug 2, 1:18 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Aug 2, 2010 at 3:21 PM, Bob Kerns r...@acm.org wrote:
  Unpublished, undocumented, unsupported intents are part of the sin.

 The more you nail down an API, the more expensive innovation becomes,
 because the legacy API becomes an albatross over time
 Again, I would agree that there should be more published, documented,
 supported Intents for the core applications. Expecting there to be no
 unpublished, undocumented, unsupported Intents is preposterous.

Yes, I didn't narrow my statement sufficiently, and taken to this
extreme, it's preposterous. But documented intents (that behave, and
continue to behave) as documented, are far more valuable than
undocumented ones. The power of the intent mechanism really depends on
being able to invoke it from anywhere -- otherwise, you could just do
some invoke activity call.

Which is what supplying a class name in an intent essentially is. For
me, that's really the line of demarcation. Beyond that line, it ought
to at least be documented who's allowed to call it!

Further, there should be a registry for this information. Something
like openintents.org, which I think has about 2/3 of the right idea.
Unfortunately, I don't know the other third...but it's probably more
sociopolitical than technical. One key component would be getting
Google to particpate!

This kind of openness enables a whole new CLASS of innovation. Yes the
old style of innovation becomes more costly. But when you don't have
to build in your own web browser because you can just send an intent
-- well, we've seen that that can enable a whole lot of innovation
right there.

  Actually, by my interpretation of the CDD, that's not allowed, unless
  they are going to have both apps (the original and their replacement).

  Yes, that's exactly what they should be doing.

 Personally, I have no problem with this. Carriers would definitely
 have a problem with this, based on conversations I've had -- they've
 triggered SDK violations over more minor issues than this. Remember
 that we're not all that far removed from a world where carriers
 dictated everything about what was on the deck of a device.

It is my considered opinion that, in the larger picture, this behavior
is irrational. I can point to various industry parallels -- like how
many device drivers PC vendors have have had to write and maintain,
far exceeding the supply of competent device driver authors.

The quest for competitive edge drives it into this corner, where it
remains, but it is far from a cost-effective approach to the basic
problem.

And I think Apple's app store quite effectively sank the ship
underneath that controlled deck idea. (Despite Apple then seizing
control in turn).

 It is one of the reasons I hope that those rumors from earlier this
 year are true, and that the core applications will be unbundled from
 the OS and available for update via the Market. At that point, the CDD
 would need to be adjusted to prohibit replacement-in-place by OEMs,
 and things will stabilize more. It might even help with the goal of
 having more published, documented, supported Intents for the core
 applications.

  I do not believe the developers have the same responsibility to the
  platform -- but they DO have a responsibility to the users.

 And if that attitude is prevalent, in the end, Android will fail.

Obviously, I disagree. Developers have no control over the platform
destiny. But a rich supply of tools that meet users needs does -
regardless of whether that need is approved or not. A Very Direct
Impact. Happy customers -- now there's something that will help the
platform win! (Carriers still have the power to countermand that, I
fear...)

The situation would be different if developers had a real say in the
platform directions. Then, absolutely I would agree. I think that
would really help the platform win, in fact.

  So I don't buy your pissing-in-the-pool analogy -- and I think you
  should be able to turn this to your advantage in your efforts to
  convince hardware manufacturers to behave more sanely.

 I don't see how. You are asking for device manufacturers to increase
 their development costs, to support things they're not obligated to
 support, because third-party developers are doing things they're told
 by Google not to do.

How are device manufacturers increasing their costs by NOT DELETING
the core Google app? Is it a matter of license fees to Google?

Even better would be to fold in their improvements into the original.
This might seem like more work -- but not really, since they would
forgo the work of creating all the improvements made by others. Which
doesn't help as much as it might sound, but does make enough economic
sense that I hear there's even companies selling commercial products
based around open source code. Eh? What's that you said? Android is
what?

 What would help third-party developers in this area is if they'd get
 organized. At 

[android-developers] Re: How can get the latest version of google apks (market ,gmail ,yotube)

2010-08-03 Thread Kumar Bibek
You cannot. These are not open sourced apps. Sorry

-Kumar Bibek
http://tech-droid.blogspot.com

On Aug 3, 11:09 am, GPU gopuraj...@gmail.com wrote:
 Hi ,

 How can i get the latest version of google apks ? .Is their any git
 repository for this apk's .I am not able to find these apk's in the
 android.git  QCT git .

 Thanks
 Gopu

-- 
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: LVL - A Massive Concern

2010-08-03 Thread metal mikey
You will find what you are missing is mentioned under NETWORK ACCESS.

On Aug 3, 5:49 am, Mark Carter mjc1...@googlemail.com wrote:
 When I install an app (with that permission) I don't see the CHECK_LICENSE
 permission mentioned. The other permissions are mentioned but not that one.
 This is on N1 Froyo.

 Am I missing something!?


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