Re: [android-developers] customized date picker

2011-11-06 Thread vani reddy
I have already sent the code.


On Fri, Nov 4, 2011 at 6:55 PM, ramesh mandare wrote:

> please give me code
>
>
> On Fri, Nov 4, 2011 at 4:15 PM, vani reddy wrote:
>
>>
>> Hi,
>> Check out the code I  have attached.
>>
>> On Fri, Nov 4, 2011 at 3:52 PM, Ratheesh Valamchuzhy <
>> android...@gmail.com> wrote:
>>
>>> can u give me all the code to debug.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>> Regards,
>> Vani Reddy
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Regards,
Vani Reddy

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

[android-developers] Re: How to get inputstream from bitmap image file?

2011-11-06 Thread skink


On Nov 7, 7:22 am, Chirag Raval 
wrote:
> i am developing one contact application . I want to show contact image
> to my custom listview . I want to get Inputstream from that contact
> image to write into sdcard . How can i get it ?
>
> Any help is appreciated.
>
> Thanks
> Ragards,
> Chirag Raval.

read carefully Bitmap docs:

http://developer.android.com/reference/android/graphics/Bitmap.html

pskink

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


[android-developers] Auto zooming in webview

2011-11-06 Thread Perumss Naren
Hi all,

 I need to show the webview of a location (eg: Chennai) in a
zooming view that means it should first show the world view then auto
zooming (without user interaction ) should perform up to location Chennai
(that given as example) that zoom size is 0 to 21.  any one please provide
samples or link

-- 
Regards,

Perumal.N

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

[android-developers] How to get inputstream from bitmap image file?

2011-11-06 Thread Chirag Raval

i am developing one contact application . I want to show contact image
to my custom listview . I want to get Inputstream from that contact
image to write into sdcard . How can i get it ?

Any help is appreciated.

Thanks
Ragards,
Chirag Raval.

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

2011-11-06 Thread Francisco Dalla Rosa soares
if the ammount of data you wanna send is small enough to consider using SMS
as your medium you should just use App Engine or Heroku and it's gonna be
free. If you use more than the free limits of Heroku and/or App Engine that
means you really don't wanna do it through SMS for the sake of your users
(not everybody has a unlimited messages plan)



(Encapsulating TCP/IP network traffic in SMSes reminds me of when I was 15,
doing "data transfer" by running with a bunch of floppies from my house to
my friend's. whenever I had a corrupt packet - broken floppy - I'd have to
go back home and rebuild them)

2011/11/7 Belvedere Computer Services 

> > .What should I do?
> why is binary needed ?
>
> there are ( obviously ) out of the box that are something that works
> but SMS is and only is a shallow layer for niftiy text exchange
>
>  reason to be sent in binary  ?
>
> there will be something to do that already working
> On Nov 6, 4:22 pm, John Goche  wrote:
> > On Sun, Nov 6, 2011 at 5:57 PM, Kristopher Micinski
> >
> >  wrote:
> > >> I need to have a bunch of android phones send and receive data to each
> > >> other to communicate,
> >
> > > Don't use SMS, that seems like a bad idea waiting to happen.  Try
> > > using a web service or backend to do this, this is what pretty much
> > > everyone else does..
> >
> > > kris
> >
> > Yes but a web service / backend needs a separate server and I wanted to
> have
> > something that works out of the box. What should I do?
> >
> > Regards,
> >
> > John Goche
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
株式会社アルゴ ARGO Inc.
〒130-0012
東京都墨田区太平3-11-10
NTKオオノビル8階

ソアレス フランシスコ ( Soares Francisco )
Mail : soa...@argo.bz HP : http://www.argo.bz/
TEL:03-5619-4511 FAX:03-5619-4512

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

2011-11-06 Thread Mike Greene
I guess I will never know...

On Nov 3, 10:04 am, Mike Greene  wrote:
> I found a solution switch  ʃ character with this  ʆ character.
>
> I wanted to know why the error box had azigzagline in side of the
> box, instead of just the plain error box for a missing char.
>
> On Nov 3, 10:16 am, Mike Greene  wrote:
>
>
>
>
>
>
>
> > Its this symbol
>
> >         ʃ
>
> > Thanks
>
> > On Nov 2, 11:43 pm, Belvedere Computer Services 
> > wrote:
>
> > > that is what I always assume ~ the code for doing just one Character
> > > in UniWhateverTheyCall it today is like really amazing - it would help
> > > the code engineers to know where the symbol is coming from or where
> > > you think it is coming from as if the font is non-proprietary it may
> > > be useful to put it up as a feature request
>
> > > On Nov 2, 1:46 pm, Mike Greene  wrote:
>
> > > > Im trying to display dictionary pronunciation font.
>
> > > > I am aware of when you are trying to display a symbol and your font
> > > > does not have this symbol you get an empty rectangular box.
>
> > > > I am using web view on 2.2 and on a few entries I get a box with azig
> > > >zagline.
>
> > > > I cannot find any information n what this means.
>
> > > > I am assuming the platform cannot display these symbols.
>
> > > > Thanks

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


Re: [android-developers] Re: how to get the contacts of groups

2011-11-06 Thread Samar Simha reddy
I mean iam able to get the contacts groups ie, Account specific groups,,
but how can show all the list of groups from phone contacts groups
  i used   ContactsContract.Group.CONTENT_URI

2011/11/6 lokesh gupta 

> URI uri = content://contact.people
>
>
> On Sun, Nov 6, 2011 at 12:04 PM, hongbosb  wrote:
>
>> Do you mean just retrieve group list?
>>
>> I used ContactsContract.Group.CONTENT_URI to get it.
>>
>> On 11月4日, 下午5时49分, Samar Simha reddy  wrote:
>> > Hi
>> >
>> > how to retrieve the contact list based on 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
>>
>
>
>
> --
> Thanks & Regards
> Lokesh Gupta
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: more SMS questions

2011-11-06 Thread Belvedere Computer Services
> .What should I do?
why is binary needed ?

there are ( obviously ) out of the box that are something that works
but SMS is and only is a shallow layer for niftiy text exchange

 reason to be sent in binary  ?

there will be something to do that already working
On Nov 6, 4:22 pm, John Goche  wrote:
> On Sun, Nov 6, 2011 at 5:57 PM, Kristopher Micinski
>
>  wrote:
> >> I need to have a bunch of android phones send and receive data to each
> >> other to communicate,
>
> > Don't use SMS, that seems like a bad idea waiting to happen.  Try
> > using a web service or backend to do this, this is what pretty much
> > everyone else does..
>
> > kris
>
> Yes but a web service / backend needs a separate server and I wanted to have
> something that works out of the box. What should I do?
>
> Regards,
>
> John Goche

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

2011-11-06 Thread Kristopher Micinski
Using SMS just seems like a bad idea to me.  Pretty much everyone who
does this sort of thing uses a web backend (and the others don't work
well).  Seriously, using sms is going to be hackey and weird.  You can
try to Bluetooth, but my opinion (after trying it for this purpose) is
that using a server based solution is going to be much better long
term.  There are some free web backends popping up here and there.
Google "parse android" to see an example of one I've heard of but
haven't had the chance to use yet.

I agree that it seems like there should be a better way to communicate
between multiple people in your apps, but I think that right now, the
API support is limited to these third party sources (and a few make it
look fairly painless, besides, web backends give you a lot more
scalability).

Remember to design your app so you don't murder the battery life of the device.

kris

On Sun, Nov 6, 2011 at 5:22 PM, John Goche  wrote:
> On Sun, Nov 6, 2011 at 5:57 PM, Kristopher Micinski
>  wrote:
>>> I need to have a bunch of android phones send and receive data to each
>>> other to communicate,
>>
>> Don't use SMS, that seems like a bad idea waiting to happen.  Try
>> using a web service or backend to do this, this is what pretty much
>> everyone else does..
>>
>> kris
>
> Yes but a web service / backend needs a separate server and I wanted to have
> something that works out of the box. What should I do?
>
> Regards,
>
> John Goche
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] First Question ... be gentle

2011-11-06 Thread Francisco Dalla Rosa soares
Just to make it clear, that's an "Annotation" not a comment.
Comments are ignored by the compiler, annotations are actually evaluated by
the compiler in compile time and sometimes during runtime too.

http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html

from the documentation:

Annotations have a number of uses, among them:
> Information for the compiler — Annotations can be used by the compiler to
> detect errors or suppress warnings.
> Compiler-time and deployment-time processing — Software tools can process
> annotation information to generate code, XML files, and so forth.
> Runtime processing — Some annotations are available to be examined at
> runtime.


2011/10/28 John Davis 

> 2011/10/28 Francisco Dalla Rosa soares :
> > http://lmgtfy.com/?q=java+override
> > I can't of nicer way to do this :)
> >
> >
> > 2011/10/28 JBlaza 
> >>
> >> I have looked on several other forums. i am new to the java programming
> >> community, and i am looking for a clear understanding of the @overide
> >> annotation, and what it does, or signifies.
> >>
>
> The override part is a comment.  It means that the routine exists
> already in your class or parent(s) class and that you have decided to
> do it differently from the already implemented code.
> In other words, you have created a new class derived from an existing
> class.  The existing class or one of its parent classes has
> implemented a function.  You want to change the  behaviour of
> that funciton so you override it by creating the same function in your
> class.
>
> Possibly I am not sure, but the keyword might also check your function
> parameters and return class to ensure that
> you are correctly matching the existing function as a check. Said
> another way, there exists a class called Foo and you derive from it
> with a class called MyFoo.  Foo implements
> a routine called void doIt(int a);  You want to override it.  In
> eclipse, you type doI - and then ctrl-space and it auto-completes to
> the function signature with empty brackets and the @override keyword.
> Somewhere along the way, you change the funciton parameter to a float,
> but you leave the @override keyword there.  As far as the compiler
> goes, this is legal, but with the override syntax there
> the compiler will flag that the routine is not really overriden since
> doIt() requires a int parameter and not a float.
>
> --
> John F. Davis
>
> 独树一帜
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
株式会社アルゴ ARGO Inc.
〒130-0012
東京都墨田区太平3-11-10
NTKオオノビル8階

ソアレス フランシスコ ( Soares Francisco )
Mail : soa...@argo.bz HP : http://www.argo.bz/
TEL:03-5619-4511 FAX:03-5619-4512

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

[android-developers] How can i get high quality rtsp url using youtube gdata api

2011-11-06 Thread Muthu S
Hi To All

How can i get high quality rtsp url using youtube gdata api in
android .If any one know this reply me please its very  urgent

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

2011-11-06 Thread Scott Herbert
Thanks. I was sure their was an easy way. I'll double check the
settings tomrrow when I get back in front of a my laptop.

On Nov 7, 1:46 am, Nikolay Elenkov  wrote:
> On Mon, Nov 7, 2011 at 9:33 AM, Scott Herbert
>
>  wrote:
> > Sorry if this is a little off topic (it's more an eclipse questron than an
> > Android one, but as it's for an Android project...)
>
> > What the easyist way to define non Latin text (I.e. Unicode) specifiy Arabic
> > and Chinese in an Android project? When I try and copy and pasted the google
> > translated version of my strings (I accept GT isn't the best way to
> > internationalise an app but my budget is zero so...) eclipse doesn't
> > recognised the characters. Can I just convert the characters an store the
> > Unicode values? Or is their a better way?
>
> Where are you copying the strings? If you are copying them to a resource
> XML file (as you should), the encoding is UTF-8 so it should work
> automatically.
> If you are copying those in your source files as Java strings, you need to
> change the encoding of your source files to UTF-8 (the default is the platform
> default encoding): right click your project, select 'Resource' on the left
> and change 'Text file encoding' to UTF-8.

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

2011-11-06 Thread Nikolay Elenkov
On Mon, Nov 7, 2011 at 9:33 AM, Scott Herbert
 wrote:
> Sorry if this is a little off topic (it's more an eclipse questron than an
> Android one, but as it's for an Android project...)
>
> What the easyist way to define non Latin text (I.e. Unicode) specifiy Arabic
> and Chinese in an Android project? When I try and copy and pasted the google
> translated version of my strings (I accept GT isn't the best way to
> internationalise an app but my budget is zero so...) eclipse doesn't
> recognised the characters. Can I just convert the characters an store the
> Unicode values? Or is their a better way?
>

Where are you copying the strings? If you are copying them to a resource
XML file (as you should), the encoding is UTF-8 so it should work
automatically.
If you are copying those in your source files as Java strings, you need to
change the encoding of your source files to UTF-8 (the default is the platform
default encoding): right click your project, select 'Resource' on the left
and change 'Text file encoding' to UTF-8.

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

2011-11-06 Thread Scott Herbert
Sorry if this is a little off topic (it's more an eclipse questron than an
Android one, but as it's for an Android project...)

What the easyist way to define non Latin text (I.e. Unicode) specifiy
Arabic and Chinese in an Android project? When I try and copy and pasted
the google translated version of my strings (I accept GT isn't the best way
to internationalise an app but my budget is zero so...) eclipse doesn't
recognised the characters. Can I just convert the characters an store the
Unicode values? Or is their a better way?

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

2011-11-06 Thread Miguel Morales
Those aren't really built in, they're just images.  So use images in your
android app too.

On Sun, Nov 6, 2011 at 3:09 PM, bob  wrote:

> I'm working on converting an app from iPhone to Android.
>
> Here's a screenshot of the UITableView I'm working on:
>
> http://i1190.photobucket.com/albums/z449/m75214/e.png
>
> I think those arrows on the right are built into iPhone.  Anyone know
> the Android counterpart for those arrows?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/,
http://www.youtube.com/user/revoltingx

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

2011-11-06 Thread bob
I'm working on converting an app from iPhone to Android.

Here's a screenshot of the UITableView I'm working on:

http://i1190.photobucket.com/albums/z449/m75214/e.png

I think those arrows on the right are built into iPhone.  Anyone know
the Android counterpart for those arrows?

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

2011-11-06 Thread Dianne Hackborn
Which part in particular do you think it should support?

On Sun, Nov 6, 2011 at 11:29 AM, bob  wrote:

> Why does Android support only a subset of Java instead of the whole
> Enchilada?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Compound Component not getting onKeyDown onKeyListener events for Droid Bionic or X2

2011-11-06 Thread Dianne Hackborn
Have you tried using the stock soft keyboard on those devices?  It is
possible for an IME to not do this interaction correctly, though a
manufacturer certainly shouldn't ship a device with such a problem.

On Sun, Nov 6, 2011 at 11:23 AM, Eric Carman  wrote:

> Hello Dianne,
>
> Thank you for responding.
>
> The custom compound component I am using wants single character entry. The
> inclusion of TextViews in the component is a convenience and they will only
> show a single character at a time. The user doesn't directly interact with
> them, but with the overall component.
>
> I don't want full interaction with the IME such that I get candidate text.
> I just want to capture the character they are entering - which has worked
> for all other devices I've tested - up through honeycomb. It's just these
> couple of devices which are behaving differently. The app is a puzzle app
> and the user interacts with it a character at a time.
>
> Of course, the onKeyDown isn't even being called in this case, which is at
> the root of the issue I'm trying to understand.
>
> I don't know if this helps to explain it any better.
>
> Thank you for the links. I will be looking into those very carefully. As
> always, your help and participation is really appreciated.
>
> Best Regards,
> Eric
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Re: Framework Cloning of Referenced Objects?

2011-11-06 Thread Dianne Hackborn
Generally a CursorLoader monitors for changes to the underlying database,
and delivers a new Cursor to you when the data changes.  So you could
certainly be putting new objects in mPeople if the contacts change.

On Sun, Nov 6, 2011 at 11:53 AM, Jay  wrote:

> I really don't do much else with mPeople, though I can think of two
> other things it might be. As I said, mPeople does supply a
> ListAdapter. Is it possible that is doing some behind the scenes
> cloning? Perhaps more likely, mPeople is populated by a CursorLoader
> attached to the Contacts content provider. I am not 100% clear on the
> semantics of loaders (I've been working from the docs and from
> examples), so maybe something I'm not accounting for is triggering the
> loader to asynchronously refresh mPeople. To be safe I guess I should
> throw in a class to loader.stopLoading() once mPeople has been
> populated.
>
>
> Jay
>
> On Nov 6, 1:57 pm, Dianne Hackborn  wrote:
> > Well as far as I know ArrayList won't just do this behind your back.  I
> > would assume there is something else your app is doing that isn't shown
> > here.  Are you sure you never change what is in mPeople that could cause
> a
> > new instance of an object to be created?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Nov 5, 2011 at 10:16 PM, Jay  wrote:
> > > Thank you for the reply. Is there some other mechanism by which the
> > > objects in my array might be replaced with objects with the same type
> > > and contents but different identities (i.e. don't compare as equal
> > > using the default implementation)? Because that seems to be what is
> > > happening (intermittantly).
> >
> > > Thanks,
> > > Jay
> >
> > > On Nov 6, 12:00 am, Dianne Hackborn  wrote:
> > > > None of the methods you are using will copy an object.  Generally you
> > > must
> > > > explicitly call clone() to do this.
> >
> > > > On Sat, Nov 5, 2011 at 6:25 AM, Jay 
> wrote:
> > > > > I assume this is an Android question, though it may just betray my
> > > > > ignorance of Java memory management.
> >
> > > > > I have an activity designed to randomly pick a person from a list,
> and
> > > > > to not repeat anyone until everyone has been chosen. The core
> logic of
> > > > > the pick method looks like this:
> >
> > > > >ArrayList peopleCopy = new
> ArrayList(mPeople);
> > > > >peopleCopy.removeAll(mRecent);
> > > > >Person person =
> peopleCopy.get(mRNG.nextInt(peopleCopy.size()));
> > > > >mRecent.add(person);
> > > > >// Display chosen person in UI
> >
> > > > > Both mPeople and mRecent are referenced by adapters that feed into
> > > > > ListViews.
> >
> > > > > The bug I was finding is that the same person was being chosen more
> > > > > than once in a cycle, despite the code above. I had a hell of a
> time
> > > > > tracking it down; I couldn't duplicate it on the emulator or on the
> > > > > actual device when connected to the debugger. I finally managed to
> > > > > "catch" the bug in progrss on the device and plug it in to the
> > > > > debugger. Based on the object id fields, it appears that the
> problem
> > > > > is that the Person objects referenced my mRecent were different
> from
> > > > > the ones in peopleCopy, which is why the removeAll method was not
> > > > > subtracting them correctly. I implemented appropriate equals() and
> > > > > hashcode() methods on Person and that seems to have fixed the
> problem.
> >
> > > > > My question is where/when/why were the Persons in mRecent and/or
> > > > > mPeople being replaced with clones? It wasn't happening all the
> time;
> > > > > based on observations with the debugger, it appears that usually
> the
> > > > > lists referenced the same objects as I expected them to. Does the
> > > > > framework sometimes clone objects referenced by adapters or does
> Java
> > > > > or am I misreading this whole situation?
> >
> > > > > Thanks,
> > > > > Jay
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, 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, 

Re: [android-developers] Re: more SMS questions

2011-11-06 Thread John Goche
On Sun, Nov 6, 2011 at 5:57 PM, Kristopher Micinski
 wrote:
>> I need to have a bunch of android phones send and receive data to each
>> other to communicate,
>
> Don't use SMS, that seems like a bad idea waiting to happen.  Try
> using a web service or backend to do this, this is what pretty much
> everyone else does..
>
> kris

Yes but a web service / backend needs a separate server and I wanted to have
something that works out of the box. What should I do?

Regards,

John Goche

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

2011-11-06 Thread Goutom
Hi

I want to write a script that will listen when GPS device is on/off from
settings.I want to write code which will work on all android platforms.
Anybody to help me ?

Take care.

Regards
Goutom Roy

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

2011-11-06 Thread Mark Murphy
On Sun, Nov 6, 2011 at 2:29 PM, bob  wrote:
> Why does Android support only a subset of Java instead of the whole
> Enchilada?

If you mean "a subset of the Java SE class library" or something like
that, it is to save on firmware space and maintenance, if I understand
correctly.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1
Available!

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


[android-developers] Re: Does android 4.0 ice cream sandwich support arabic natively (properly) ?

2011-11-06 Thread AhmadOOka
The emulator displays arabic perfect. Thanks.


On Nov 6, 1:37 am, AhmadOOka  wrote:
> Thanks. Ill try that
>
> On Nov 1, 2:36 am, Zsolt Vasvari  wrote:
>
>
>
>
>
>
>
> > Why don't you download the SDK and run the Emulator.  You can see it
> > for yourself.
>
> > On Nov 1, 8:21 am, AhmadOOka  wrote:
>
> > > Any screenshots ?
>
> > > On Oct 21, 11:03 pm, AhmadOOka  wrote:
>
> > > > Can anybody provide a screenshot of anyarabicwebsite on 
> > > > stockicecreamsandwichex. Aljazeera.net
>
> > > > On Oct 21, 8:46 pm, Romain Guy  wrote:
>
> > > > > We greatly improved support for BiDi text in Android 4.0, both 
> > > > > display and
> > > > > editing.
>
> > > > > On Thu, Oct 20, 2011 at 6:58 AM, AhmadOOka  
> > > > > wrote:
> > > > > > does it supportarabicproperly ? Right-to-left and connected
> > > > > > characters and everything natively ?
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google
> > > > > > Groups "Android Developers" group.
> > > > > > To post to this group, send email to 
> > > > > > android-developers@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > android-developers+unsubscr...@googlegroups.com
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > --
> > > > > Romain Guy
> > > > > Android framework engineer
> > > > > romain...@android.com- Hide quoted text -
>
> > > - Show quoted text -

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


Re: [android-developers] Can we use a scrollview inside linear layout?

2011-11-06 Thread paulb
Yes, the ListView does automagically scroll as the number of items
increase larger than the display area.

On Mon, Nov 7, 2011 at 6:07 AM, KK  wrote:
> Thanks for the quick tip, I'll try it out. I've a question though. Is it the
> case that the lisview inherently supports scrolling when the no of items
> grows bigger than the display area, and hence we don't need to sue
> scrollview in this case? If that is the case then, as per your suggestion,
> in my case if the no of items is say 50 then they will automatically be
> scrollable, right? Please rectify if I'm wrong.
> Thanks,
> kk
> On Mon, Nov 7, 2011 at 12:25 AM, Dianne Hackborn 
> wrote:
>>
>> Yes, you can, but you really should use a ListView instead of a ScrollView
>> if you have a lot of items to show or the dynamically change.
>>
>> On the top view use android:layout_weight="1" and
>> android:layout_height="0px" to tell it to grow to fill whatever space is
>> available.
>> On Sun, Nov 6, 2011 at 8:56 AM, KK  wrote:
>>>
>>> hi All,
>>> I'm not sure if the asking I'm asking is logical or wrong. Actually I'm
>>> trying to achieve something like this:
>>> 1. The whole screen is divided into two parts, Upper half which takes 90%
>>> of layout space and the lower half which is 10% of the space.
>>> 2. In the lower half I'm showing the progress bar for each song selected
>>> from the Upper half.
>>> 3. In the upper half I'm trying to show all the songs in the sdcard
>>> available. I'm trying to make this part scrollable as we can have lots of
>>> song which wont fit in the given space.
>>> I want the lower part to remain fixed irrespective of the current
>>> selection in the Upper half, say for example if I'm playing the 50th
>>> song(out of 100) then song will be in the middle of the Upper screen space
>>> where as the lower half will continue to show the current song position.
>>> Logically, I'm trying to do something like this in the layout file
>>>
>>> 
>>>     
>>>       layout_weight=9
>>>       sldjfsldf
>>>          
>>>                song lsit
>>>          
>>>      ..
>>>     
>>>     
>>>      layout_weight=1
>>>        sdljfsldjf
>>>     
>>> 
>>>
>>> Please help me how to get this done. Would appreciate other ways of
>>> achieving my end result by some other elegant approach.
>>> Thanks in advance.
>>> Regards,
>>> KK
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Framework Cloning of Referenced Objects?

2011-11-06 Thread Jay
I really don't do much else with mPeople, though I can think of two
other things it might be. As I said, mPeople does supply a
ListAdapter. Is it possible that is doing some behind the scenes
cloning? Perhaps more likely, mPeople is populated by a CursorLoader
attached to the Contacts content provider. I am not 100% clear on the
semantics of loaders (I've been working from the docs and from
examples), so maybe something I'm not accounting for is triggering the
loader to asynchronously refresh mPeople. To be safe I guess I should
throw in a class to loader.stopLoading() once mPeople has been
populated.


Jay

On Nov 6, 1:57 pm, Dianne Hackborn  wrote:
> Well as far as I know ArrayList won't just do this behind your back.  I
> would assume there is something else your app is doing that isn't shown
> here.  Are you sure you never change what is in mPeople that could cause a
> new instance of an object to be created?
>
>
>
>
>
>
>
>
>
> On Sat, Nov 5, 2011 at 10:16 PM, Jay  wrote:
> > Thank you for the reply. Is there some other mechanism by which the
> > objects in my array might be replaced with objects with the same type
> > and contents but different identities (i.e. don't compare as equal
> > using the default implementation)? Because that seems to be what is
> > happening (intermittantly).
>
> > Thanks,
> > Jay
>
> > On Nov 6, 12:00 am, Dianne Hackborn  wrote:
> > > None of the methods you are using will copy an object.  Generally you
> > must
> > > explicitly call clone() to do this.
>
> > > On Sat, Nov 5, 2011 at 6:25 AM, Jay  wrote:
> > > > I assume this is an Android question, though it may just betray my
> > > > ignorance of Java memory management.
>
> > > > I have an activity designed to randomly pick a person from a list, and
> > > > to not repeat anyone until everyone has been chosen. The core logic of
> > > > the pick method looks like this:
>
> > > >        ArrayList peopleCopy = new ArrayList(mPeople);
> > > >        peopleCopy.removeAll(mRecent);
> > > >        Person person = peopleCopy.get(mRNG.nextInt(peopleCopy.size()));
> > > >        mRecent.add(person);
> > > >        // Display chosen person in UI
>
> > > > Both mPeople and mRecent are referenced by adapters that feed into
> > > > ListViews.
>
> > > > The bug I was finding is that the same person was being chosen more
> > > > than once in a cycle, despite the code above. I had a hell of a time
> > > > tracking it down; I couldn't duplicate it on the emulator or on the
> > > > actual device when connected to the debugger. I finally managed to
> > > > "catch" the bug in progrss on the device and plug it in to the
> > > > debugger. Based on the object id fields, it appears that the problem
> > > > is that the Person objects referenced my mRecent were different from
> > > > the ones in peopleCopy, which is why the removeAll method was not
> > > > subtracting them correctly. I implemented appropriate equals() and
> > > > hashcode() methods on Person and that seems to have fixed the problem.
>
> > > > My question is where/when/why were the Persons in mRecent and/or
> > > > mPeople being replaced with clones? It wasn't happening all the time;
> > > > based on observations with the debugger, it appears that usually the
> > > > lists referenced the same objects as I expected them to. Does the
> > > > framework sometimes clone objects referenced by adapters or does Java
> > > > or am I misreading this whole situation?
>
> > > > Thanks,
> > > > Jay
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, 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
>
> --
> 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 

Re: [android-developers] halfway support

2011-11-06 Thread Michael Banzon
Android is running bytecode compiled from Java class files.

What part isn't supported??

On Sun, Nov 6, 2011 at 8:29 PM, bob  wrote:
> Why does Android support only a subset of Java instead of the whole
> Enchilada?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Michael Banzon
http://michaelbanzon.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] halfway support

2011-11-06 Thread bob
Why does Android support only a subset of Java instead of the whole
Enchilada?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Compound Component not getting onKeyDown onKeyListener events for Droid Bionic or X2

2011-11-06 Thread Eric Carman
Hello Dianne,

Thank you for responding. 

The custom compound component I am using wants single character entry. The 
inclusion of TextViews in the component is a convenience and they will only 
show a single character at a time. The user doesn't directly interact with 
them, but with the overall component.

I don't want full interaction with the IME such that I get candidate text. 
I just want to capture the character they are entering - which has worked 
for all other devices I've tested - up through honeycomb. It's just these 
couple of devices which are behaving differently. The app is a puzzle app 
and the user interacts with it a character at a time.

Of course, the onKeyDown isn't even being called in this case, which is at 
the root of the issue I'm trying to understand.

I don't know if this helps to explain it any better. 

Thank you for the links. I will be looking into those very carefully. As 
always, your help and participation is really appreciated.

Best Regards,
Eric

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can we use a scrollview inside linear layout?

2011-11-06 Thread KK
Thanks for the quick tip, I'll try it out. I've a question though. Is it
the case that the lisview inherently supports scrolling when the no of
items grows bigger than the display area, and hence we don't need to sue
scrollview in this case? If that is the case then, as per your suggestion,
in my case if the no of items is say 50 then they will automatically be
scrollable, right? Please rectify if I'm wrong.

Thanks,
kk

On Mon, Nov 7, 2011 at 12:25 AM, Dianne Hackborn wrote:

> Yes, you can, but you really should use a ListView instead of a ScrollView
> if you have a lot of items to show or the dynamically change.
>
> On the top view use android:layout_weight="1" and
> android:layout_height="0px" to tell it to grow to fill whatever space is
> available.
>
> On Sun, Nov 6, 2011 at 8:56 AM, KK  wrote:
>
>> hi All,
>> I'm not sure if the asking I'm asking is logical or wrong. Actually I'm
>> trying to achieve something like this:
>> 1. The whole screen is divided into two parts, Upper half which takes 90%
>> of layout space and the lower half which is 10% of the space.
>> 2. In the lower half I'm showing the progress bar for each song selected
>> from the Upper half.
>> 3. In the upper half I'm trying to show all the songs in the sdcard
>> available. I'm trying to make this part scrollable as we can have lots of
>> song which wont fit in the given space.
>>
>> I want the lower part to remain fixed irrespective of the current
>> selection in the Upper half, say for example if I'm playing the 50th
>> song(out of 100) then song will be in the middle of the Upper screen space
>> where as the lower half will continue to show the current song position.
>>
>> Logically, I'm trying to do something like this in the layout file
>>
>> 
>> 
>>   layout_weight=9
>>   sldjfsldf
>>  
>>song lsit
>>  
>>  ..
>> 
>> 
>>  layout_weight=1
>>sdljfsldjf
>> 
>>
>> 
>>
>>
>> Please help me how to get this done. Would appreciate other ways of
>> achieving my end result by some other elegant approach.
>> Thanks in advance.
>>
>> Regards,
>> KK
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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

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

2011-11-06 Thread Dianne Hackborn
Well as far as I know ArrayList won't just do this behind your back.  I
would assume there is something else your app is doing that isn't shown
here.  Are you sure you never change what is in mPeople that could cause a
new instance of an object to be created?

On Sat, Nov 5, 2011 at 10:16 PM, Jay  wrote:

> Thank you for the reply. Is there some other mechanism by which the
> objects in my array might be replaced with objects with the same type
> and contents but different identities (i.e. don't compare as equal
> using the default implementation)? Because that seems to be what is
> happening (intermittantly).
>
> Thanks,
> Jay
>
> On Nov 6, 12:00 am, Dianne Hackborn  wrote:
> > None of the methods you are using will copy an object.  Generally you
> must
> > explicitly call clone() to do this.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Nov 5, 2011 at 6:25 AM, Jay  wrote:
> > > I assume this is an Android question, though it may just betray my
> > > ignorance of Java memory management.
> >
> > > I have an activity designed to randomly pick a person from a list, and
> > > to not repeat anyone until everyone has been chosen. The core logic of
> > > the pick method looks like this:
> >
> > >ArrayList peopleCopy = new ArrayList(mPeople);
> > >peopleCopy.removeAll(mRecent);
> > >Person person = peopleCopy.get(mRNG.nextInt(peopleCopy.size()));
> > >mRecent.add(person);
> > >// Display chosen person in UI
> >
> > > Both mPeople and mRecent are referenced by adapters that feed into
> > > ListViews.
> >
> > > The bug I was finding is that the same person was being chosen more
> > > than once in a cycle, despite the code above. I had a hell of a time
> > > tracking it down; I couldn't duplicate it on the emulator or on the
> > > actual device when connected to the debugger. I finally managed to
> > > "catch" the bug in progrss on the device and plug it in to the
> > > debugger. Based on the object id fields, it appears that the problem
> > > is that the Person objects referenced my mRecent were different from
> > > the ones in peopleCopy, which is why the removeAll method was not
> > > subtracting them correctly. I implemented appropriate equals() and
> > > hashcode() methods on Person and that seems to have fixed the problem.
> >
> > > My question is where/when/why were the Persons in mRecent and/or
> > > mPeople being replaced with clones? It wasn't happening all the time;
> > > based on observations with the debugger, it appears that usually the
> > > lists referenced the same objects as I expected them to. Does the
> > > framework sometimes clone objects referenced by adapters or does Java
> > > or am I misreading this whole situation?
> >
> > > Thanks,
> > > Jay
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, 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
>



-- 
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] NoHttpResponseException when communicating between two emulators

2011-11-06 Thread Weikang Wan
I have a client (Emulator A, 5554) sending Http Request to a server
(Emulator B, 5556) which listening on 8102 port

1. I used "adb -emulator-5556 forward tcp: 8202 tcp:8102" to map port.

2. I then used URI "http://10.0.2.2:8202"; to send http request,
however, the exception is thrown:
"org.apache.http.NoHttpResponseException: The target server failed to
respond"

When I debug the server side, no request is received there.

Anyone has ideas about this problem?

Thanks,
Vycon

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can we use a scrollview inside linear layout?

2011-11-06 Thread Dianne Hackborn
Yes, you can, but you really should use a ListView instead of a ScrollView
if you have a lot of items to show or the dynamically change.

On the top view use android:layout_weight="1" and
android:layout_height="0px" to tell it to grow to fill whatever space is
available.

On Sun, Nov 6, 2011 at 8:56 AM, KK  wrote:

> hi All,
> I'm not sure if the asking I'm asking is logical or wrong. Actually I'm
> trying to achieve something like this:
> 1. The whole screen is divided into two parts, Upper half which takes 90%
> of layout space and the lower half which is 10% of the space.
> 2. In the lower half I'm showing the progress bar for each song selected
> from the Upper half.
> 3. In the upper half I'm trying to show all the songs in the sdcard
> available. I'm trying to make this part scrollable as we can have lots of
> song which wont fit in the given space.
>
> I want the lower part to remain fixed irrespective of the current
> selection in the Upper half, say for example if I'm playing the 50th
> song(out of 100) then song will be in the middle of the Upper screen space
> where as the lower half will continue to show the current song position.
>
> Logically, I'm trying to do something like this in the layout file
>
> 
> 
>   layout_weight=9
>   sldjfsldf
>  
>song lsit
>  
>  ..
> 
> 
>  layout_weight=1
>sdljfsldjf
> 
>
> 
>
>
> Please help me how to get this done. Would appreciate other ways of
> achieving my end result by some other elegant approach.
> Thanks in advance.
>
> Regards,
> KK
>
>
>
>
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Compound Component not getting onKeyDown onKeyListener events for Droid Bionic or X2

2011-11-06 Thread Dianne Hackborn
On Sat, Nov 5, 2011 at 9:03 AM, Eric Carman  wrote:

> Based on this, I can see that the onKey... events for the component is
> only being reached for events like Menu and Back. The individual key events
> for the character presses are not being triggered. According to the users,
> the keyboard is not prompting them for word choices as they enter
> characters on their keyboards. I thought perhaps the keyboard was in some
> state like you might find when typing a text message.
>

This is confusing.  If you are using onKeyDown() etc to interact with the
IME, you are relying on the backwards compatibility behavior where the view
is not implementing the real InputConnection protocol but relying on the
IME to send simulated hard key events to it.  This has never allowed for a
full interaction with IME, and I don't think it has ever allowed for
completion choices because you are not giving it a way to show candidate
text and such as the user interacts with the keyboard.

If you want a full interaction with an IME, you really should implement the
InputConnection protocol.  The easiest way to do this is with TextView (it
is definitely a lot more complicated than getting raw simulated hard key
press events), but you can implement it yourself.

At the very least, you need to make sure you implement
http://developer.android.com/reference/android/view/View.html#onCreateInputConnection(android.view.inputmethod.EditorInfo)
to
tell the IME the type of text editing it should do for your view by filling
in the EditorInfo.  The
http://developer.android.com/reference/android/view/inputmethod/BaseInputConnection.html
is
provided to help with implementing an InputConnection.

-- 
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: Compound Component not getting onKeyDown onKeyListener events for Droid Bionic or X2

2011-11-06 Thread Eric Carman
I've created a sample project that demonstrates the issue. I've tried to 
make it as simple as possible.

When executing the app, There will be a single instance of the compound 
component which includes two letters, one over the other. (A/Q) For clarity 
sake, the 'A' is Yellow and the 'Q' is gray. Long-press on the 'A' and you 
will bring up the soft keyboard. As you select letters from the soft 
keyboard, the letter 'A' should change. 

My continued thanks for those who are reviewing this.

Main Activity:

package com.test.zbionic;

import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.util.Log;
import android.view.Gravity;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.RelativeLayout.LayoutParams;

public class ZBionicActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

View view;
view = new CompoundComponent(this, 'Q');
view.setId(10001);
RelativeLayout.LayoutParams layout;

layout = new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);

view.setLayoutParams(layout);

RelativeLayout rl = (RelativeLayout) findViewById(R.id.layoutTest);
rl.addView(view);
}

public class CompoundComponent extends LinearLayout {

private TextView textview1;
private TextView textview2;

public CompoundComponent(Context context, char code) {
super(context);

buildComponent(context, code);

}

private void buildComponent(Context context, char code) {

// Set up the layout parameters
this.setOrientation(VERTICAL);
this.setPadding(1, 2, 1, 2);
this.setOnLongClickListener(mLongClickListener);

textview1 = new TextView(context);
textview1.setGravity(Gravity.CENTER_HORIZONTAL);
textview1.setTextSize(20);
textview1.setTextColor(Color.YELLOW);
textview1.setText("A");
addView(textview1, new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

textview2 = new TextView(context);
textview2.setGravity(Gravity.CENTER_HORIZONTAL);
textview2.setTextSize(20);
addView(textview2, new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

this.setFocusable(true);
this.setFocusableInTouchMode(true);
this.setMinimumWidth(15);
textview2.setText(Character.toString(code));
}

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {

Log.d("Bionic Testing", "keyCode: " + Integer.toString(keyCode));

if (event.getAction() == KeyEvent.ACTION_DOWN) {

KeyCharacterMap kcm = null;
kcm = KeyCharacterMap.load(event.getDeviceId());

char c = kcm.getDisplayLabel(keyCode);

if (Character.isLetter(c)) {
textview1.setText(Character.toString(c).toUpperCase());
return true;
}
else {
return super.onKeyDown(keyCode, event);
}
}
else {
return super.onKeyDown(keyCode, event);
}
}

public View.OnLongClickListener mLongClickListener = new 
View.OnLongClickListener() {

@Override
public boolean onLongClick(View v) {

Log.d("Bionic Testing", "onLongClick");

softKeyboardResults rr = new softKeyboardResults(v.getContext());

Configuration config = CompoundComponent.this.getResources()
.getConfiguration();
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES
|| config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_UNDEFINED) 
{
InputMethodManager imm = (InputMethodManager) v
.getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(CompoundComponent.this,
InputMethodManager.SHOW_IMPLICIT, rr);
}
return false;
}

};

class softKeyboardResults extends ResultReceiver {

Context mContext;

public softKeyboardResults(Context context) {
super(getHandler());

Log.d("Bionic Testing", "Creating softKeyboardResults");
mContext = context;
}

@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
super.onReceiveResult(resultCode, resultData);

Log.d("Bionic Testing", "resultCode: "
+ Integer.toString(resultCode));

switch (resultCode) {
case InputMethodManager.RESULT_HIDDEN:
case InputMethodManager.RESULT_SHOWN:
case InputMethodManager.RESULT_UNCHANGED_SHOWN:
break;
case InputMethodManager.RESULT_UNCHANGED_HIDDEN:
InputMethodManager imm = (InputMethodManager) mContext
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(CompoundComponent.this,
InputMethodManager.SHOW_FORCED);
break;
default:
break;
}
}

}
}

}

Layout:


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





Manifest:


http://schemas.android.com/apk/res/android";
  package="com.test.zbionic"
  android:versionCode="1"
  android:versionName="1.0">




 

[android-developers] Re: Can't layout square ImageButtons

2011-11-06 Thread RLScott
OK, I found a solution.  I do this in onCreate:

LayoutParams lp = button1.getLayoutParams();
lp.height = dispWidth / 5;
button1.setLayoutParams(lp);
button2.setLayoutParams(lp);
button3.setLayoutParams(lp);
button4.setLayoutParams(lp);
button5.setLayoutParams(lp);

where dispWidth and dispHeight were previously set by

Display display = getWindowManager().getDefaultDisplay();
dispWidth = display.getWidth();
dispHeight = display.getHeight();

also within onCreate.

This solution lets the layout_weight="1" and scaleType="fixXY"
properly scale down the image and divide up the width (which just
happens to be equal to the full dispWidth) and then I change the
layout params to include a calculated dispWidth/5 to be used as the
height, replacing the "50px" default.  This leaves the buttons always
square and always exactly filling up the bottom of the display

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

2011-11-06 Thread jaggu
pleas respond immediately


On Sun, Nov 6, 2011 at 8:10 PM, jaggu  wrote:
> please update this how to show same tabhost with tabacivity for all
> the actvityies how to implement
> please urgent
>
> On Sun, Nov 6, 2011 at 11:42 AM, jaggu  wrote:
>> intent = new Intent().setClass(this,HourlyActivity.class);              spec 
>> =
>> tabHost.newTabSpec("Hourly").setIndicator("",res.getDrawable(R.drawable.tab_hourly))
>>                             .setContent(intent);            
>> tabHost.addTab(spec);
>>        //Map Tab                 intent = new 
>> Intent().setClass(this,map.class);
>> spec 
>> =tabHost.newTabSpec("Maps").setIndicator("",res.getDrawable(R.drawable.tab_map))
>> .setContent(intent);             tabHost.addTab(spec);                       
>>     //More Tab               intent
>> = new Intent().setClass(this,MoreActivity.class);                 spec =
>> tabHost.newTabSpec("More").setIndicator("",res.getDrawable(R.drawable.tab_more)).setContent(intent);
>>  tabHost.addTab(spec);
>> please see my above code : in that i have More actvity  class contains
>> list of items .
>>  in one of the list item clicks on it goes to next screen in that
>> bottom of the tabhost is missing in my screen ..
>> like that around i have 10 list of items in more actvity : for each
>> screen bottom tabhost missing
>>
>> >        xmlns:android="http://schemas.android.com/apk/res/android";
>>        android:id="@android:id/tabhost"
>>        android:layout_width="fill_parent"
>>        android:layout_height="wrap_content"
>>        >
>> >                        android:layout_height="fill_parent"
>>                        android:layout_width="fill_parent"
>>                        android:padding="5dp">
>>                        
>>        >        android:layout_width="fill_parent"
>>        android:layout_height="fill_parent"
>>        android:padding="5dp"
>>        >
>>        >             android:layout_width="fill_parent"
>>             android:layout_height="fill_parent"
>>             android:layout_above="@android:id/tabs"
>>             android:background="@drawable/back"
>>                   >
>>
>>            >                android:id="@+id/linearLayout1"
>>                android:layout_width="match_parent"
>>                android:layout_height="match_parent"
>>                android:orientation="vertical"
>>
>>                >
>>            
>>
>>        
>>             >             android:layout_width="fill_parent"
>>             android:layout_height="wrap_content"
>>             android:layout_alignParentBottom="true"
>>
>>              />
>>        
>> 
>>
>> this is main.xml with bottom host displaying ..
>> that i asked how to apply for this tabhost for entire my project
>>
>>
>>
>> On Sun, Nov 6, 2011 at 11:11 AM, skink  wrote:
>>>
>>>
>>> On Nov 6, 6:16 am, jaggu  wrote:
 Hi
  i my currentactivity i have 5 tabhost with tab spec.
    this i need to apply for all the screen ,its another screen its
 missing how to apply
 please hlep me in this.
>>>
>>> all you need is to ask your question in at least understable english
>>> since I didn't got a word of what you want to do
>>>
>>> pskink
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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: more SMS questions

2011-11-06 Thread Kristopher Micinski
> I need to have a bunch of android phones send and receive data to each
> other to communicate,
>

Don't use SMS, that seems like a bad idea waiting to happen.  Try
using a web service or backend to do this, this is what pretty much
everyone else does..

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


[android-developers] Can we use a scrollview inside linear layout?

2011-11-06 Thread KK
hi All,
I'm not sure if the asking I'm asking is logical or wrong. Actually I'm
trying to achieve something like this:
1. The whole screen is divided into two parts, Upper half which takes 90%
of layout space and the lower half which is 10% of the space.
2. In the lower half I'm showing the progress bar for each song selected
from the Upper half.
3. In the upper half I'm trying to show all the songs in the sdcard
available. I'm trying to make this part scrollable as we can have lots of
song which wont fit in the given space.

I want the lower part to remain fixed irrespective of the current selection
in the Upper half, say for example if I'm playing the 50th song(out of 100)
then song will be in the middle of the Upper screen space where as the
lower half will continue to show the current song position.

Logically, I'm trying to do something like this in the layout file



  layout_weight=9
  sldjfsldf
 
   song lsit
 
 ..


 layout_weight=1
   sdljfsldjf





Please help me how to get this done. Would appreciate other ways of
achieving my end result by some other elegant approach.
Thanks in advance.

Regards,
KK

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

2011-11-06 Thread Goutom
thanks hongbosb .

2011/11/6 hongbosb 

> _ID in data table and contacts table are two different things. So you
> should use raw_contacts_id instead of _id when query in data table.
>
> change
> String[] projection = new String[]
> {ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac
> t.CommonDataKinds.StructuredName.FAMILY_NAME};
> String where = ContactsContract.CommonDataKinds.StructuredName._ID+ "
> = ?
> AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ "
> = ?";
>
> to
> String[] projection = new String[]
> {ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac
> t.CommonDataKinds.StructuredName.FAMILY_NAME};
> String where = ContactsContract.Data.CONTACT_ID " = ?
> AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ "
> = ?";
>
> On 11月5日, 上午7时38分, Goutom  wrote:
> > Hi
> >
> > I am trying to fetch contacts  first and last name.But getting fail.
> > I am using the following code.
> >
> > String id;
> > String[] projection = new String[]
> >
> {ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac
> t.CommonDataKinds.StructuredName.FAMILY_NAME};
> > String where = ContactsContract.CommonDataKinds.StructuredName._ID+ " = ?
> > AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ " = ?";
> >
> > id = Get_Id(contact_id);
> > String[] whereParameters = new String[]
> > {id,ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE };
> > Cursor cursor =
> > cr.query(ContactsContract.Data.CONTENT_URI,projection, where,
> > whereParameters, null);
> >
> > if(cursor.moveToFirst())
> > {
> > String contact_given_name =
> >
> cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Str
> ucturedName.GIVEN_NAME));
> > String  contact_family_name =
> >
> cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Str
> ucturedName.FAMILY_NAME));
> > }
> > cursor.close();
> > but its giving null. where is the problem?
> >
> > Take care.
> >
> > Regards
> > Goutom Roy
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Proguard problem

2011-11-06 Thread André
I have  a problem when I'm trying to export my project in eclipse.
While trying to create the apk gives me this error.
What could cause this?

[2011-11-06 17:29:50 - Project- X] Proguard returned with error code
1. See console
[2011-11-06 17:29:50 - Project- X] java.io.FileNotFoundException: C:
\android\tools\proguard\bin\X\proguard\dump.txt (The system cannot
find the path specified)
[2011-11-06 17:29:50 - Project- X]  at
java.io.FileInputStream.open(Native Method)
[2011-11-06 17:29:50 - Project- X]  at
java.io.FileInputStream.(Unknown Source)
[2011-11-06 17:29:50 - Project- X]  at
java.io.FileReader.(Unknown Source)
[2011-11-06 17:29:50 - Project- X]  at
proguard.FileWordReader.(FileWordReader.java:46)
[2011-11-06 17:29:50 - Project- X]  at
proguard.ConfigurationParser.parseIncludeArgument(ConfigurationParser.java:
196)
[2011-11-06 17:29:50 - Project- X]  at
proguard.ConfigurationParser.parse(ConfigurationParser.java:105)
[2011-11-06 17:29:50 - Project- X]  at
proguard.ProGuard.main(ProGuard.java:491)

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

2011-11-06 Thread John Goche
After some browsing I found this thread:

http://groups.google.com/group/android-developers/browse_thread/thread/3b8dc90cdc701f49/9bcf1c15f2c52fc2

Apparently to use ports you have to set up a server and listen on that
port on the receiver.

Also, the GTalk API is now obsolete I gather. It would been a good
alternative since I only need to communicate
among android devices but it's no longer available.

Now I'm considering using something else like wi-fi as it would be
less expensive and above all probably
has an API that works unlike sendDataMessage, and SMS may also be
slower than wi-fi (and more unreliable).

http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html

for the cell phones to communicate. However I'm not sure of the
network coverage for wi-fi.
If a user pays a fee can that user have wi-fi just about everywhere
the user goes?

I need to have a bunch of android phones send and receive data to each
other to communicate,

Suggestions welcome,

Thanks,

John Goche

On Sun, Nov 6, 2011 at 1:55 PM, John Goche  wrote:
> Hello,
>
> I have tried using Base64.encode() with the sendDataMessage as follows:
>
> smsManager.sendDataMessage("5558", null, (short) 1500,
> Base64.encode("hello SMS".getBytes(), Base64.DEFAULT), null, null);
>
> I have also tried putting the following in my AndroidManifest.xml but
> no luck on the emulator.
>
>    
>      
>         android:name="android.provider.Telephony.SMS_RECEIVED">
>        
>        
>        
>        
>      
>    
>
> The result is the following output in adb logcat when the message is
> received (some garbage is shown
> as a notification as the text message arrives):
>
> V/Telephony(  295): getOrCreateThreadId cursor cnt: 1
>
> However I don't see the calls from my boardcast receiver being called.
> I don't understand why it's not being called.
>
> Any ideas?
>
> public class SMSReceiver extends BroadcastReceiver {
>
>  @Override
>  public void onReceive(Context context, Intent intent) {
>
>    Log.d(TAG, "hello received");
>
>    Object[] pduArray = (Object[]) intent.getExtras().get("pdus");
>
>    SmsMessage[] messages = new SmsMessage[pduArray.length];
>
>    for (int i = 0; i < pduArray.length; i++) {
>
>      Log.d(TAG, "received");
>
>      messages[i] = SmsMessage.createFromPdu((byte[]) pduArray[i]);
>
>      Log.d(TAG, messages[i].getDisplayOriginatingAddress());
>
>      Log.d(TAG, messages[i].getMessageBody());
>
>    }
>
>  }
>
>  private static final String TAG = "SMSReceiver";
>
> }
>
> Many thanks,
>
> Regards,
>
> John Goche
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Compound Component not getting onKeyDown onKeyListener events for Droid Bionic or X2

2011-11-06 Thread Eric Carman
Apparently, Motorola has a developer's program called MotoDev (free) which 
gives you access to some potentially interesting tools. They have a Droid 
Bionic SDK addon that can be set up as an emulator.

I installed it this morning and I can reproduce the issue that my customers 
are seeing with this app. Interestingly, when I look at the logs, I'm 
seeing the following in response to a keypress:

11-06 10:28:16.632: INFO/AwesomePlayer(42): reset_l
11-06 10:28:16.632: INFO/StagefrightPlayer(42): 
setDataSource('/system/media/audio/ui/KeypressStandard.ogg')
11-06 10:28:16.632: INFO/AwesomePlayer(42): reset_l
11-06 10:28:16.632: INFO/AwesomePlayer(42): prepareAsync_l
11-06 10:28:16.643: ERROR/MediaPlayer(86): error (1, -2147483648)
11-06 10:28:16.643: WARN/AudioService(86): MediaPlayer IOException: 
java.io.IOException: Prepare failed.: status=0x1
11-06 10:28:17.222: ERROR/ManageApplications(265): update storage usage 
while destroying
11-06 10:28:19.412: INFO/AwesomePlayer(42): reset_l
11-06 10:28:19.412: INFO/StagefrightPlayer(42): 
setDataSource('/system/media/audio/ui/KeypressStandard.ogg')
11-06 10:28:19.412: INFO/AwesomePlayer(42): reset_l
11-06 10:28:19.412: INFO/AwesomePlayer(42): prepareAsync_l
11-06 10:28:19.475: ERROR/MediaPlayer(86): error (1, -2147483648)
11-06 10:28:19.475: WARN/AudioService(86): MediaPlayer IOException: 
java.io.IOException: Prepare failed.: status=0x1
11-06 10:28:19.872: ERROR/ManageApplications(265): update storage usage 
while destroying

Perhaps this is an artifact of the emulator, but at least in this case it 
would appear that all keyboard input is being redirected to a media play 
which is unprepared to handle this.

And the weirdness continues. Any insights?

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

2011-11-06 Thread RLScott
No, that won't work because the 4 views will expand to take up the
extra room, leaving the ImageButtons only as wide as their layout
width of 50px.  I don't want that.  I want the buttons to expand to
take up that room.

On Nov 6, 8:13 am, Kostya Vasilyev  wrote:
> Don't set layout_weight=1 on the buttons.
>
> Insert four Views between the buttons to act as spacers, and give those
> layout_weight:
>
> 
>
>  android:layout_width="0px"
> android:layout_height="1px"
> android:layout_weight="1"/>
>
> 
>
>  android:layout_width="0px"
> android:layout_height="1px"
> android:layout_weight="1"/>
>
> etc.
>
> -- Kostya
>
> 06.11.2011 17:09, RLScott пишет:
>
>
>
>
>
> > This should be easy, but everything I try is not quite right.  I want
> > to use an XML RelativeLayout to position 5 square ImageButtons along
> > the bottom of the screen.  The images are defined by a 120 x 120 pixel
> > PNG, so it needs to be scaled down to fit in a Droid in portrait mode,
> > for instance.  I have tried specify for each button:
>
> >    android:layout_weight="1"
> >    android:layout_width="50px"
> >    android:layout_height="50px"
> >    android:scaleType="fitXY"
>
> > The layout_weight="1" is necessary to make the buttons spread out
> > horizontally and share the space.  Otherwise they bunch up at the
> > beginning.
>
> > The layout_width and layout_height are arbitrary, but they are
> > necessary to keep the program from crashing.
>
> > the scaleType of "fitXY" is necessary to make the image scale down to
> > the laid out size of the button.   But it only scales in X.  It leaves
> > Y at 50px because that was my arbitrary setting.  I want the
> > ImageButton to remain square, so I need the X and Y sizes to be the
> > same.  I don't know how to do that in XML without specifying them
> > explicitly, and I don't want to do that because I want the X sizes to
> > be set by dividing up the available width evenly in the layout
> > process.  I am willing to do some adjustments in onCreate, but what
> > can I do to force the 1:1 aspect ratio of the buttons and still
> > benefit from convenience of XML layout?
>
> --
> 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: EGL/OpenGL ES Frame Rate Stuttering

2011-11-06 Thread Ratamovic
Hi,

I got the same results on my phone (HTC Desire) and tablet (Galaxy Tab 10.1 
too) with a completely native application (implemented with NativeActivity) 
which was doing almost nothing apart from clearing and swapping buffers... 
So I doubt this issue comes from a garbage collector problem.
I would be really interested to know the answer. The only lead I have is 
the following question on StackOverflow: 
http://stackoverflow.com/questions/3706786/htc-desire-specific-opengl-es-1-frame-rate-cant-get-it-right
.

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

2011-11-06 Thread jaggu
please update this how to show same tabhost with tabacivity for all
the actvityies how to implement
please urgent

On Sun, Nov 6, 2011 at 11:42 AM, jaggu  wrote:
> intent = new Intent().setClass(this,HourlyActivity.class);              spec =
> tabHost.newTabSpec("Hourly").setIndicator("",res.getDrawable(R.drawable.tab_hourly))
>                             .setContent(intent);            
> tabHost.addTab(spec);
>        //Map Tab                 intent = new 
> Intent().setClass(this,map.class);
> spec 
> =tabHost.newTabSpec("Maps").setIndicator("",res.getDrawable(R.drawable.tab_map))
> .setContent(intent);             tabHost.addTab(spec);                        
>    //More Tab               intent
> = new Intent().setClass(this,MoreActivity.class);                 spec =
> tabHost.newTabSpec("More").setIndicator("",res.getDrawable(R.drawable.tab_more)).setContent(intent);
>  tabHost.addTab(spec);
> please see my above code : in that i have More actvity  class contains
> list of items .
>  in one of the list item clicks on it goes to next screen in that
> bottom of the tabhost is missing in my screen ..
> like that around i have 10 list of items in more actvity : for each
> screen bottom tabhost missing
>
>         xmlns:android="http://schemas.android.com/apk/res/android";
>        android:id="@android:id/tabhost"
>        android:layout_width="fill_parent"
>        android:layout_height="wrap_content"
>        >
>                         android:layout_height="fill_parent"
>                        android:layout_width="fill_parent"
>                        android:padding="5dp">
>                        
>                android:layout_width="fill_parent"
>        android:layout_height="fill_parent"
>        android:padding="5dp"
>        >
>                     android:layout_width="fill_parent"
>             android:layout_height="fill_parent"
>             android:layout_above="@android:id/tabs"
>             android:background="@drawable/back"
>                   >
>
>                            android:id="@+id/linearLayout1"
>                android:layout_width="match_parent"
>                android:layout_height="match_parent"
>                android:orientation="vertical"
>
>                >
>            
>
>        
>                          android:layout_width="fill_parent"
>             android:layout_height="wrap_content"
>             android:layout_alignParentBottom="true"
>
>              />
>        
> 
>
> this is main.xml with bottom host displaying ..
> that i asked how to apply for this tabhost for entire my project
>
>
>
> On Sun, Nov 6, 2011 at 11:11 AM, skink  wrote:
>>
>>
>> On Nov 6, 6:16 am, jaggu  wrote:
>>> Hi
>>>  i my currentactivity i have 5 tabhost with tab spec.
>>>    this i need to apply for all the screen ,its another screen its
>>> missing how to apply
>>> please hlep me in this.
>>
>> all you need is to ask your question in at least understable english
>> since I didn't got a word of what you want to do
>>
>> pskink
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] Can't layout square ImageButtons

2011-11-06 Thread Kostya Vasilyev

Don't set layout_weight=1 on the buttons.

Insert four Views between the buttons to act as spacers, and give those 
layout_weight:











etc.

-- Kostya

06.11.2011 17:09, RLScott пишет:

This should be easy, but everything I try is not quite right.  I want
to use an XML RelativeLayout to position 5 square ImageButtons along
the bottom of the screen.  The images are defined by a 120 x 120 pixel
PNG, so it needs to be scaled down to fit in a Droid in portrait mode,
for instance.  I have tried specify for each button:

   android:layout_weight="1"
   android:layout_width="50px"
   android:layout_height="50px"
   android:scaleType="fitXY"

The layout_weight="1" is necessary to make the buttons spread out
horizontally and share the space.  Otherwise they bunch up at the
beginning.

The layout_width and layout_height are arbitrary, but they are
necessary to keep the program from crashing.

the scaleType of "fitXY" is necessary to make the image scale down to
the laid out size of the button.   But it only scales in X.  It leaves
Y at 50px because that was my arbitrary setting.  I want the
ImageButton to remain square, so I need the X and Y sizes to be the
same.  I don't know how to do that in XML without specifying them
explicitly, and I don't want to do that because I want the X sizes to
be set by dividing up the available width evenly in the layout
process.  I am willing to do some adjustments in onCreate, but what
can I do to force the 1:1 aspect ratio of the buttons and still
benefit from convenience of XML layout?



--
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] Can't layout square ImageButtons

2011-11-06 Thread RLScott
This should be easy, but everything I try is not quite right.  I want
to use an XML RelativeLayout to position 5 square ImageButtons along
the bottom of the screen.  The images are defined by a 120 x 120 pixel
PNG, so it needs to be scaled down to fit in a Droid in portrait mode,
for instance.  I have tried specify for each button:

  android:layout_weight="1"
  android:layout_width="50px"
  android:layout_height="50px"
  android:scaleType="fitXY"

The layout_weight="1" is necessary to make the buttons spread out
horizontally and share the space.  Otherwise they bunch up at the
beginning.

The layout_width and layout_height are arbitrary, but they are
necessary to keep the program from crashing.

the scaleType of "fitXY" is necessary to make the image scale down to
the laid out size of the button.   But it only scales in X.  It leaves
Y at 50px because that was my arbitrary setting.  I want the
ImageButton to remain square, so I need the X and Y sizes to be the
same.  I don't know how to do that in XML without specifying them
explicitly, and I don't want to do that because I want the X sizes to
be set by dividing up the available width evenly in the layout
process.  I am willing to do some adjustments in onCreate, but what
can I do to force the 1:1 aspect ratio of the buttons and still
benefit from convenience of XML layout?

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

2011-11-06 Thread John Goche
Hello,

I have tried using Base64.encode() with the sendDataMessage as follows:

smsManager.sendDataMessage("5558", null, (short) 1500,
Base64.encode("hello SMS".getBytes(), Base64.DEFAULT), null, null);

I have also tried putting the following in my AndroidManifest.xml but
no luck on the emulator.


  





  


The result is the following output in adb logcat when the message is
received (some garbage is shown
as a notification as the text message arrives):

V/Telephony(  295): getOrCreateThreadId cursor cnt: 1

However I don't see the calls from my boardcast receiver being called.
I don't understand why it's not being called.

Any ideas?

public class SMSReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {

Log.d(TAG, "hello received");

Object[] pduArray = (Object[]) intent.getExtras().get("pdus");

SmsMessage[] messages = new SmsMessage[pduArray.length];

for (int i = 0; i < pduArray.length; i++) {

  Log.d(TAG, "received");

  messages[i] = SmsMessage.createFromPdu((byte[]) pduArray[i]);

  Log.d(TAG, messages[i].getDisplayOriginatingAddress());

  Log.d(TAG, messages[i].getMessageBody());

}

  }

  private static final String TAG = "SMSReceiver";

}

Many thanks,

Regards,

John Goche

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: No APK file or DEX files are created - with no warning or Error whatsoever

2011-11-06 Thread rktb
With the new ADT plugins, it is the default behavior (to speed up
build time) to not generate the .apk on every build. Note that a build
is triggered every time a file is changed and saved as well and this
dramatically increases the build time. So, the change is to skip the
resource packaging step by default. You can generate the .apk by doing
a File --> Export --> Android --> "Export as Android Application" ...

You can also restore the original behavior of generating the .apk
automatically. More information on that is shown here:
http://tools.android.com/recent/finercontroloveradtbuildprocess


On Nov 6, 12:55 am, lokesh gupta  wrote:
> Hi,
>
> There is certainly some problem with your set up. Take a fresh sdk and
> check the
> target version of the hello world app.
>
>
>
>
>
>
>
>
>
> On Sat, Nov 5, 2011 at 1:54 AM, Asaf Koski  wrote:
> > Hi,
>
> > I've developed Android for a while now, using WIN7 64bit and Eclipse.
> > Since I've tried to install the new ADT (1.5), I get a very weird
> > phenomena. My build doesn't complete, and doesn't generate the APK
> > file, nor the dex files.
> > the class files are created, but nothing else.
>
> > Also, there is no warning or error neither at the output or the
> > Eclipse log.
>
> > The problem didn't occur immediately, but only after 1 or 2 good
> > builds.
> > Even if I create a simple project, the same thing happens.
>
> > I didn't find anything useful on the net.
> > I've re-downloaded Eclipse, the SDK, ADT, and started all over again,
> > and got the JRE7 compatibility issue (function ... must override).
> > I guess I got a Java SE update, and lost the old JRE. So I've
> > downloaded JRE6, changed the compliance issue, and set it and the
> > environment, and got back to square 1 :)
>
> > The build process starts, reaches 50% or 75%, suddenly stops, and no
> > apk or dex files are created.
> > Even for new empty helloWorld projects.
>
> > Can someone please help? I have no idea how to proceed.
>
> > 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
>
> --
> Thanks & Regards
> Lokesh Gupta

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

2011-11-06 Thread bob
I'm trying to install the apidemos sample on my VIZIO tablet, and I
get this error:

D/PackageManager(  176): Scanning package com.example.android.apis
W/PackageManager(  176): Package com.example.android.apis desires
unavailable shared library com.example.will.never.exist; ignoring!
E/PackageManager(  176): Package com.example.android.apis requires
unavailable feature android.hardware.camera; failing!
W/PackageManager(  176): Package couldn't be installed in /data/app/
com.example.android.apis-1.apk

My VIZIO tablet definitely has a camera.  Any ideas how to make this
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


Re: [android-developers] Re: more SMS questions

2011-11-06 Thread John Goche
Tank you for your reply...

What do you mean base64 encode the binary data and send it as a plain
SMS text message?
But I don't want the message on the receiving end to go to the inbox
folder. I just want it to be
read by the application and discarded thereafter (class 0) or
otherwise use a port number that
my application can recognize. Can I do that if I simply base64 encode
my message and send
it as a multipart text sms? What about getting a status report?

I've read some posts saying sendDataMessage is broken on the emulator.

Still wondering what getSubmitPdu is used for.

Regards,

John Goche

On Sun, Nov 6, 2011 at 2:11 AM, Belvedere Computer Services
 wrote:
> Base64 encoder on the send end / decode on remote
>
> On Nov 5, 7:28 pm, John Goche  wrote:
>> Hello,
>>
>> As mentioned in an earlier post I am trying to send binary SMS
>> from one phone to another. I use the emulator number as the
>> phone number destination address in order to test things out.
>>
>> When the SMS is not binary (sendTextMessage below) things
>> work fine, the message is received by the other emulator and
>> I see the string output. However when I use sendDataMessage
>> (presumably this is to send a binary SMS), the sending emulator
>> stalls (I see the small windows spinning blue circle) for a while
>> (a few seconds) after which I do not see the Log.d output in the
>> receiving emulator.
>>
>> I would like to know what I am doing wrong. Also, how do I:
>>
>> 1. Specify class 0 for the SMS if this in not done automatically?
>> 2. Listen on the specified port number (123) on the receiver?
>> 3. Choose an appropriate SMS port number for my application?
>> 4. Can someone please explain to me what the getSubmitPdu
>>     method is good for? I've read the docs and also the reference
>>     on SMS athttp://www.dreamfabric.com/sms/and the android
>>     docs but I still cannot figure it out.
>> 5. Am I correct at interpreting that with sendDataMessage an
>>     SMS status report will be generated if and only if the last
>>     argument (the pending intent) is not null, otherwise the
>>     SMS will be sent without specifying that a status report
>>     be generated?
>>
>> Thank you for your help,
>>
>> John Goche
>>
>> FooActivity.java 
>>
>>         SmsManager smsManager = SmsManager.getDefault();
>>
>>         //smsManager.sendTextMessage("5556", null, "hello SMS", null, null);
>>
>>         smsManager.sendDataMessage("5556", null, (short) 123, new
>> byte[] { '1', '2', '3', '4' }, null, null);
>>
>> SMSReceiver.java -
>>
>> import android.content.BroadcastReceiver;
>> import android.content.Context;
>> import android.content.Intent;
>> import android.telephony.SmsMessage;
>> import android.util.Log;
>>
>> public class SMSReceiver extends BroadcastReceiver {
>>
>>   @Override
>>   public void onReceive(Context context, Intent intent) {
>>
>>     Object[] pduArray = (Object[]) intent.getExtras().get("pdus");
>>
>>     SmsMessage[] messages = new SmsMessage[pduArray.length];
>>
>>     for (int i = 0; i < pduArray.length; i++) {
>>
>>       Log.d(TAG, "received");
>>
>>       messages[i] = SmsMessage.createFromPdu((byte[]) pduArray[i]);
>>
>>       Log.d(TAG, messages[i].getDisplayOriginatingAddress());
>>
>>       Log.d(TAG, messages[i].getMessageBody());
>>
>>     }
>>
>>   }
>>
>>   private static final String TAG = "SMSReceiver";
>>
>>
>>
>>
>>
>>
>>
>> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Lazy loading contact images to a ListView in Android

2011-11-06 Thread Peter Liu
Try androidquery lib at androidquery.com. There is example and a demo
app to show you how to load images efficiently.

On Nov 5, 5:10 pm, Chirag Raval 
wrote:
> What is the easiest way of lazy loading contact images to a ListView
> in Android? (for SDK level >=7) Is there a common approach or should I
> choose one of the different approaches discussed here on lazy loading
> web images into ListViews?
>
> I have come across the ContactPhotoLoader used inside the default
> Contacts application which seems ok for me. Is there a better approach
> to do it?

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


Re: [android-developers] QR code that redirects to android market

2011-11-06 Thread Kostya Vasilyev

http://stackoverflow.com/questions/4755574/create-qr-code-to-app-in-market

06.11.2011 14:36, Kobi пишет:

I want to generate a QR code that activates the Android market
application and within that application opens a specific application
such as "pocket chess for android".
is it possible to do that?
and if its possible, how?



--
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] QR code that redirects to android market

2011-11-06 Thread Kobi
I want to generate a QR code that activates the Android market
application and within that application opens a specific application
such as "pocket chess for android".
is it possible to do that?
and if its possible, how?

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

2011-11-06 Thread Kostya Vasilyev
Have you tried using the new 3.0 animation package to shrink the item 
layout's height?


06.11.2011 11:16, lokesh gupta ?:
You can get the Item position  of the selected text view, Once this is 
deleted you can iterate

and assign the new Items at that location.

Lokesh

On Sun, Nov 6, 2011 at 10:33 AM, Romain Guy > wrote:


Gmail uses a custom ListView.

On Nov 5, 2011 7:20 PM, "Doug" mailto:beafd...@gmail.com>> wrote:

The Gmail app may not be using a ListView, or may be using a
customized derivative of ListView to achieve that effect.  I
imagine
it's not as simple as setting a flag or writing a few lines of
code to
run an animation.

Doug

On Nov 4, 6:06 am, BoD mailto:bodlu...@gmail.com>> wrote:
> Hi!
>
> I am looking at how to implement nice animations in a
ListView for an
> app targeting Android 3 and more.
> Specifically, I would like to implement the same behavior
that can be
> seen in the Gmail app when an item is deleted or archived:
the other
> elements of the list smoothly move to fill the empty space left.
>
> Any pointers on this?
> Thanks a lot!
>
> --
> BoD

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
android-developers@googlegroups.com

To unsubscribe from this group, 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




--
Thanks & Regards
Lokesh Gupta
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Re: Changing screen resolution at run-time

2011-11-06 Thread Shlomi Mor
Thanks. I will do it :-)

On Oct 31, 8:17 pm, Mark Murphy  wrote:
> Step #1: Visithttp://source.android.com
> Step #2: Click the Community tab
> Step #3: Find a list that is relevant to your question
> Step #4: Ask your question there
>
>
>
>
>
>
>
>
>
> On Mon, Oct 31, 2011 at 9:23 AM,ShlomiMor wrote:
> > Hi,
>
> > The device I am working on has only one LCD controller, which can
> > display to LCD or HDMI (one at a time).
> > I would like the device to display to LCD by default, and display to
> > HDMI only when HDMI cable is connected.
> > Since HDMI resolution is different than LCD resolution, I will change
> > frame buffer resolution.
> > BUT - I also have to notify Android (SurfaceFlinger, Applications,
> > etc.) about the change of frame buffer resolution.
> > I can also live with a solution of re-booting Android modules which
> > are dependent on screen resolution (assuming it will be fast enough).
>
> > Any idea how this can be done?
>
> > Thanks,
> >        Shlomi
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.0 Available!

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


[android-developers] Re: contacts first and last name

2011-11-06 Thread hongbosb
_ID in data table and contacts table are two different things. So you
should use raw_contacts_id instead of _id when query in data table.

change
String[] projection = new String[]
{ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac
t.CommonDataKinds.StructuredName.FAMILY_NAME};
String where = ContactsContract.CommonDataKinds.StructuredName._ID+ "
= ?
AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ "
= ?";

to
String[] projection = new String[]
{ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac
t.CommonDataKinds.StructuredName.FAMILY_NAME};
String where = ContactsContract.Data.CONTACT_ID " = ?
AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ "
= ?";

On 11月5日, 上午7时38分, Goutom  wrote:
> Hi
>
> I am trying to fetch contacts  first and last name.But getting fail.
> I am using the following code.
>
> String id;
> String[] projection = new String[]
> {ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,ContactsContrac 
> t.CommonDataKinds.StructuredName.FAMILY_NAME};
> String where = ContactsContract.CommonDataKinds.StructuredName._ID+ " = ?
> AND "+ ContactsContract.CommonDataKinds.StructuredName.MIMETYPE+ " = ?";
>
> id = Get_Id(contact_id);
> String[] whereParameters = new String[]
> {id,ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE };
> Cursor cursor =
> cr.query(ContactsContract.Data.CONTENT_URI,projection, where,
> whereParameters, null);
>
> if(cursor.moveToFirst())
> {
> String contact_given_name =
> cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Str 
> ucturedName.GIVEN_NAME));
> String  contact_family_name =
> cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Str 
> ucturedName.FAMILY_NAME));
> }
> cursor.close();
> but its giving null. where is the problem?
>
> Take care.
>
> Regards
> Goutom Roy

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


[android-developers] Re: ERROR/AndroidRuntime(631): FATAL EXCEPTION: main, ERROR/AndroidRuntime(631): java.lang.StackOverflowError

2011-11-06 Thread Bala Subrahmanyam Varanasi
I got answer to that question. The answer is here
http://stackoverflow.com/questions/8025478/error-androidruntime631-fatal-exception-main-error-androidruntime631-jav

I got another error while developing. Here is the log cat.

Here might be the problem in the following classes code.

https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNameTable.java
https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNames.java

11-06 12:56:10.156: INFO/global(516): Default buffer size used in 
BufferedReader constructor. It would be better to be explicit if an 8k-char 
buffer is required.
11-06 12:56:10.156: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.306: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.428: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.546: INFO/CommonNameTable(516): OPening DataBase 
Connection
11-06 12:56:10.576: DEBUG/AndroidRuntime(516): Shutting down VM
11-06 12:56:10.576: WARN/dalvikvm(516): threadid=1: thread exiting with 
uncaught exception (group=0x4001d800)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): FATAL EXCEPTION: main
11-06 12:56:10.596: ERROR/AndroidRuntime(516): java.lang.RuntimeException: 
Unable to start activity 
ComponentInfo{balu.android/balu.android.CommonNames}: 
java.lang.ClassCastException: android.widget.TextView
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.os.Handler.dispatchMessage(Handler.java:99)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.os.Looper.loop(Looper.java:123)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread.main(ActivityThread.java:4627)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
java.lang.reflect.Method.invokeNative(Native Method)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
java.lang.reflect.Method.invoke(Method.java:521)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
dalvik.system.NativeStart.main(Native Method)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): Caused by: 
java.lang.ClassCastException: android.widget.TextView
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
balu.android.CommonNames.onCreate(CommonNames.java:31)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): ... 11 more
11-06 12:56:10.616: WARN/ActivityManager(59):   Force finishing activity 
balu.android/.CommonNames
11-06 12:56:10.626: WARN/ActivityManager(59):   Force finishing activity 
balu.android/.Select
11-06 12:56:11.183: WARN/ActivityManager(59): Activity pause timeout for 
HistoryRecord{450af6e8 balu.android/.CommonNames}
11-06 12:56:20.036: WARN/ActivityManager(59): Launch timeout has expired, 
giving up wake lock!
11-06 12:56:20.125: WARN/ActivityManager(59): Activity idle timeout for 
HistoryRecord{450af6e8 balu.android/.CommonNames}
11-06 12:56:21.252: WARN/ActivityManager(59): Activity idle timeout for 
HistoryRecord{44fd7b98 balu.android/.BabyNamesAppActivity}

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] Strange error

2011-11-06 Thread jaggu
Hi what is this please tell me iam getting like this

[2011-11-06 13:07:10 - Wt360weatherActivity] Failed to install
Wt360weatherActivity.apk on device 'emulator-5554': Local path doesn't
exist.
[2011-11-06 13:07:10 - Wt360weatherActivity]
com.android.ddmlib.SyncException: Local path doesn't exist.
[2011-11-06 13:07:10 - Wt360weatherActivity] Launch canceled!

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

2011-11-06 Thread lokesh gupta
You can get the Item position  of the selected text view, Once this is
deleted you can iterate
and assign the new Items at that location.

Lokesh

On Sun, Nov 6, 2011 at 10:33 AM, Romain Guy  wrote:

> Gmail uses a custom ListView.
> On Nov 5, 2011 7:20 PM, "Doug"  wrote:
>
>> The Gmail app may not be using a ListView, or may be using a
>> customized derivative of ListView to achieve that effect.  I imagine
>> it's not as simple as setting a flag or writing a few lines of code to
>> run an animation.
>>
>> Doug
>>
>> On Nov 4, 6:06 am, BoD  wrote:
>> > Hi!
>> >
>> > I am looking at how to implement nice animations in a ListView for an
>> > app targeting Android 3 and more.
>> > Specifically, I would like to implement the same behavior that can be
>> > seen in the Gmail app when an item is deleted or archived: the other
>> > elements of the list smoothly move to fill the empty space left.
>> >
>> > Any pointers on this?
>> > Thanks a lot!
>> >
>> > --
>> > BoD
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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
>



-- 
Thanks & Regards
Lokesh Gupta

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

Re: [android-developers] ERROR/AndroidRuntime(631): FATAL EXCEPTION: main, ERROR/AndroidRuntime(631): java.lang.StackOverflowError

2011-11-06 Thread lokesh gupta
Looks like there is sonme problem in below snippet:

while ((strLine = br.readLine()) != null)   {
  String[] temp;

  strLine = strLine.trim();
  temp = strLine.split("\\s+");

  commonNameTable.createCommonName(temp[1], temp[0]);
  }

Check the temp values once again, may be because of trimming it is
giving the error.

Lokesh


On Sun, Nov 6, 2011 at 10:37 AM, Bala Subrahmanyam Varanasi <
vab...@gmail.com> wrote:

> Hi !
>
> I'm developing a Baby Names app. I'm getting runtime exception while
> developiing the App. Here is some part of the log file.
>
> 11-06 01:37:00.970: WARN/dalvikvm(631): threadid=1: thread exiting with
> uncaught exception (group=0x4001d800)
> 11-06 01:37:01.040: ERROR/AndroidRuntime(631): FATAL EXCEPTION: main
> 11-06 01:37:01.040: ERROR/AndroidRuntime(631): java.lang.StackOverflowError
> 11-06 01:37:01.040: ERROR/AndroidRuntime(631): at
> balu.android.CommonNameTable.<**init>(CommonNameTable.java:59)
> 11-06 01:37:01.040: ERROR/AndroidRuntime(631): at
> balu.android.CommonNameTable.<**init>(CommonNameTable.java:59)
>
>  The functionality of App is going to be like follow.
>
> 1. Select activity contains a menu, having the following items.
>
>- Common names
>- Uncommon names
>- Names popular in a specific city
>
>
> https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/Select.java
>  -
> is the link to the Select Activity.
>
>
> 2. When the user selects - "Common names" -
>
> a new Activity will be launched. I contains a ListView, of all the names
> from CommonNameTable in the SQLite database. In the constructor of the
> table, I tried to insert records from the file "commonnames*.txt*". Here
> is the links to the classes I have written.
>
>
> https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNameTable.java
>
> https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNames.java
>
> Could you please help me in fixing this problem?
>
> 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




-- 
Thanks & Regards
Lokesh Gupta

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

2011-11-06 Thread lokesh gupta
Please give android:textSize="   "

This will solve your problem.

Lokesh

On Sun, Nov 6, 2011 at 7:45 AM, Doug  wrote:

> I remember noting this as a difference in Honeycomb compared to old
> Android versions.  You might want to try in a Honeycomb (and even ICS)
> emulator as a reference.  And I would love for a Google Android
> engineer to chime in as to why the behavior or TextView changed --
> this is not an insignificant change.
>
> Doug
>
> On Nov 4, 8:32 am, RLScott  wrote:
> > The app is compiled
> > use API 8 for Android 2.2.  But on a Acer A100 tablet running Android
> > 3.2, this is not what happens.  Instead a TextView with a zero-length
> > text takes up no room at all and the second TextView slides up to
> > where the first TextView would have been.  I know I could probably fix
> > the problem by setText(" ") instead of setText(""), but there are
> > various reasons in my app that would make that a messy solution.  Can
> > anyone confirm or explain this layout behavior?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Lokesh Gupta

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

2011-11-06 Thread lokesh gupta
URI uri = content://contact.people

On Sun, Nov 6, 2011 at 12:04 PM, hongbosb  wrote:

> Do you mean just retrieve group list?
>
> I used ContactsContract.Group.CONTENT_URI to get it.
>
> On 11月4日, 下午5时49分, Samar Simha reddy  wrote:
> > Hi
> >
> > how to retrieve the contact list based on 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
>



-- 
Thanks & Regards
Lokesh Gupta

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