Re: [android-developers] Spinner usage

2011-07-16 Thread Simon Platten

Thank you, I've re-written the adapter and it now works.

On 17/07/2011 6:56 AM, TreKing wrote:
On Sat, Jul 16, 2011 at 8:56 AM, Simon Platten 
mailto:simonaplat...@googlemail.com>> 
wrote:


When I'm not making a selection the spinner shows as an empty box
with a down arrow, once I've made a selection the list is removed
but the spinner still shows empty, shouldn't it show the current /
last selection ?


It should, but I suppose you could be doing something wonky in your 
adapter. Care to share that?


-
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 


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

Re: [android-developers] Re: How to lock current orientation at runtime?

2011-07-16 Thread Dianne Hackborn
Note that basically everything you do for dealing with a configuration
change is *exactly* the same thing you need to do to correctly handle your
app being killed in the background if the user has (temporarily) left its
UI.  Thus making sure you deal correctly with a config change is a really
good way to test that you are also able to correctly restore if your process
needs to be restarted.

If you have transient data that shouldn't be restored (such as a running
thread), just use Activity.onRetainNonConfigurationInstance():

http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance()

(Or as the current document recommends, the more convenient new Fragment
APIs.)

On Sat, Jul 16, 2011 at 9:17 PM, Brad  wrote:

> Dianne, thanks for the response - you're probably right, I should just
> bite the bullet.
>
> I'd like to vent a little though about what a hassle it is to deal
> with orientation changes.   It must be the #1 source of bugs in the
> apps that I've come across (including my own apps).   iOS does a lot
> of things wrong, but it makes orientation changes so much easier than
> Android.   I still haven't found a way to preserve the state of an
> activity that launches another dialog style activity that gets an
> orientation change - I end up shoving everything in the db or passing
> the state data to the dialog class.   I'm no guru so I'm probably
> doing something wrong there, but I wish to God that we could go back
> in time and come up with a better way to deal with orientation changes
> that didn't involve killing and reconstructing the entire activity!
>
> Ok, done w/the vent.  Having said all that I still enjoy programming
> for Android more than Apple even though I sell a lot more apps on the
> App Store vs the Market :-)
>
> Brad
>
> On Jul 16, 8:53 pm, Dianne Hackborn  wrote:
> > Those are two different orientations.
> >
> > The Configuration constants:
> http://developer.android.com/reference/android/content/res/Configurat...
> >
> > The constants for set/getRequestedOrientation():
> http://developer.android.com/reference/android/content/pm/ActivityInf...
> >
> > Beyond that, I would strongly recommend not doing what you are trying to
> do.
> >  This would result in a UI flow that is very counter to what the user
> > expects -- that either an app is going to run in a particular
> orientation,
> > or allow them to rotate their screen as they would elsewhere.  Ending up
> > locked into whatever orientation they happened to launch the app in is
> just
> > not how things should work.
> >
> > Besides which, there are all kinds of edge cases you'll never get right
> --
> > for example what happens if they press home to leave your app, rotate
> their
> > device, and then task switch back to your app?  Or as another poster
> > mention, if you lock the screen into portrait like this and they flip the
> > lid on their keyboard the orientation won't change to landscape, which is
> > not what they are going to want.
> >
> > You really, really just need to code your activity correctly to be able
> to
> > destroy and re-create the activity.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Jul 16, 2011 at 3:41 PM, Brad  wrote:
> > > Hi,
> >
> > > I'm trying to lock my activity to the current orientation to prevent
> > > an orientation change from restarting my activity while I'm waiting
> > > for a http response.
> >
> > > So I'm trying to use this:
> >
> > > setRequestedOrientation(getResources().getConfiguration().orientation);
> >
> > > And it works fine for portrait (orientation == 1), but when the device
> > > is in landscape it's getting a value of 2 which ==
> >
> > > ActivityInfo.SCREEN_ORIENTATION_USER
> >
> > > And this doesn't lock the screen.
> >
> > > Does anyone have any idea why I'm getting this instead of LANDSCAPE?
> > > Any suggestions for a better way to lock the current orientation?
> >
> > > 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
> >
> > --
> > 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, vis

Re: [android-developers] setting a textView in a ListView from a DialogBox. Frustrating....

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 12:55 AM, Chris Johnson wrote:

> Currently my code will save the text and
> put it in a random View in the ListView. I do NOT want that... I want
> the text I save to go to a specific view and stay there.. anyone have
> any suggestions?
>

First, when posting code, please keep it short and to the point. Posting
every bit of your code will just make people's eyes glaze over and they'll
just ignore all of it.

To your problem: when you get your text from the EditText, it should not be
going directly to some TextView - it should be going to the data structure
that your ListView items represent. Then you invalidate your adapter and
your list gets updated.

-
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] Expandable List with Progress Bar or Dialog

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 4:42 PM, Frito Lay wrote:

> The groups are also loaded via HTTP request to a PHP service and I have
> a message dialog being displayed while loading the groups but cannot figure
> out a way to do it with the children
>

Seems like pretty much the exact same problem - what specifically are you
having trouble with doing this with the children?

-
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] Android findViewById() problem

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 11:40 AM, Árón  wrote:

> I know I would usually use the code below but this is not working as the
> R.id.currency TextView is not in the main R.layout.date_list_layout
>

What is the point of setting the text on a TextView that is not presently
being displayed?

-
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] Spinner usage

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 8:56 AM, Simon Platten  wrote:

> When I'm not making a selection the spinner shows as an empty box with a
> down arrow, once I've made a selection the list is removed but the spinner
> still shows empty, shouldn't it show the current / last selection ?


It should, but I suppose you could be doing something wonky in your adapter.
Care to share that?

-
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] latitude and longitude Problem

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 2:39 AM, Ankit Kasliwal  wrote:

>  i try the below code but it always  return me same old Address like
> right now me in city A but it always return me old City B
>

You're specifically asking for last known location. If that's not what you
want, don't ask for it.

Also, you're duplicating a ton of code. They're called "functions" ;-)

-
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] Intents for Camera

2011-07-16 Thread TreKing
On Sat, Jul 16, 2011 at 12:38 AM, Durgadoss Ramanathan <
r.durgad...@gmail.com> wrote:

> I am writing a simple App that needs to be notified when the Camera
> App Starts.
>
What is "the Camera App" ? There are many available for download, any of
which a use may have installed at any given time.

> Also, I want my App to be notified when we 'touch' the 'capture'
>
> button in the camera.
>
This assumes the "touch" or "capture" buttons exist.

>  Are there any Intents available for these ?
>
It's doubtful - any more than your app broadcasts intents for other apps
when its buttons are pushed.

> Or there is some other method to notify ?
>
Write your own camera app - then you'll have full control.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Odp: SoundPool and DualCore (Samsung Galaxy S2) : Random Crashes ingame

2011-07-16 Thread Daniel
I have been getting reports of S2 crashes too... and based on this thread, 
and since i use SoundPool extensively, i'm pretty confident at this point 
that it is the cause.
Has anyone been able to try native OpenSL ES audio, and seen better results? 
(Haven't got round to setting all that up yet since 2.3 adoption has been 
pretty slow). I guess it will depend on whether the problem is with 
SoundPool specifically or the lower level drivers.

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

[android-developers] Honeycomb: some Widget-Icons in Widget Roller with blue Background?

2011-07-16 Thread Devomat
I've seen today, that some Widget-Icons have a blue Background Frame
in the Widget Scroller (my widget has that not) 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: How to lock current orientation at runtime?

2011-07-16 Thread Brad
Dianne, thanks for the response - you're probably right, I should just
bite the bullet.

I'd like to vent a little though about what a hassle it is to deal
with orientation changes.   It must be the #1 source of bugs in the
apps that I've come across (including my own apps).   iOS does a lot
of things wrong, but it makes orientation changes so much easier than
Android.   I still haven't found a way to preserve the state of an
activity that launches another dialog style activity that gets an
orientation change - I end up shoving everything in the db or passing
the state data to the dialog class.   I'm no guru so I'm probably
doing something wrong there, but I wish to God that we could go back
in time and come up with a better way to deal with orientation changes
that didn't involve killing and reconstructing the entire activity!

Ok, done w/the vent.  Having said all that I still enjoy programming
for Android more than Apple even though I sell a lot more apps on the
App Store vs the Market :-)

Brad

On Jul 16, 8:53 pm, Dianne Hackborn  wrote:
> Those are two different orientations.
>
> The Configuration 
> constants:http://developer.android.com/reference/android/content/res/Configurat...
>
> The constants for 
> set/getRequestedOrientation():http://developer.android.com/reference/android/content/pm/ActivityInf...
>
> Beyond that, I would strongly recommend not doing what you are trying to do.
>  This would result in a UI flow that is very counter to what the user
> expects -- that either an app is going to run in a particular orientation,
> or allow them to rotate their screen as they would elsewhere.  Ending up
> locked into whatever orientation they happened to launch the app in is just
> not how things should work.
>
> Besides which, there are all kinds of edge cases you'll never get right --
> for example what happens if they press home to leave your app, rotate their
> device, and then task switch back to your app?  Or as another poster
> mention, if you lock the screen into portrait like this and they flip the
> lid on their keyboard the orientation won't change to landscape, which is
> not what they are going to want.
>
> You really, really just need to code your activity correctly to be able to
> destroy and re-create the activity.
>
>
>
>
>
>
>
>
>
> On Sat, Jul 16, 2011 at 3:41 PM, Brad  wrote:
> > Hi,
>
> > I'm trying to lock my activity to the current orientation to prevent
> > an orientation change from restarting my activity while I'm waiting
> > for a http response.
>
> > So I'm trying to use this:
>
> > setRequestedOrientation(getResources().getConfiguration().orientation);
>
> > And it works fine for portrait (orientation == 1), but when the device
> > is in landscape it's getting a value of 2 which ==
>
> > ActivityInfo.SCREEN_ORIENTATION_USER
>
> > And this doesn't lock the screen.
>
> > Does anyone have any idea why I'm getting this instead of LANDSCAPE?
> > Any suggestions for a better way to lock the current orientation?
>
> > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] How to lock current orientation at runtime?

2011-07-16 Thread Dianne Hackborn
Those are two different orientations.

The Configuration constants:
http://developer.android.com/reference/android/content/res/Configuration.html#ORIENTATION_LANDSCAPE

The constants for set/getRequestedOrientation():
http://developer.android.com/reference/android/content/pm/ActivityInfo.html#screenOrientation

Beyond that, I would strongly recommend not doing what you are trying to do.
 This would result in a UI flow that is very counter to what the user
expects -- that either an app is going to run in a particular orientation,
or allow them to rotate their screen as they would elsewhere.  Ending up
locked into whatever orientation they happened to launch the app in is just
not how things should work.

Besides which, there are all kinds of edge cases you'll never get right --
for example what happens if they press home to leave your app, rotate their
device, and then task switch back to your app?  Or as another poster
mention, if you lock the screen into portrait like this and they flip the
lid on their keyboard the orientation won't change to landscape, which is
not what they are going to want.

You really, really just need to code your activity correctly to be able to
destroy and re-create the activity.

On Sat, Jul 16, 2011 at 3:41 PM, Brad  wrote:

> Hi,
>
> I'm trying to lock my activity to the current orientation to prevent
> an orientation change from restarting my activity while I'm waiting
> for a http response.
>
> So I'm trying to use this:
>
> setRequestedOrientation(getResources().getConfiguration().orientation);
>
> And it works fine for portrait (orientation == 1), but when the device
> is in landscape it's getting a value of 2 which ==
>
> ActivityInfo.SCREEN_ORIENTATION_USER
>
> And this doesn't lock the screen.
>
> Does anyone have any idea why I'm getting this instead of LANDSCAPE?
> Any suggestions for a better way to lock the current orientation?
>
> 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
>



-- 
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: Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread Howard M. Harte
In the past, I have worked as an expert witness in several patent
litigation cases.  What happens is that the law firms involved will
hire expert witnesses to do research on these patents, and try to find
prior art that invalidates the patents.  If the prior art is strong,
then the plaintiff may drop the case or try to settle out of court.
If the case actually gets litigated, then the patent may become
invalidated, and then could not be asserted against another party in
the future.  This is a big risk, so usually, the case will be settled
out of court.

Patent examiners have a limited amount of time to examine a patent
when it is filed, so many if not most patents will not be able to
withstand the scrutiny of several expert witnesses spending hundreds
or thousands of hours searching for prior art.

In short, it is very easy to get a patent granted, and it does not
mean much until that patent is actually challenged in court.

One technique that I often used to find good prior art was to look at
the patents cited, then look those patents up and see what they cite.
It takes a lot of time, but the more time you invest, the more likely
you are to uncover something missed by the original patent examiner.

It also takes a lot of money, which is why this is a game for big
players with deep pockets.

But of course I am not a lawyer, and this just my personal opinion
having seen a little of how these things play out.

-Howard

On Jul 16, 8:52 am, Jim Graham  wrote:
> On Sat, Jul 16, 2011 at 06:28:32AM -0700, rich friedel wrote:
> > Sorry, didn't mean to come across as brash... just meant if you only read
> > the first, which is more of a pop-media take, that you need to read the
> > second article as it gives a deeper look into what is going on.
>
> I just did.  Is today April 1st?
>
> Seriously, if this isn't a joke, well, it is a joke.  EVERY computer
> in the world matches these descriptions in one way or another.  They
> all have a processor, memory, and some sort of programs which control
> their actions on something.
>
> Wham.  Ok, everyone...time to trade in your computers, GPS units,
> phones (sorry, but even an old POTS phone connects to the local
> telco, where they have digital switches that clearly have an input
> and output, a CPU and memory, and programming which acts on an
> item (subscriber calls).  You must replace them all with bricks.
>
> EVERY modern cell phone is toast, according to what I just read.
>
> But, as I said earlier, I AM NOT A LAWYER (which is probably why
> I can see the absurdity of this whole thing).
>
> Later,
>    --jim
>
> --
> 73 DE N5IAL (/4)        | Remember your spelling rules, including:
> spooky1...@gmail.com    |   I before E except after C
> < Running FreeBSD 7.0 > |
> ICBM / Hurricane:       |   BEING a native-born American, I don't
>    30.44406N 86.59909W  |   always notice our WEIRD spelling
>
> Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

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


[android-developers] Re: loading image assets

2011-07-16 Thread Doug
Use AssetManager to get an InputStream for your image, then feed that
stream to the relevant method in BitmapFactory.

Doug

On Jul 15, 2:14 pm, bob  wrote:
> Can someone point me to a good example of loading a Bitmap from
> assets?  It's in a PNG asset called nugget.png.

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


Re: [android-developers] How to lock current orientation at runtime?

2011-07-16 Thread Nick Risaro
If you add android:configChanges="orientation" to your activity in the
manifest then the method "onConfigurationChanged" of your activity will be
called, here you can decide what to do with the change, but most important,
the activity will not be restarted.

You can check this
http://developer.android.com/guide/topics/resources/runtime-changes.htmlwhere
it's better explained.

2011/7/16 Kostya Vasilyev 

> Assuming you lock the orientation, how will you prevent the user from
> sliding out the keyboard on those devices that have it? (For the duration of
> your HTTP request.)
>
> Less plausible, but possible as well, from changing the phone's configured
> UI language?
>
> --
> Kostya Vasilyev
> 17.07.2011 2:41 пользователь "Brad"  написал:
>
> > Hi,
> >
> > I'm trying to lock my activity to the current orientation to prevent
> > an orientation change from restarting my activity while I'm waiting
> > for a http response.
> >
> > So I'm trying to use this:
> >
> > setRequestedOrientation(getResources().getConfiguration().orientation);
> >
> > And it works fine for portrait (orientation == 1), but when the device
> > is in landscape it's getting a value of 2 which ==
> >
> > ActivityInfo.SCREEN_ORIENTATION_USER
> >
> > And this doesn't lock the screen.
> >
> > Does anyone have any idea why I'm getting this instead of LANDSCAPE?
> > Any suggestions for a better way to lock the current orientation?
> >
> > Thanks!
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Reading SQL Query row by row

2011-07-16 Thread lbendlin
I believe the row count is only calculated when you explicitly ask for it. 
As long as you simply iterate through the cursor ( "do ... while 
c.moveToNext()" ) you should be ok from a memory perspective.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ADT install returning 404 in Eclipse

2011-07-16 Thread Nguyen Dat
Dear mlybrand

Another alternative way to install ADT is offline install, please try follow
step:
*Step1*. Download Latest ADT:
Example: http://dl.google.com/android/ADT-12.0.0.zip
*Step2*: Go to install page:
Galileo: [*Help*] - > [*Software Update*] -> [*Add site*] -> Click [*
Archive*] instead input URL http://dl-ssl.google.com/android/eclipse/
*Step3*: Select zip file you have been downloaded at Step1
*Step4*: OK, next, next

Tips: At Step3 disable network for quick install

Best Regards,
DatNQ

On Sun, Jul 17, 2011 at 9:03 AM, mlybrand  wrote:

> Trying to add ADT in Eclipse on Windows 7 with this URL:
>
> http://dl-ssl.google.com/android/eclipse/
>
> is saying that it can't find the repository.  Is there a fix for this?
>
> Thanks.
>
> Mark
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: How to grab data from a website in android?

2011-07-16 Thread Latcho

bad vibez answer

On 7/15/2011 11:32 PM, Indicator Veritatis wrote:

How could you have searched Google and not found this? There are
numerous example of using HttpClient or java.net to do what you want.
http://masl.cis.gvsu.edu/2010/04/05/android-code-sample-asynchronous-http-connections/
is only one of many examples showing up under the search terms,
"android tutorial http". The terms "android tutorial httpclient" do
even better, if you really have made up your mind to prefer HttpClient
over java.net (as have many others).

On Jul 14, 11:43 pm, Anilkumar  wrote:

Hi,

I want to grab data from the website and display that data in my app,
Like daily horoscope. Every day the data in the website will change.
so i have to grab that data and display that in to my app.

can anyone help me please?

i tried in searching google with no result . Please help me suggesting
me code or any website that helps me.

Thanks,
Anilkumar.


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

2011-07-16 Thread lbendlin
I stumbled across this too a while back. What I don't understand - why is 
DTMF supported downlink? What's the point? To play a phreaky "Für Elise" ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ADT install returning 404 in Eclipse

2011-07-16 Thread mlybrand
Trying to add ADT in Eclipse on Windows 7 with this URL:

http://dl-ssl.google.com/android/eclipse/

is saying that it can't find the repository.  Is there a fix for this?

Thanks.

Mark

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


Re: [android-developers] How to lock current orientation at runtime?

2011-07-16 Thread Kostya Vasilyev
Assuming you lock the orientation, how will you prevent the user from
sliding out the keyboard on those devices that have it? (For the duration of
your HTTP request.)

Less plausible, but possible as well, from changing the phone's configured
UI language?

--
Kostya Vasilyev
17.07.2011 2:41 пользователь "Brad"  написал:
> Hi,
>
> I'm trying to lock my activity to the current orientation to prevent
> an orientation change from restarting my activity while I'm waiting
> for a http response.
>
> So I'm trying to use this:
>
> setRequestedOrientation(getResources().getConfiguration().orientation);
>
> And it works fine for portrait (orientation == 1), but when the device
> is in landscape it's getting a value of 2 which ==
>
> ActivityInfo.SCREEN_ORIENTATION_USER
>
> And this doesn't lock the screen.
>
> Does anyone have any idea why I'm getting this instead of LANDSCAPE?
> Any suggestions for a better way to lock the current orientation?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Android SDK Courses

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 6:41 PM, rich friedel  wrote:
> I second that... Mark Murphy is a beast!

To quote Mutant Enemy Productions, "Gr. Arrgh."

:-)

Thanks to you both for the kind words!

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

Android 3.1 Programming Books: http://commonsware.com/books

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 10:02:25AM -0400, Mark Murphy wrote:
> On Sat, Jul 16, 2011 at 9:48 AM, Jim Graham  wrote:

> Sounds plausible.

Except that it didn't work.  :-(

Oh well, I solved it:  I put a note in the Usage page saying that,
depending on your Android device, the scroll feature may not place
the first entry for the malting company you select on the top of
the screen, and added that my Motorola Bravo puts it on the bottom,
and nobody seems to know why.

I also added a comment for users of devices below Android 2.2 that
the scroll feature won't work at all, because it didn't exist until
2.2, and they will always end up on the first entry in the list.

Now all I have left to do, after spending a lot of time on it today,
is figure out how to configure it as a paid app, and then build the
free version,  which will have about 15[1] of the 297 (+/-) entries
(the others will create a Toast that, like the added text in the main
index says, those are only in the paid app)..  But none of that is
going to happen tonight...I'm taking the rest of the night off!  :-)

Later,
   --jim

[1] about 15 ... basically, the basic malts that are most commonly
used, and only the generic data

-- 
73 DE N5IAL (/4)| Peter da Silva:  No, try "rm -rf /"
spooky1...@gmail.com| Dave Aronson:As your life flashes before
< Running FreeBSD 7.0 > |  your eyes, in the unit of time known as an
ICBM / Hurricane:   |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.59909W  |

Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

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


[android-developers] Re: Install % not updating?

2011-07-16 Thread JonFHancock
I've been having a serious reduction in sales since July 1st.  For me
it is because Market search is horribly messed up.

My active install rate has been going up, but my ranking keeps falling
in search terms that I've dominated for a year.

Oddly though, I have moved up from about 170 to 159 in top paid apps
on the market.  I'm kind of guessing that all of my immediate
competitors in that range are losing revenue too.  If they were
staying the same, then I should be dropping.

Zsolt, I'm with you.  This is my only income source, so I've been
swinging from fits of rage to depression.

I've been in contact with a product manager on the Market team, and he
keeps telling me that they are working on it, and I will see a fix
soon.

I've seen the crashes in Checkout too, but only with orders from Japan
that were cancelled by Google for invalid credit card information.

Jon F Hancock

On Jul 16, 12:09 pm, Adam Ratana  wrote:
> Looks like the checkout thing seems to be crashing on orders that have been
> cancelled in a certain way, or something, not just the Docomo, it happens
> with some older cancelled orders now too.  They are clickable, so it's
> possible to move to archive (or back to inbox) on each crashed one to then
> see others.  A workaround, but not ideal though.  Checkout Orders Page
> completely crashes on Tablet and Phone browsers though, can only really see
> the checkout orders page from a desktop browser - haven't found a workaroud
> yet, if others can also report this issue if you encounter that, hopefully
> action will be taken soon.
>
> The market wackiness is a little frustrating, I'm small potatoes though; I
> can only imagine how it may be affecting people who depend on sales from a
> consistently working market.
>
> Adam
>
>
>
>
>
>
>
> On Saturday, July 16, 2011 11:49:11 AM UTC-4, Nikolay Elenkov wrote:
>
> > On Sun, Jul 17, 2011 at 12:06 AM, Adam Ratana  wrote:
> > > This seems to be happening again.  I also noticed the following:
> > > 1. App descriptions sometimes display in a random language on the
> > honeycomb
> > > market app (mine and others)
>
> > This is also happening on the new phone version of Market. 'What's new'
> > is displayed in one language, the description in another. Sometimes, if
> > you are lucky, both are displayed in the same language. The whole
> > silliness with reordering comments based on some unknown 'usefulness'
> > metric is also quite annoying: the top comments are sometimes months
> > old.
>
> > > 2. Google checkout seems to be crashing when particular orders are in the
> > > inbox or archive (for me it's some cancelled ones from Japan)
>
> > There was a problem with handling orders from Docomo yesterday
> > or the day before. I think it's fixed now.
>
> > > 3. There was a strange spike in the active installs of the free version
> > of
> > > my app, followed by an adjustment a day or two later, around the time
> > this
> > > issue first surfaced.
>
> > Those numbers depend on cosmic radiation and maybe solar flares.
>
> > > 4. Saw some doubling up of my screenshots, a small low-res version
> > followed
> > > by the standard one.
>
> > Was the same on the new phone version too, but it seems it's fixed now.
> > (for now?)
>
> > All in all, business as usual.

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

2011-07-16 Thread rich friedel
I second that... Mark Murphy is a beast! His books are well worth the money.

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

2011-07-16 Thread Brad
Hi,

I'm trying to lock my activity to the current orientation to prevent
an orientation change from restarting my activity while I'm waiting
for a http response.

So I'm trying to use this:

setRequestedOrientation(getResources().getConfiguration().orientation);

And it works fine for portrait (orientation == 1), but when the device
is in landscape it's getting a value of 2 which ==

ActivityInfo.SCREEN_ORIENTATION_USER

And this doesn't lock the screen.

Does anyone have any idea why I'm getting this instead of LANDSCAPE?
Any suggestions for a better way to lock the current orientation?

Thanks!

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


Re: [android-developers] Android SDK Courses

2011-07-16 Thread Kristopher Micinski
I think Mark Murphy does Android courses, he also puts out a book which
covers a lot of what you'd like to know (or so I've been told®).  You should
check with him, he's on the list and regularly answers questions.

(Mark probably might not feel appropriate plugging himself, but I can.)

Google "mark murphy commonsware" ???

Kris

On Sat, Jul 16, 2011 at 1:15 AM, Saad Alghaidani wrote:

>
> Hello Guys,
>
> i just joined the group today , and i am very interesting in android
> development, so
>  Could you please help me how can i take Course in Andriod SDK  for junior?
>  and where it will be?and inform me for any new course.
>
> thank you for this Wonderful group.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Aw: Re: Asmack Packetlistener + UI Update = Threading Problem ?

2011-07-16 Thread tuxfusion
Hi ,
I thought I'd get at least a mail if I get a reply :)

I solved this issue, the main things were : 

   - make sure mHandler.post() ( replaced runOnUiThread  ) references UI 
   thread by being instanciated in onCreate()
   - the handling of incoming packets was correct, however, I send out the 
   reply in yet another thread ( xmpp result for the IQ), so in many cases the 
   replay thread was faster then the gui or the other way round. So i just 
   added :   "connection.sendPacket(reply);" in the same .post(...) part where 
   the I manipulate the GUI and when that finishes reply gets send and the 
   sending client receives the reply and sends the next package, but not 
   sooner.
   
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: Option to unlock the boot loader for Sony Ericsson Android Gingerbread phones now available.

2011-07-16 Thread Ryan A
Hello, Im sure you have been asked this question many times already but like 
a lot of other Verizon CDMA Xperia Play owners, I am checking the web, 
forums, and other places each day in hopes to finally see an unlock for our 
bootloaders so root can be acheived. I am on my 3rd Xperia Play and am 
having a very hard time enjoying this phone. My first 2 went defective with 
different issues after a week or so. While the current "Play" that I am 
using doesnt have any hardware issues like the others, the software 
glitches, spotty wifi, and horrible lag makes it such a dissapointment and I 
truly see so much potential. Without being able to unlock bootloader soon I 
see no reason to keep this phone much longer. Im not alone. Please tell me I 
can look forward to a solution soon?? Thanks, Ryan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] word suggestion for ~,#,- etc not done properly

2011-07-16 Thread Sri Kommareddi
Hi,

Issue :In Browser text box '~' sign is not getting deleted by using
backspace key on first attempt

This happens to some types of text input element on web page. If the
word suggestion is On, this issue will be seen for character
'~','#','-'.

my hardware has qwerty keyboard, the input method is different from
virtual keyboard. The characters '~','#','-' have special meaning for
word suggestion in this qwerty input method.

I think when enter "~", the word suggestion is not done properly. Any
suggestions to resolve this issue ?

Thanks
Sri

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Unlocking Bootloader for CDMA Xperia Play

2011-07-16 Thread Ryan A
Hello, Im sure you have been asked this question many times already
but like a lot of other Verizon CDMA Xperia Play owners, I am checking
the web, forums, and other places each day in hopes to finally see an
unlock for our bootloaders so root can be acheived. I am on my 3rd
Xperia Play and am having a very hard time enjoying this phone. My
first 2 went defective with different issues after a week or so. While
the current "Play" that I am using doesnt have any hardware issues
like the others, the software glitches, spotty wifi, and horrible lag
makes it such a dissapointment and I truly see so much potential.
Without being able to unlock bootloader soon I see no reason to keep
this phone much longer. Im not alone. Please tell me I can look
forward to a solution soon?? Thanks, Ryan

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

2011-07-16 Thread stevejbrot...@gmail.com
Lemme EXPAND on the answer that Chrystian didn't explain...

I don't know about Linux and Macs Operating systems, but you need to
change to the short 8.3 format path (eg. the old MS-DOS 6.22 path) on
Windows.

In Eclipse, go to menu bar and click "Windows" -> Preferences and on
the left side, select "Android".

On the right side of menu near the top where it says  "SDK Locations"
**AND** if you kept the default path during installations, change it
to this:

for 32 bit Windows 7 -- (C:\Program Files\Android\android-sdk)
C:\PROGRA~1\Android\android-sdk

For 64 bit Windows  7 -- (C:\Program Files (x86)\Android\android-sdk)
C:\PROGRA~2\Android\android-sdk

HOWEVER, if you changed the SDK path during the installation, then you
need work it out on your own. Best to go through a DOS window and use
dir /x to work out the short names.

There was another alternative discussed by creating a link using
MKLINK command. It might be worthwhile to investigate.

More info was found at this link:

http://stackoverflow.com/questions/6638713/android-emulator-is-not-starting-showing-invalid-command-line-parameter

-- Steve

On Jul 16, 4:01 pm, Chrystian Vieyra  wrote:
> There is a problem with R12 where the SDK location cannot contain any
> spaces. You need to change the sdk location path in Eclipse.

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

2011-07-16 Thread bhasker
I am surprised that there is no Horizontal List View in Android. Tried
using gallery but cannot live with it center element locking feature.
I dont even see a possibility to get rid of it, either with the API or
by extending it. Any suggestions?

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

2011-07-16 Thread Saad Alghaidani
Hello Guys,

i just joined the group today , and i am very interesting in android
development, so
 Could you please help me how can i take Course in Andriod SDK  for junior?
 and where it will be?and inform me for any new course.

thank you for this Wonderful group.

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

2011-07-16 Thread Chris Johnson
I don't know if anyone knows how to do this... but if so, please help.
I'm trying to set a TextView I have in an xml. to a certain text with
an editText in a dialogBox. Currently my code will save the text and
put it in a random View in the ListView. I do NOT want that... I want
the text I save to go to a specific view and stay there.. anyone have
any suggestions? here is my Code: (The xml is below the code, and  all
I need is for it to save text in alarm_name_text and in ONE listView..
PLEASE HELP!)

package com.MTSUAndroid;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Button;
import android.widget.Toast;
import android.app.*;

public class AlarmList extends Activity {
private static final int DIALOG_YES_NO_MESSAGE = 1;
private static final int DIALOG_YES_NO_LONG_MESSAGE = 2;
private static final int DIALOG_LIST = 3;
private static final int DIALOG_PROGRESS = 4;
private static final int DIALOG_SINGLE_CHOICE = 5;
private static final int DIALOG_MULTIPLE_CHOICE = 6;
private static final int DIALOG_TEXT_ENTRY = 7;

private static final int MAX_PROGRESS = 100;
private ProgressDialog mProgressDialog;
private int mProgress;
private Handler mProgressHandler;

private ListView mainListView;
private Planet[] planets;
private static ArrayAdapter listAdapter;
private Button Save;
private Button Default;
private TextView text;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main3);

AlertDialog.Builder alertBox = new AlertDialog.Builder(this);
final TextView rowSavedText =
((TextView)findViewById(R.id.alarm_name_text));
// Find the ListView resource.
mainListView = (ListView) findViewById(R.id.mainListView);
Save = (Button) findViewById(R.id.alarm_button);
Default = (Button) findViewById(R.id.alarm_button1);
text = (TextView)findViewById(R.id.alarm_name_text);
Save.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {

}
});
Default.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {

}
});
// When item is tapped, toggle checked properties of CheckBox 
and
// Planet.

// Create and populate planets.
planets = (Planet[]) getLastNonConfigurationInstance();
if (planets == null) {
planets = new Planet[] { new Planet("Turn On Alarm"),
new Planet("Alarm Name"), new 
Planet("Time"),
new Planet("Sound"), new 
Planet("Vibrate"),
new Planet("Repeat"), new 
Planet("Volume Control"),
new Planet("Second Alarm") };
}
ArrayList planetList = new ArrayList();
planetList.addAll(Arrays.asList(planets));
// Set our custom array adapter as the ListView's adapter.
listAdapter = new PlanetArrayAdapter(this, planetList);

//int i = mainListView.getFirstVisiblePosition() + 1;
mainListView.setAdapter(listAdapter);
listAdapter.notifyDataSetChanged();
listAdapter.notifyDataSetInvalidated();
mainListView
.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView parent, View 
item,
int position, long id) {
Planet planet = listAdapter.getItem(position);
planet.toggleChecked();
if (position == 1) {
/*AlertDialog.Builder builder;
  

[android-developers] Opengl ES Texture working on Emulator but not on Device

2011-07-16 Thread odrya12

I tried everything..
Source:

Texture class:
public class XAndroidTexture
{
   private int[] textures = new int[1];
   public int width, height;
   Bitmap bmp;
   public XAndroidTexture(GL10 gl, Bitmap bitmap)
   {
   gl.glEnable(GL10.GL_TEXTURE_2D);
   this.bmp = bitmap;
   width = bmp.getWidth();
   height = bmp.getHeight();
   gl.glGenTextures(1, textures, 0);
   // ...and bind it to our array
   gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
   // create nearest filtered texture
   gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
   gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);
   gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);
   gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);
gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
GL10.GL_MODULATE);
   // Use Android GLUtils to specify a two-dimensional texture 
image
from our bitmap
   GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
//GLUtils.texSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, bmp);
   // Clean up
   bitmap.recycle();
   }
   public void bind(GL10 gl)
   {
   gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
   }
   public static XAndroidTexture createTextureFromBitmap(GL10 gl,
Bitmap bmp)
   {
   return new XAndroidTexture(gl, bmp);
   }
}


Texture loading function:


XAndroidTexture Textureload(String path)
   {
   InputStream is;
   Bitmap bmp = null;
   try
   {
   is = this.getAssets().open(path);
   BitmapFactory.Options opts = new
BitmapFactory.Options();
   opts.inDither = true;
   Bitmap tBmp = BitmapFactory.decodeStream(is, null,
opts);
   bmp = Bitmap.createBitmap(tBmp.getWidth(),
tBmp.getHeight(), Bitmap.Config.ARGB_);
   Canvas canvas = new Canvas(bmp);
   canvas.drawBitmap(tBmp, 0, 0, null);
   canvas.save();
   tBmp.recycle();
   tBmp = null;
   }
   catch (IOException e)
   {
   e.printStackTrace();
   }
   if(bmp == null)
   return null;
   else
   return new XAndroidTexture(gl, bmp);
   }


It working on Emulator perfect, but not on device
Can anyone post here texture class that work on device?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Opengl ES Texture working on Emulator but not on Device

2011-07-16 Thread odrya12
I tried everything..
Source:
Texture class:
public class XAndroidTexture
{
private int[] textures = new int[1];
public int width, height;
Bitmap bmp;

public XAndroidTexture(GL10 gl, Bitmap bitmap)
{
gl.glEnable(GL10.GL_TEXTURE_2D);
this.bmp = bitmap;
width = bmp.getWidth();
height = bmp.getHeight();
gl.glGenTextures(1, textures, 0);
// ...and bind it to our array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

// create nearest filtered texture
gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);

gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);

 gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
GL10.GL_MODULATE);
// Use Android GLUtils to specify a two-dimensional texture 
image
from our bitmap
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
 //GLUtils.texSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, bmp);

// Clean up
bitmap.recycle();

}

public void bind(GL10 gl)
{
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
}

public static XAndroidTexture createTextureFromBitmap(GL10 gl,
Bitmap bmp)
{
return new XAndroidTexture(gl, bmp);
}
}

Texture loading function:

XAndroidTexture Textureload(String path)
{
InputStream is;
Bitmap bmp = null;
try
{
is = this.getAssets().open(path);

BitmapFactory.Options opts = new
BitmapFactory.Options();
opts.inDither = true;
Bitmap tBmp = BitmapFactory.decodeStream(is, null,
opts);
bmp = Bitmap.createBitmap(tBmp.getWidth(),
tBmp.getHeight(), Bitmap.Config.ARGB_);
Canvas canvas = new Canvas(bmp);
canvas.drawBitmap(tBmp, 0, 0, null);
canvas.save();
tBmp.recycle();
tBmp = null;
}
catch (IOException e)
{
e.printStackTrace();
}
if(bmp == null)
return null;
else
return new XAndroidTexture(gl, bmp);
}

It working on Emulator perfect, but not on device
Can anyone post here texture class that work on device?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Expandable List with Progress Bar or Dialog

2011-07-16 Thread Frito Lay
I have an expandable list where the children are not loaded until a
group is clicked.  The children are loaded using an HTTP request to a
PHP service.  I want to show either a progress bar inside the group
view, or show a "please wait, loading..." dialog box while the
children are being fetched.  Any ideas how to accomplish this?  The
groups are also loaded via HTTP request to a PHP service and I have a
message dialog being displayed while loading the groups but cannot
figure out a way to do it with the children

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

2011-07-16 Thread sharad
I'm biginner and use eclips with ADK for development.
i'm not able to run through with 'my hello' world yet.
when i run the programme it gives me error that use '@foo' when
refering emulator 'foo'.
when i start emulator from ADK directly then emulator loads.
But when run through eclips it shows error above.

in code nowhere the name of the emulator is written, neigther in
reference too.
Can somebody help?
-Sharad

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

2011-07-16 Thread Árón
I'm trying to set the text in a TextView that is found in a layout xml
file that is not the layout file used as the setContentView for my
activity. The layout file that the TextView is located in is a sub
layout file used to populate a list item with database information for
a ListView in the main layout file.

When I use the code below to call the TextView I'm getting a null
pointer error as I realise now its looking in the parent Layout file
where it doesn't exist. How do I go about calling it from the sub
layout file?

TextView currency = (TextView) findViewById(R.id.currency);
currency.setText(cur);

Thanks A

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

2011-07-16 Thread Donovan
Hi Anilkumar, 

I would think something like 
HttpGet
 would 
be what you're looking for (even if its feed based).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] More fixes for NFCDemo sample in 2.3.3...

2011-07-16 Thread Chuck
Hi,

I have looked at previous post and I fixed two major issues in the NFCDemo 
(The library issue and the Manifest problem). The automatically generated 
files still do not generate inside of eclipse. Is there a guide somewhere on 
all of the fixes needed to get this fixed. Also does anyone know if the 
Netcom MicroSD NFC card will work with this demo if I modify the technology 
profile in the Manifest file??

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: Send dtmf tone on uplink

2011-07-16 Thread Brian @ SPG
I just put out a inquiry on this just a few days ago and was also told
it can't be done.
I made some mp3 files of the various DTMF sequences I wanted - which
play nicely when I press the buttons on my app - but it doesn't go out
to the other end.
You'd think this would be possible.
Several years ago, I tried inserting DTMF via the headset jack of a
conventional cell phone, but the vocoder mangled it such that it
couldn't be detected at the other end.
- Brian

On Jul 15, 2:32 am, Amit Mangal  wrote:
> Hi Everyone,
>
> I want to send dtmf tone 12345 when called party picked up the phone .
>
> I am not getting idea from where to start ?
>
> is any one can guide me for sending dtmf tone from where to strat ?
>
> is it possible on android ?
>
> 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] error: device not found suddenly...

2011-07-16 Thread wan
Hi Android experts.. I desperately need your help.

I was able to upload my apk file to my Samsung GT-I5801, firmware
version 2.1-update.
I did not do anything to make it work (it is MAC book) other than at
phone -- Setting * Application * Development -- check USB debugging.

Thereafter I run
adb -d install -r ./bin/nicetrip-debug.apk

Until one time, I changed my phone's SIM card, and since then above
adb command will always give me below error

error: device not found


Is there any suggestion how to debug or fix?


Thanks,
-iwan



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

2011-07-16 Thread Árón
Hey guys the main layout xml file for my activity is
R.layout.date_list_layout as it is used as follows

 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.date_list_layout);

However I wish to set the text in a TextView from this same activity
in another layout xml file R.layout.display_item

I know I would usually use the code below but this is not working as
the R.id.currency TextView is not in the main
R.layout.date_list_layout

TextView currency = (TextView) findViewById(R.id.currency);
currency.setText(cur);

I know the next line of code is incorrect but is there a way to write
a similar line of code to access the R.id.currency in the
R.layout.display_item xml or can this not be done?

TextView currency = (TextView) findViewById(R.layout.display_item/
R.id.currency);
currency.setText(cur);

Some help would really be appreciated as this has me boggled the last
two days and I can't find any solution online

Thanks A

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ActionBar/Mode Style Regressions with SDK 12r2 and 13r1

2011-07-16 Thread Jake Wharton
I managed to fix these up fairly easily. I can only assume the removed 
styles were not meant to be public yet and that the styling of action modes 
is being limited to provide a more consistent experience.

The missing attributes definitely need to be on the API differences report 
at the very least.

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

2011-07-16 Thread Kostya Vasilyev
A search for Point2D in the SDK docs didn't turn up any classes that are 
supported by Android...


 which is not surprising, because Point2D is an AWT class, and 
Android has no support for AWT.


FWIW, distance is sqrt (dx^2 + dy^2), I assume that's common knowledge.

If you have lotsa code that has references to Point2D, you can just 
declare your own namesake class.


-- Kostya

17.07.2011 0:45, bob пишет:

I want to use the Point2D.distance function on Android.  Anyone know
why this doesn't work?



--
Kostya Vasilyev

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

2011-07-16 Thread bob
I want to use the Point2D.distance function on Android.  Anyone know
why this doesn't work?

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

2011-07-16 Thread Goutom
Edited version of question"

On Sat, Jul 16, 2011 at 11:40 AM, Goutom  wrote:

> Hi
> I hav two xml file.
>
> 1. main.xml
>
> --start
> 
> http://schemas.android.com/apk/res/android";
> android:orientation="vertical" android:layout_width="fill_parent"
> android:layout_height="fill_parent">
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:paddingTop="5dip" android:paddingBottom="5dip"
> android:paddingLeft="5dip" android:background="#b4b4b4">
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_alignParentLeft="true"
> android:orientation="vertical">
>  android:text="Heade1"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textColor="#00" />
>
>  android:text="Header2"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textColor="#00" />
>
>  android:text="Header3"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textColor="#00" />
> 
>
>  android:src="@drawable/listheadericon"
> android:layout_alignParentRight="true"
> android:layout_width="52dip"
> android:layout_height="52dip" android:scaleType="fitXY" />
>
> 
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:focusable="false" android:clickable="true"
> android:focusableInTouchMode="false">
>  android:orientation="vertical"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" android:focusable="false"
> android:clickable="true" android:focusableInTouchMode="false">
> 
> 
>
> 
>
>
> --end--
>
> 2.customlistitem.xml
>
> ---start
> 
> http://schemas.android.com/apk/res/android";
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:paddingTop="5dip" android:paddingBottom="5dip"
> android:paddingLeft="0dip" android:focusable="false"
> android:clickable="true"
> android:focusableInTouchMode="false" android:fitsSystemWindows="true"
> android:orientation="vertical">
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content">
>  android:text="Header"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content" />
>
> 
>
>  android:id="@+id/listgg" android:layout_alignParentLeft="true"
> android:layout_height="wrap_content" android:paddingTop="0dip"
> android:paddingBottom="0dip" android:paddingLeft="0dip"
> android:focusable="false" android:clickable="true"
> android:focusableInTouchMode="false"
> android:fitsSystemWindows="true">
>  android:id="@+id/itemla"
> android:layout_alignParentLeft="true"
> android:layout_centerVertical="true"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:paddingLeft="5dip" android:focusableInTouchMode="true"
> android:focusable="false">
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:textSize="18sp"
> android:textStyle="bold" android:textColor="#ff"
> android:text="text1" />
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:textColor="#ff"
> android:textSize="15sp" android:textStyle="bold"
> android:text="text2" />
> 
>
>  android:src="@drawable/nonclicked"
> android:layout_alignParentRight="true"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:paddingRight="4dip" />
> 
>
>  android:layout_width="fill_parent" android:layout_height="4dip"
> android:layout_alignParentLeft="true" android:background="#b4b4b4">
> 
>
> 
>
> --end--
>
>
> I will put "green text code" in "red text code" programatically (  I did
> this ).I want to set focusable the "green text code" xml file(an item).
>
> I tried this:
> android:focusable="fa

[android-developers] ActionBar/Mode Style Regressions with SDK 12r2 and 13r1

2011-07-16 Thread Jake Wharton
I develop a library  which attempts to allow 
for the use of the action bar design pattern on pre-3.0 versions of Android 
using the 3.0+ API via a support method (much like the compat library on 
which it is based). In order to provide the ability to use a single theme 
that can be applied across both the native and custom action bar widget 
implementations, I rely on duplicating all of the action bar and action 
mode-related theme attributes to non-android prefixed versions. This will 
let the custom implementation refer to them directly (e.g., 
android:layout_height="?actionBarSize") and the styles in values-v11/ to map 
them back to their native theme attributes (e.g., ?actionBarSize).

With the introduction of the 12r2 and 13r1 SDK it would seem a few of the 
theme attributes have changed as well as the visibility and name of other 
styles has changed completely (as in the old versions are gone). Namely,

   - Attribute: android:actionModePopupWindowStyle
   - Attribute: android:actionModeStyle
   - Style: Widget.Holo.ActionBarView_TabBar
   - Style: Widget.Holo.ActionBarView_TabView
   - Style: Widget.Holo.ActionBarView_TabText
   - Style: Widget.Holo.Spinner.DropDown.ActionBar
   - Style: Widget.Holo.PopupWindow.ActionMode

The result of these changes is that applications which implement my library 
no longer display any style for list or tab navigation. This is a very 
serious regression in the eyes of other developers who have chosen to use my 
library.

The API differences report for 13r1 notes that tab-related styles have been 
added in form Widget.Holo.ActionBar.Tab___. Does this mean that the 
Widget.Holo.ActionBarView_Tab___ styles were never meant to be consumed 
publicly in in 3.0r1 and 3.1r1? If this is the case, why then were they 
featured on the Android 
blog?
 There 
is currently no API differences report for 12r2.

In poking around the themes.xml included with the 13r1 SDK the two 
attributes listed above are included but reference to them will always give 
you a compile error. Even switching my build platform to 11r1 (the folder 
contents of which has not been updated since February 22nd) produces this 
error.

For a demonstration of this, you can look at the aforementioned styled 
sample which has been compiled using my library:

QR/Link:
Note that the tabs no longer get touch events when their text is clicked on 
directly. If you change the navigation mode to list you'll see that the 
dropdown no longer operates as expected and reverts to a modal list dialog.

I guess my question is why hasn't the change in these attributes and styles 
been documented in the API differences report? Why are attributes that seem 
to be defined in the platforms themes.xml (e.g., android:actionModeStyle) 
and styles.xml (e.g., Widget.Holo.Light.Spinner.DropDown.ActionBar) 
producing compile errors?

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

2011-07-16 Thread Adam Ratana
Looks like the checkout thing seems to be crashing on orders that have been 
cancelled in a certain way, or something, not just the Docomo, it happens 
with some older cancelled orders now too.  They are clickable, so it's 
possible to move to archive (or back to inbox) on each crashed one to then 
see others.  A workaround, but not ideal though.  Checkout Orders Page 
completely crashes on Tablet and Phone browsers though, can only really see 
the checkout orders page from a desktop browser - haven't found a workaroud 
yet, if others can also report this issue if you encounter that, hopefully 
action will be taken soon.

The market wackiness is a little frustrating, I'm small potatoes though; I 
can only imagine how it may be affecting people who depend on sales from a 
consistently working market.

Adam

On Saturday, July 16, 2011 11:49:11 AM UTC-4, Nikolay Elenkov wrote:
>
> On Sun, Jul 17, 2011 at 12:06 AM, Adam Ratana  wrote:
> > This seems to be happening again.  I also noticed the following:
> > 1. App descriptions sometimes display in a random language on the 
> honeycomb
> > market app (mine and others)
>
> This is also happening on the new phone version of Market. 'What's new'
> is displayed in one language, the description in another. Sometimes, if
> you are lucky, both are displayed in the same language. The whole
> silliness with reordering comments based on some unknown 'usefulness'
> metric is also quite annoying: the top comments are sometimes months
> old.
>
> > 2. Google checkout seems to be crashing when particular orders are in the
> > inbox or archive (for me it's some cancelled ones from Japan)
>
> There was a problem with handling orders from Docomo yesterday
> or the day before. I think it's fixed now.
>
> > 3. There was a strange spike in the active installs of the free version 
> of
> > my app, followed by an adjustment a day or two later, around the time 
> this
> > issue first surfaced.
>
> Those numbers depend on cosmic radiation and maybe solar flares.
>
> > 4. Saw some doubling up of my screenshots, a small low-res version 
> followed
> > by the standard one.
>
> Was the same on the new phone version too, but it seems it's fixed now.
> (for now?)
>
> All in all, business as usual.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: List View and Simple Cursor Adapter

2011-07-16 Thread Kostya Vasilyev

It's called as many times as ListView sees fit.

FWIW, I've also seen getView called more times than the number of 
visible list items (about 2X the number).


Don't worry about it - just make sure your getView does the right thing, 
based on the item's "position".


Also don't assume a one to one mapping between items and their views. 
Specifically, don't try to create some kind of secondary data structure 
back-mapping the items to their respective views.


-- Kostya

16.07.2011 22:29, ΙΟΥΛΙΑ ΓΡΗΓΟΡΙΑΔΟΥ пишет:

Ok Thanks for the explanation,
but when I start the app , for example I have 1 list item,(with 2 
textviews, a button and an imageview in the list_item.xml) I see that 
the getView() is called 3 times.


...?

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


--
Kostya Vasilyev

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

2011-07-16 Thread Goutom
Hi
I hav two xml file.

1. main.xml
--start

http://schemas.android.com/apk/res/android";
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">






















--end--

2.customlistitem.xml
---start

http://schemas.android.com/apk/res/android";
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:paddingTop="5dip" android:paddingBottom="5dip"
android:paddingLeft="0dip" android:focusable="false"
android:clickable="true"
android:focusableInTouchMode="false" android:fitsSystemWindows="true"
android:orientation="vertical">





















--end--


I will put "green text code" in "red text code" programatically (  I did
this ).I want to set focusable the "green text code" xml file.

I tried this:
android:focusable="false" android:clickable="true"
android:focusableInTouchMode="false"
also this:
android:focusable="false" android:clickable="true"
android:focusableInTouchMode="false"

But these dont work.What to do?

Thanks in advance.

Regards
Goutom

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: List View and Simple Cursor Adapter

2011-07-16 Thread ΙΟΥΛΙΑ ΓΡΗΓΟΡΙΑΔΟΥ
 Ok Thanks for the explanation,
 but when I start the app , for example I have 1 list item,(with 2
textviews, a button and an imageview in the list_item.xml) I see that the
getView() is called 3 times.

...?

Thank you!

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

[android-developers] Getting a contact name given its phone number

2011-07-16 Thread Sanchiski
Hello everyone, I am trying to retrieve contact names given the
contact phone number. I made a function that should work in all API
versions, by I can't make it work in 1.6 and I can't see the problem,
maybe someone can spot it? Notice that I've replaced it the API
constants for strings so I don't have deprecated warning problems.


public String getContactName(final String phoneNumber)
{
   Uri uri;
   String[] projection;

   if (Build.VERSION.SDK_INT >= 5)
   {
   uri = Uri.parse("content://com.android.contacts/phone_lookup");
   projection = new String[] { "display_name" };
   }
   else
   {
   uri = Uri.parse("content://contacts/phones/filter");
   projection = new String[] { "name" };
   }

   uri = Uri.withAppendedPath(uri, Uri.encode(phoneNumber));
   Cursor c =
this.getContentResolver().query(uri,projection,null,null,null);

   String contactName = "";

   if (c.moveToFirst())
   {
   contactName = c.getString(0);
   }

   c.close();
   c = null;

   return contactName;
}

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


[android-developers] Getting contact name by phone number

2011-07-16 Thread Sanchiski
Hello everyone, I am trying to retrieve the contact name given a
contact phone number. I made a function that should work in all API
versions, by I can't make it work in 1.6 and I can't see the problem,
maybe someone can sport it? Notice I replace it the API constants for
strings so I don't have deprecated warning problems.

public void getContactName(final String phoneNumber)
{
Uri uri;
String[] projection;

if (Build.VERSION.SDK_INT >= 5)
{
uri = Uri.withAppendedPath(Uri.parse("content://
com.android.contacts"), "phone_lookup");
projection = new String[] { "display_name" };
}
else
{
uri = Uri.parse("content://contacts/phones/filter");
projection = new String[] { "name" };
}

uri = Uri.withAppendedPath(uri, Uri.encode(phoneNumber));
Cursor cursor = this.getContentResolver().query(uri, projection,
null, null, null);

String contactName = "";

if (cursor.moveToFirst())
{
contactName = cursor.getString(0);
}

cursor.close();
cursor = null;

return contactName;
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 1:20 PM, Kostya Vasilyev  wrote:
> How about:
>
> "Last updated: HH:MM:SS"

This, of course, is the best answer. Constantly updating an app widget
is cute and all, but not especially efficient.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 1:14 PM, cathal coffey  wrote:
>>When the alarm period changes, have your alarm-handling logic cancel the 
>>existing alarm and schedule a new one.
> Okay but this is my question, how do I do this?

Call cancel() on AlarmManager. Then call setRepeating() on AlarmManager.

> My AppWidget's Button
> fires the below logic when it is pressed.
>
> AlarmManager mgr =
> (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
> Intent i = new Intent(context, OnAlarmReceiver.class);
> PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
> mgr.setRepeating(AlarmManager.ELAPSED_REALTIME,
> SystemClock.elapsedRealtime(), 1000, pi);
> mgr.cancel(pi);

Which means the above cancel() and setRepeating() calls go in the
onReceive() of OnAlarmRecevier, or possibly in an IntentService that
is started by onReceive() of OnAlarmReceiver.

> There is no way to detect when the alarm period should change because
> there is no way to communicate between the Alarm's fired function and
> the AppWidgets non-existent state.

Sure there is.

onReceive() of OnAlarmReceiver needs two pieces of information:

-- the time when the state should change
-- what the new state is

where by "state" I mean the new alarm period, how long it should
remain on that period, etc. Just a classic state machine.

You can either attach that information as extras on the Intent you use
with the PendingIntent for the alarm itself (in which case onReceive()
gets those extras off the supplied Intent), or you store that
information in a file/database/SharedPreferences and read it in in
onReceive().

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread Kostya Vasilyev

How about:

"Last updated: HH:MM:SS"

Done.

-- Kostya

16.07.2011 20:47, cathal coffey пишет:

What I am currently trying to do is add a second label which displays
the "freshness" of this data


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread cathal coffey
>Update your app widget's RemoteViews when the alarm goes off.
Okay no problem.

>When the alarm period changes, have your alarm-handling logic cancel the 
>existing alarm and schedule a new one.
Okay but this is my question, how do I do this? My AppWidget's Button
fires the below logic when it is pressed.

AlarmManager mgr =
(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
Intent i = new Intent(context, OnAlarmReceiver.class);
PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
mgr.setRepeating(AlarmManager.ELAPSED_REALTIME,
SystemClock.elapsedRealtime(), 1000, pi);
mgr.cancel(pi);

There is no way to detect when the alarm period should change because
there is no way to communicate between the Alarm's fired function and
the AppWidgets non-existent state.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread rich friedel
The only way you are going to have that data available is just like Mr. 
Murphy said... you need to store it.

Because using a file and using DB would be extreme overkill IMO I would look 
into using SharedPreferences
http://developer.android.com/reference/android/content/SharedPreferences.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

Re: [android-developers] Re: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 12:47 PM, cathal coffey  wrote:
> I have an AppWidget with one button. When this button is pressed the
> AppWidget makes a call to a web service and displays the returned
> result on a label. This I have done and it works great.

Hopefully, you are using an IntentService with this, since you cannot
reliably do network I/O from an AppWidgetProvider (which, under the
covers, is a manifest-registered BroadcastReceiver).

> It also seems like
> the AlarmManager is not going to work.

No, AlarmManager is your only choice. Either use that or don't bother
with this feature.

Update your app widget's RemoteViews when the alarm goes off. When the
alarm period changes, have your alarm-handling logic cancel the
existing alarm and schedule a new one.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread cathal coffey
Mark,

thank you for your answer, especially on a Saturday.

Let me explain exactly what I am trying to do. Perhaps it is against
the SDKs ethos and that's why my simple task seems so difficult to
implement using the Android SDK.

I have an AppWidget with one button. When this button is pressed the
AppWidget makes a call to a web service and displays the returned
result on a label. This I have done and it works great.

What I am currently trying to do is add a second label which displays
the "freshness" of this data: seconds old, minutes old, hours old,
etc.
This would seem like a very common scenario. I can think of 5
AppWidgets --off the top of my head-- that I want to create that will
require this exact same mechanism.

Can you help me create this mechanism? You have already explained that
a Timer and TimerTask is not the correct approach. It also seems like
the AlarmManager is not going to work. You seem like an Android
expert, can you help me achieve my goal?

Cathal

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

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 12:27 PM, arun kumar  wrote:
> I am developing one application using Google map. In that application i want
> to show current location.

Use MyLocationOverlay.

> and Also in that map google text is display in
> left bottom cornor. i want to hide this text also.

AFAICT, that is in violation of the terms and conditions, though you
should discuss this with qualified legal counsel.

If you do not wish to abide by the terms and conditions, use another
mapping technology (e.g., Open Street Map).

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-07-16 Thread arun kumar
Dear all,
I am developing one application using Google map. In that application i want
to show current location. and Also in that map google text is display in
left bottom cornor. i want to hide this text also.Please help me how cab\n
we solve this issue?

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

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 12:15 PM, b_t  wrote:
> Can somebody explain something about Xoom?
>
> I would like to get external sd path

There is no such concept in Android as "external sd path".

> but it returns the internal
> storage as
> /mnt/sdcard

No, that is external storage. External storage does not mean "can be
physically removed by the user without requiring a soldering iron".
External storage means "can be mounted as a drive or volume on a host
machine when the device is connected via USB".

> The real sd path is /mnt/external1 but I can't get it from the Api.

There is no API to get an "sd path". Device manufacturers will declare
something to be external storage. On older devices, this tends to be
an SD card. On newer devices, this tends to be on-board flash. Newer
devices with external storage as on-board flash may also have some
form of SD card slot; there is no API means of getting a path to that
SD card slot or determining its state (e.g., is there media in it).

> Is it a bug in Xoom firmware?

No.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 12:04 PM, cathal coffey  wrote:
> Unless I am thinking about this incorrectly. The function  onReceive
> in the  OnAlarmReceiver class needs to have a reference to the widget
> instance, see the below code.

There is no "widget instance".

> How else can the OnReceive function know
> how many times it has fired and change its firing rate accordingly?

Use a file. Or a database. Or, conceivably, extras on the Intent you
use with the alarm. The first two would be simpler to code but will
involve disk I/O, which ideally is not performed on the main
application thread (where onReceive() and onUpdate() and such are
called).

> public class OnAlarmReceiver extends BroadcastReceiver
> {
>        @Override
>        public void onReceive(Context context, Intent intent)
>        {
>                MyWidget myWidget = SomeMagicFunction();

If "MyWidget" is a subclass of AppWidgetProvider, there is no instance
when your alarm goes off. An instance of MyWidget will hopefully live
for less than a millisecond, during your onUpdate() processing (and
any other app widget lifecycle methods you elect to respond to). Once
onUpdate() returns, that MyWidget instance is gone, until the next
onUpdate() call when a new instance is created.

Any data that you have that is supposed to persist beyond a single
onUpdate() call must live someplace else, such as a file, database,
etc.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-07-16 Thread b_t
Hi,

Can somebody explain something about Xoom?

I would like to get external sd path but it returns the internal
storage as
/mnt/sdcard

The real sd path is /mnt/external1 but I can't get it from the Api.

Is it a bug in Xoom firmware? I have Android 3.2.

Thanks, Tamás

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


[android-developers] Re: Weird java.util.Timer behavior in App Widget

2011-07-16 Thread cathal coffey
Mark,

I think you miss understood what I mean by a reference to my Widget.

Unless I am thinking about this incorrectly. The function  onReceive
in the  OnAlarmReceiver class needs to have a reference to the widget
instance, see the below code. How else can the OnReceive function know
how many times it has fired and change its firing rate accordingly?

public class OnAlarmReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
MyWidget myWidget = SomeMagicFunction();

// Check myWidget.count to see how many times this alarm has 
fired.
if(myWidget.count == 60)
{
// We no longer want to fire once a second, we
now want to fire once a minute.
myWidget.alarmManager.cancel(myWidget.pi);

myWidget.alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME,
SystemClock.elapsedRealtime(), 1000 * 60, myWidget.pi);
}
}
}

I have two questions.
1) Is this the correct approach? If not then what.
2) If so then how do I do the following MyWidget myWidget =
SomeMagicFunction()

Kind regards,
Cathal

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 06:28:32AM -0700, rich friedel wrote:
> Sorry, didn't mean to come across as brash... just meant if you only read 
> the first, which is more of a pop-media take, that you need to read the 
> second article as it gives a deeper look into what is going on.

I just did.  Is today April 1st?

Seriously, if this isn't a joke, well, it is a joke.  EVERY computer
in the world matches these descriptions in one way or another.  They
all have a processor, memory, and some sort of programs which control
their actions on something.

Wham.  Ok, everyone...time to trade in your computers, GPS units,
phones (sorry, but even an old POTS phone connects to the local
telco, where they have digital switches that clearly have an input
and output, a CPU and memory, and programming which acts on an
item (subscriber calls).  You must replace them all with bricks.

EVERY modern cell phone is toast, according to what I just read.

But, as I said earlier, I AM NOT A LAWYER (which is probably why
I can see the absurdity of this whole thing).

Later,
   --jim

-- 
73 DE N5IAL (/4)| Remember your spelling rules, including:
spooky1...@gmail.com|   I before E except after C
< Running FreeBSD 7.0 > | 
ICBM / Hurricane:   |   BEING a native-born American, I don't
   30.44406N 86.59909W  |   always notice our WEIRD spelling

Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

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


Re: [android-developers] Re: Install % not updating?

2011-07-16 Thread Nikolay Elenkov
On Sun, Jul 17, 2011 at 12:06 AM, Adam Ratana  wrote:
> This seems to be happening again.  I also noticed the following:
> 1. App descriptions sometimes display in a random language on the honeycomb
> market app (mine and others)

This is also happening on the new phone version of Market. 'What's new'
is displayed in one language, the description in another. Sometimes, if
you are lucky, both are displayed in the same language. The whole
silliness with reordering comments based on some unknown 'usefulness'
metric is also quite annoying: the top comments are sometimes months
old.

> 2. Google checkout seems to be crashing when particular orders are in the
> inbox or archive (for me it's some cancelled ones from Japan)

There was a problem with handling orders from Docomo yesterday
or the day before. I think it's fixed now.

> 3. There was a strange spike in the active installs of the free version of
> my app, followed by an adjustment a day or two later, around the time this
> issue first surfaced.

Those numbers depend on cosmic radiation and maybe solar flares.

> 4. Saw some doubling up of my screenshots, a small low-res version followed
> by the standard one.

Was the same on the new phone version too, but it seems it's fixed now.
(for now?)

All in all, business as usual.

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

2011-07-16 Thread Greg Donald
On Sat, Jul 16, 2011 at 10:06 AM, Adam Ratana  wrote:
> 2. Google checkout seems to be crashing when particular orders are in the
> inbox or archive (for me it's some cancelled ones from Japan)

Glad to hear it's not just me.  My Google Checkout is fubar right now.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Re: Install % not updating?

2011-07-16 Thread Adam Ratana
This seems to be happening again.  I also noticed the following:

1. App descriptions sometimes display in a random language on the honeycomb 
market app (mine and others)
2. Google checkout seems to be crashing when particular orders are in the 
inbox or archive (for me it's some cancelled ones from Japan)
3. There was a strange spike in the active installs of the free version of 
my app, followed by an adjustment a day or two later, around the time this 
issue first surfaced.
4. Saw some doubling up of my screenshots, a small low-res version followed 
by the standard one.

Anyone else seeing the above?


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

2011-07-16 Thread Chrystian Vieyra
There is a problem with R12 where the SDK location cannot contain any 
spaces. You need to change the sdk location path in Eclipse.

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

2011-07-16 Thread kypriakos
Good link - thanks.

Have you tried building such Android projects using maven?

On Jul 16, 2:19 am, nageswara rao rajana 
wrote:
> try this link
>
>  http://marakana.com/forums/android/examples/311.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] emulator problem

2011-07-16 Thread Perry168
Hi all,
Today, I upgraded the emulator. After that, a error show are
following:

invalid command-line parameter: Files\Android\android-sdk-windows
\tools/emulator-arm.exe.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information

What can I do?

Thanks a lot!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 127.0.0.1 Connection refused when not connected to WiFi

2011-07-16 Thread Kristopher Micinski
On Sat, Jul 16, 2011 at 8:10 AM, Chris Stratton  wrote:

> On Saturday, July 16, 2011 2:41:12 AM UTC-4, Naveen Gayar wrote:
>>
>> Use 10.0.0.2 instead of localhost or i.p.address. This will work.
>
>
> That ?might? work on an emulator, but will not on a properly configured
> hardware android device.
>
> At any rate, the problem is not a networking one, but a web browser that is
> apparently trying to be too clever - most likely something of a "work
> offline" mode.
>
>
Read through the browser code? It's not too long iirc.

Kris

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

Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 10:02:25AM -0400, Mark Murphy wrote:
> On Sat, Jul 16, 2011 at 9:48 AM, Jim Graham  wrote:
> >> Step #1: Confirm that 42 is in the range from
> >> getFirstVisiblePosition() to getLastVisiblePosition(). Do
> >> something if it's not.

Ok, I just added that, and it sort of worked, but not really.

I selected (continuing with the example) Crisp (UK) as the brand
to move to.  After it took me to a VERY wrong position, I added
some Toast

  position = 75 first = 0

where:
   position is the target position for the first entry for Crisp,
   first is the value from mainlist.getFirstVisiblePosition();

So apparently, FirstVisiblePosition isn't the first VISIBLE
position, but the first in the entire ListView.  :-(   That makes
absolutely no sense to me at all.  But at least I now have some
other possibilities to play around with (in the expanded "Inherited
Methods" list.  Thanks for telling me about expanding that---I'd
never noticed that it was a whole collapsed section.  I thought it
was the title for the next section that followed.

So I'll be back later, either with what worked, or more possibly
stupid questions.  :-)

Thanks,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 06:36:31AM -0700, rich friedel wrote:

> I was thinking, could you put a smaller non-interactive row
> with the manufacturer name denoting where that particular
> manufacturer starts for each set of manufacturers. Similar to
> how the settings preferences are displayed.

It's already set up similar to that.  If, for example, you look
at the very top, you'll see the following:

   .-.
   | Briess (US) 2 Row   |
   |_|
   | Briess (US) 6 Row   |
   |_|
   | Briess (US) Aromatic|
   |_|
   | Briess (US) Ashbourne Mild  |
   |_|
   | Briess (US) Barley Flakes   |
   |_|

and so on.  So it's obvious enough which brand any row is for.
I just don't like the idea of a user selecting a given brand from
an index, and instead of them seeing the first entry for that
brand on the top, having it show up on the bottom, like this
example, where the selected brand is Crisp (UK), and the code
instructed the ListView to scroll to the position for the first
row for Crisp:


   .--.
   | Castle (Belgium) Belgian |
   | Caramel Vienne (19-27)   |
   |__|
   | Castle (Belgium) Belgian |
   | Chocolate|
   |__|
   | Castle (Belgium) Belgian De- |
   | bittered Black   |
   |__|
   | Castle (Belgium) Belgian |
   | bittered Black   |
   |__|
   | Castle (Belgium) Belgian Pale|
   | Ale  |
   |__|
   | Castle (Belgium) Belgian |
   | Pilsner  |
   |__|
   | Castle (Belgium) Belgian |
   | Special B|
   |__|
   | Crisp (UK) Amber |
   `__'


To me, that's just wrong

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 9:48 AM, Jim Graham  wrote:
>> Step #1: Confirm that 42 is in the range from
>> getFirstVisiblePosition() to getLastVisiblePosition(). Do
>> something if it's not.
>
> Interesting.  A search on that in the dev guide leads me to
> ListView, where, unless I missed it again and again, it isn't
> even mentioned.  :-)  So let me see if I have this right, without
> referring to the dev guide (which usually seems to produce much
> better search results for me these days)

Those methods are on AdapterView, an ancestor class. Click on [Expand]
on "Inherited Methods" in ListView to see them on the ListView page.

> I have a ListView; let's call it myList.  I would use something
> like:
>
>   topidx = myList.getFirstVisiblePosition()
>
> to find out what the position/row number is on top of the screen.
>
> If it's the one I want, I'm done.  If not, move the one I want up
> by the difference, and double-check, adjusting again if I missed
> by one.
>
> Have I got that right?  If so, that's exactly what I need to
> solve all of this.  If not, what did I miss?

Sounds plausible.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-07-16 Thread Simon Platten
I've used a spinner with a Base Adapter.  The spinner works fine and I can
make selections, my question is:

When I'm not making a selection the spinner shows as an empty box with a
down arrow, once I've made a selection the list is removed but the spinner
still shows empty, shouldn't it show the current / last selection ?

The XML for my spinner looks like this:



The ivFolder looks like:


http://schemas.android.com/apk/res/android";
 android:layout_width="fill_parent"

 android:layout_height="?android:attr/listPreferredItemHeight"
 android:padding="10dp">



Thank you,

-- 
Regards,
Sy

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

Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 09:28:06AM -0400, Mark Murphy wrote:
> On Sat, Jul 16, 2011 at 9:19 AM, Jim Graham  wrote:

> I've never done this, so this is very rough. YMMV. Also, I am
> assuming that 42 is a position and that you have no headers or
> footers on the list.

Yes, when I said "row 42" I did mean the row at position 42.
And you are correct, I haven't added any headers or footers.
And row, ummm, excue me, position 42, is just a hypothetical
row number/position/whatever.  It could be anywhere from 0 to
297 (or was that 296?  I can't remember off-hand.)  42 was just
a randomly-selected example position.

> Step #1: Confirm that 42 is in the range from
> getFirstVisiblePosition() to getLastVisiblePosition(). Do
> something if it's not.

Interesting.  A search on that in the dev guide leads me to
ListView, where, unless I missed it again and again, it isn't
even mentioned.  :-)  So let me see if I have this right, without
referring to the dev guide (which usually seems to produce much
better search results for me these days)

I have a ListView; let's call it myList.  I would use something
like:

   topidx = myList.getFirstVisiblePosition()

to find out what the position/row number is on top of the screen.

If it's the one I want, I'm done.  If not, move the one I want up
by the difference, and double-check, adjusting again if I missed
by one.

Have I got that right?  If so, that's exactly what I need to
solve all of this.  If not, what did I miss?

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Killing rogue plug-in threads within an Android application

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 9:35 AM, DCA  wrote:
> Am I right in assuming that there is no way to forceably stop a
> misbehaving thread within an Android application short of killing the
> process that owns the thread? My problem is that I'm loading java-
> based plug-ins (not ARM binaries) into my framework dynamically (using
> OSGi) and running each plug-in on its own thread. My framework
> configures, starts and holds a reference to each plug-in thread;
> however, if a plug-in misbehaves (i.e. keeps running even when told to
> stop), my framework is unable to forceably kill the thread its running
> on. Deprecated Thread methods for this purpose (e.g. 'stop') are not
> implemented in Android, so I seem to be left with flags and
> interrupts, which can be easily ignored accidentally or on purpose.

Since you wrote the plug-ins, fix the misbehaving threads. You should
not load arbitrary third-party plug-ins into your own application, due
to the security issues outlined by Mr. Stratton.

Beyond that, I know of no reliable way to forcibly stop a thread that
refuses to cooperate. I do not know what ordinary OSGi hosts do in
this case -- I'm not aware of Android threads being significantly more
difficult to stop than are Java threads on regular Linux.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread rich friedel
I've not messed with ListView at all so I may be way off here...

I was thinking, could you put a smaller non-interactive row with 
the manufacturer name denoting where that particular manufacturer starts for 
each set of manufacturers. Similar to how the settings preferences are 
displayed.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Killing rogue plug-in threads within an Android application

2011-07-16 Thread DCA
Thanks for the insights, Mark.

Am I right in assuming that there is no way to forceably stop a
misbehaving thread within an Android application short of killing the
process that owns the thread? My problem is that I'm loading java-
based plug-ins (not ARM binaries) into my framework dynamically (using
OSGi) and running each plug-in on its own thread. My framework
configures, starts and holds a reference to each plug-in thread;
however, if a plug-in misbehaves (i.e. keeps running even when told to
stop), my framework is unable to forceably kill the thread its running
on. Deprecated Thread methods for this purpose (e.g. 'stop') are not
implemented in Android, so I seem to be left with flags and
interrupts, which can be easily ignored accidentally or on purpose.

>From what you wrote, it might be possible for me run my framework in
one process and my dynamically loaded plug-ins in a second process.
That way, if I need to kill a misbehaving plug-in, I could kill the
second process, mark the plug-in as problematic, and uninstall it
prior to restarting the second process. Of course, this is a
heavyweight approach, and it would be much simpler if my framework
could simply forceably stop a misbehaving thread. Any ideas or tricks
in this regard?

Cheers,
DCA


On Jul 16, 1:26 pm, Mark Murphy  wrote:
> On Sat, Jul 16, 2011 at 7:15 AM, DCA  wrote:
> > however, do applications with multiple processes share the same memory
> > space, or is AIDL required to communicate between components running
> > in a separate process, even though they are both part of the same
> > application?
>
> They do not share the same memory space, by definition.
>
> > Can an application
> > "launch" additional processes arbitrarily, or is there some Manifest
> > configuration necessary?
>
> If you are just trying to run some ARM binary that you copied onto the
> device, forking a process via standard Java should work. Though an ARM
> binary will only work on ARM devices, not x86 (e.g., Google TV)
> devices.
>
> If you are expecting a Dalvik VM and Android components to be in the
> other process, you have to add an android:process attribute to the
> manifest to indicate that such-and-so component should run in another
> process.
>
> Neither of this is a good idea, because extra processes take up extra
> RAM. A well-written Android application usually uses zero processes
> (i.e., is not running), and only uses one process when the user asks
> for it to run.
>
> > Also, what about filesystem access - i.e. can
> > each process in an single application access each others' files?
>
> They will all run as the same user account and have the same "home
> directory" (i.e., getFilesDir()).
>
> > My
> > end goal is to be able to isolate and possibly terminate misbehaving
> > plug-ins that have been loaded at runtime using OSGi.
>
> IMHO, getting OSGi to work well without custom firmware may be difficult.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread rich friedel
Sorry, didn't mean to come across as brash... just meant if you only read 
the first, which is more of a pop-media take, that you need to read the 
second article as it gives a deeper look into what is going on.

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

Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 9:19 AM, Jim Graham  wrote:
> So, here goes.  How, from the code, can I determine the exact
> location (top of display, bottom of display, specific point in
> between on the display, ec.) where row 42 (or whatever) is at?

I've never done this, so this is very rough. YMMV. Also, I am assuming
that 42 is a position and that you have no headers or footers on the
list.

Step #1: Confirm that 42 is in the range from
getFirstVisiblePosition() to getLastVisiblePosition(). Do something if
it's not.

Step #2: If it is, subtract 42 from getFirstVisiblePosition() to get a
child index.

Step #3: Call getChildAt() to get the row View at the specified child index.

Step #4: Use stuff like getX(), getY(), etc. to find out where that View is.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 06:13:31AM -0700, rich friedel wrote:
> @Spooky Read the FOSS one. He really breaks down what is being
> argued.

I'm sure he does...he'd HAVE TO!  I was just pointing out that
the specific bits that whoever did the article chose to highlight
are completely and utterly useless (and, while being a bit
sarcastic/tongue-in-cheek about it, also pointing out just how
vague they really are).

Later,
   --jim

-- 
73 DE N5IAL (/4)| DMR: So fsck was originally called
spooky1...@gmail.com|  something else.
< Running FreeBSD 7.0 > | Q:   What was it called?
ICBM / Hurricane:   | DMR: Well, the second letter was different.
   30.44406N 86.59909W  |-- Dennis M. Ritchie, Usenix, June 1998.

Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
Ok...seems like this is getting WAY too over-complicated for what
should be (and probably is) a very simple task.  So let me
re-state the question in a different way, using an added bit that
I just realized must be possible, if there IS a way to position
Toast over a row that is on the display, but not where it was
expected to be  (i.e., to do that, you have to be able to
determine the row's location on the screen from the code.)

So, here goes.  How, from the code, can I determine the exact
location (top of display, bottom of display, specific point in
between on the display, ec.) where row 42 (or whatever) is at?

Once I know that, I can simply move up or down by the appropriate
number of rows to move the target to the top of the display.
Or, if all I can determine is that it's not on the top, I can
move up, check, move up, check ... repeat until the target IS
on the top of the display.

Thanks,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

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

2011-07-16 Thread rich friedel
Mario with libgdx has an epic moment where this happens live in the middle 
of one of his video tutorials... F**K YOU ECLIPSE...it is hilarious!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread rich friedel
@Spooky Read the FOSS one. He really breaks down what is being argued.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 127.0.0.1 Connection refused when not connected to WiFi

2011-07-16 Thread Chris Stratton
On Saturday, July 16, 2011 2:41:12 AM UTC-4, Naveen Gayar wrote:
>
> Use 10.0.0.2 instead of localhost or i.p.address. This will work.


That ?might? work on an emulator, but will not on a properly configured 
hardware android device. 

At any rate, the problem is not a networking one, but a web browser that is 
apparently trying to be too clever - most likely something of a "work 
offline" mode.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 05:25:55AM -0700, rich friedel wrote:
> I know this is not exactly programming (code) related. However, this
> one decision seriously affects every single one of us here...

* U.S. Patent No. 5,946,647 on a "system and method for
  performing an action on a structure in computer-generated
  data."

Well, as stated, that applies to just about every computer, past,
present, and future.  Most data networking equipment is out, as
well.
 
* U.S. Patent No. 6,343,263 on a "real-time signal processing
  system for serially transmitted data."

Yep, as stated, that takes virtually all voice and data
transmission out.  In fact, everything based on DSP is out.

There has to be a *LOT* more to these than what the author of this
article quotes, because the above snippets are far too vague to
be taken seriously.

NOTE:  I AM NOT A LAWYER (Thank God for that!).

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Killing rogue plug-in threads within an Android application

2011-07-16 Thread Chris Stratton
On Wednesday, July 13, 2011 9:16:56 AM UTC-4, DCA wrote:

I've developed a framework that loads potentially untrusted plug-in 
> code from a remote repository into my framework's process at runtime 
> (using OSGi). Each plug-in is started on a thread that my framework 
> holds a reference to. Problematically, misbehaving plug-ins
>

Please note that anything run in your process, or for that matter in another 
process run as your application's user ID will have the full privileges of 
your application.  Should the untrusted code cross the boundary from 
unintentionally misbehaving to malicious, it can do anything the system will 
permit your application to do, and to it in _your_ name.

Web browsers typically solve this problem for javascript by sandboxing the 
virtual machine in which the foreign code runs.  But that's not perfectly 
secure.  

Android solves the problem not by sandboxing the VM's in which applications 
run, but by using unix user ID's to separate the services the kernel 
provides to each application; you are proposing effectively to break down 
that mechanism and trust everything running at the invitation of your 
application by running it all under the same user ID.  Once you do that, 
existence of user-level administration and debug authority of all of a 
user's processes means running in the same or separate processes is just a 
convenience, not a true barrier.

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

Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 8:39 AM, Jim Graham  wrote:
>   A) change (only for the current viewing of the main list) the
>      FONT, perhaps to italic, for the selected vendor's rows?

OK. Might be a bit subtle depending on your font size.

>   B) OR, Toast, positioned over whatever position the first entry
>      for said vendor is at (if that's possible, and if it's possible
>      to determine, from the code, where that row is positioned)?

You can try to pull that off via setGravity() on the Toast, but I
suspect getting it to be reliable will be difficult.

> Or, if not that, where, in the ListView reference, does it specify
> how to insert a marker of some kind and change it from transparent
> to visible by row?  I don't recall seeing anything like that, but
> then, I wasn't looking for that, either.

It has nothing to do with ListView, per se. Add your marker to your
row layout. Configure the row marker in getView() to be marked/clear
as needed. When your range changes/is gone, call
notifyDataSetChanged() on your Adapter to force getView() to be called
again for the visible rows, if needed.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: List View and Simple Cursor Adapter

2011-07-16 Thread NikolaMKD

The getView() is called everytime the listview is populating data,
what is meant by this, getView() is called everytime when there is
need views to be recycled. Let's say if you have 20 elements in your
listview, the maximum items visible is 8, the first time you view the
listview, getView() is called 8 times, if you scroll down by x items,
then the getView() will be called x more times. It is normal seeing
getView() called multiple times.


On Jul 16, 9:57 am, juliagrig  wrote:
> Hi all,
>
> I have a listview in my app and a SimpleCursor Adapter in a different
> class. In getView method I tried to  set properties fom the text view
> of each list item.
> It works fine, but I have a log.i(",") message in the end of the
> getView() method and I see that this method run 3 times.
>  So , I see in the logat
>
> 07-16 07:48:58.401: INFO/(341): GetView done
> 07-16 07:48:58.421: INFO/(341): GetView done
> 07-16 07:48:58.541: INFO/(341): GetView done
>
> Why is this happening?
>
> Thanks in advance.

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 08:14:48AM -0400, Mark Murphy wrote:

> Bear in mind that beyond pointing devices and selection, row color
> plays an important role in tablets running Honeycomb ("activated" rows
> to show context for an adjacent fragment). I really cannot stress
> enough that you should leave the row colors for system-defined roles
> and do something else to mark rows of interest.

Ah, ok.  I've never seen one of the tablets yet.  I want one, but the
only ones I can, at times, afford, look pretty cheesy

Ok, how about one of these:

   A) change (only for the current viewing of the main list) the
  FONT, perhaps to italic, for the selected vendor's rows?

   B) OR, Toast, positioned over whatever position the first entry
  for said vendor is at (if that's possible, and if it's possible
  to determine, from the code, where that row is positioned)?

Or, if not that, where, in the ListView reference, does it specify
how to insert a marker of some kind and change it from transparent
to visible by row?  I don't recall seeing anything like that, but
then, I wasn't looking for that, either.

Thanks,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997  < Running FreeBSD 7.0 >
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com

Do not look into waveguide with remaining eye!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent developments regarding Android (HTC) patent infringement lawsuits

2011-07-16 Thread rich friedel
I know this is not exactly programming (code) related. However, this one 
decision seriously affects every single one of us here...

Here is an article...
http://www.zdnet.com/blog/hardware/apple-deals-massive-patent-blow-to-htc-android-in-serious-trouble/13714

Here is a good breakdown of what is going on...
http://fosspatents.blogspot.com/2011/07/these-tables-show-how-android-infringes.html

Now I am not trying to rip on Apple but this is absolutely ridiculous... 
This has the potential to bring the entire smartphone industry to its knees 
here in the US.

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

Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Mark Murphy
On Sat, Jul 16, 2011 at 8:09 AM, Jim Graham  wrote:
> Ok, I forgot to mention changing the foreground (I meant to
> include that, too...oh well), as an alternative, but how about
> that?  Maybe change the foreground of the rows for the vendor
> the user chose (from the "index" ListView) to start with green
> instead of white?

I wouldn't do that, either.

Bear in mind that beyond pointing devices and selection, row color
plays an important role in tablets running Honeycomb ("activated" rows
to show context for an adjacent fragment). I really cannot stress
enough that you should leave the row colors for system-defined roles
and do something else to mark rows of interest.

> And why, when I ask the ListView to scroll to a given position,
> does it insist on putting that position on the bottom of the
> display, rather than the top?

Beats me.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] how do I highlight (color) a range of entries in a ListView?

2011-07-16 Thread Jim Graham
On Sat, Jul 16, 2011 at 07:30:25AM -0400, Mark Murphy wrote:

> > Put another way: ?I have a ListView with entries from 0---297 (+/- 1).
> > A search for a particular brand's malt leads to position 42, and
> > that company's products range from positions 42---55. ?Can I
> > change the background (or foreground) color for positions 42--55,
> > while leaving the rest of the ListView its default bg/fg colors?

> IMHO, messing with backgrounds and ListViews is problematic.

Ok, I forgot to mention changing the foreground (I meant to
include that, too...oh well), as an alternative, but how about
that?  Maybe change the foreground of the rows for the vendor
the user chose (from the "index" ListView) to start with green
instead of white?

How would I do that?  And would that avoid the problems you were
mentioning about changing the background?

And why, when I ask the ListView to scroll to a given position,
does it insist on putting that position on the bottom of the
display, rather than the top?

> Bear in mind that some people use pointing devices to navigate
> Android applications.

I was wondering if there were still any non-touch-screen devices
left out there

Thanks,
   --jim

-- 
73 DE N5IAL (/4)  | 1) "Smoking habanero powder helps defeat that
< Running FreeBSD 7.0 >   |off taste' quite nicely."
spooky1...@gmail.com  | 2) "I figure a couple bong hits of [habanero]
ICBM/Hurr.: / 30.44406N   |powder would defeat just about anything!"
| 86.59909W--seen in Chile-Heads list

Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.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


  1   2   >