[android-developers] How to retreive edittext and spinner data added dynamically for a linear layout.

2013-04-18 Thread Seshu
when i press the plus image the view should added dynamically for the
linearlayout which i defined in xml file. the views contains edittext
and spinner and one checkbox button.  when the user pressed the nxt
btn the checkbox selected and corresponding the user entered the data
must be saved. here how to retreive the edittext data and also which
spinner the user selected the corressponding check box. how to acheive
this?? Please help how to do??

Thanks and Regards,
S.Seshu

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem

2013-04-18 Thread Long Pu
It's galaxy S2.

I believe the GCM works on this phone. I am wondering what GCM does to keep
his socket alive.
It would not seed keep alive packets in short period like several seconds,
this would burn
out battery very quickly.

My guess is that the carrier can recognize the GCM tcp connection and only
keep it alive.

Cheers.
Long


On Fri, Apr 19, 2013 at 12:00 AM, Robert Greenwalt wrote:

> What phone hardware?
>
>
> On Thu, Apr 18, 2013 at 3:27 AM, Long Pu  wrote:
>
>> We only see this issue on Boost phones on WIMAX actually. Pure Sprint
>> phones work fine.
>>
>> The minimal required period is a crazy value like 3~5 seconds.   Hope
>> this info can help.
>> Our guess is that maybe Boost rents other company's WIMAX network, so
>> they would like to try their best to clean up idle connections.
>>
>>
>> Thanks.
>>
>> Cheers.
>> Long
>>
>>
>>
>> On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt 
>> wrote:
>>
>>> Thanks Long Pu for the reasoning for not using GCM.
>>>
>>> You only have this problem on sprint wimax, correct?  Have to tried very
>>> frequent keep-alives?  Figuring out roughly what the required period is may
>>> help us find the cause.  We can talk with Sprint and Samsung about it, but
>>> the timeout info would be useful before that.
>>>
>>> R
>>>
>>>
>>> On Wed, Apr 17, 2013 at 7:28 AM, Long Pu  wrote:
>>>
 We have to consider multiple platforms(iOS, Android, Blackberry). On
 iOS, push notification
 is not an option for our application.  If use GCM, we need  another
 extra special design especially for android.


 On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt <
 rgreenw...@google.com> wrote:

> Could you use GCM  
> instead
> of rolling your own long-lived connection with independent keepalive?
>  It'll be better for the users battery and better for the carriers network
> and you won't have to figure out issues like these.
>
>
> On Sat, Apr 13, 2013 at 3:35 AM, Long  wrote:
>
>> Hi Developers,
>> I have an background service which connects my server with a TCP
>> connection.
>> My background service sends a ping packet to my server every
>> 4minutes to keep the socket alive.
>>The problem is that the device can not get the packet from the
>> server after a short time(3 seconds from my test) after the ping is sent.
>>This app works fine on other networks(AT&T, verizon).
>>
>>The strange thing is that if I force the device to connect to
>> 3G(EVDO revision A), it works fine.
>>
>>It seems to me that, on Sprint 4G network, when an app sends a
>> packet through a tcp socket, and then the socket is idle for
>> several seconds, then the app will never be able to receive packets
>> from this socket.
>>
>>I don't think it's related to the 4G signal, since this issue can
>> be reproduced every time.
>>
>>Any suggestions?
>>
>>
>>
>>
>>
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to
>> android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to android-developers+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to
> android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



 --
 Things don' happen. Things are made to happen.

 --
 --
 You received this message because you are subscribed to the Google
 Group

Re: [android-developers] Re: MediaController - seek bar

2013-04-18 Thread Larry Meadors
Worked perfectly. Thanks.

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread bob
Apparently, the Nexus 7 has no temperature sensor according to this method:

private void attachToSensor() {
SensorManager sensorManager = getSensorManager();
 List sensors = 
sensorManager.getSensorList(Sensor.TYPE_TEMPERATURE);
if (sensors.size() > 0) {
Sensor sensor = sensors.get(0);
sensorManager.registerListener(this, sensor, 
SensorManager.SENSOR_DELAY_FASTEST, handler);
} else {
Log.e(TAG, "No temperature sensor found");
} 
}

Thanks.


On Thursday, April 18, 2013 4:14:03 PM UTC-5, psyco wrote:
>
> am sure that the method that shows the needle is not called !!
> check your ondraw method 
>
>
> 2013/4/18 bob >
>
>> For some reason, that thermometer example doesn't seem to work right:
>>
>>
>> 
>>
>>
>>
>>
>> Thanks.
>>
>> On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote:
>>>
>>> I found this nice tutorial about the subject: http://mindtherobot.**
>>> com/blog/272/android-custom-**ui-making-a-vintage-**thermometer/
>>>
>>> And based on that created this Speedometer: https://github.**
>>> com/bilthon/Android-**Speedometer
>>>
>>> Both projects are very simple, but they demonstrate quite well how to 
>>> create a custom view similar to the one you apparently want.
>>>
>>> Nelson
>>>
>>>
>>> On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote:

 hi all,



 am
  
 trying to build a custom view witch displays a gauge, what i did is :
 1-designed the gauge with photoshop
 2-created the cutom View and it's .XML file 
 3-set the bakcground gauge
 So, i need to know how to display a needle and how rotating it 
 some help will be very grateful

  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Abdallah Mohamed Amine
> Élève ingénieur en informatique de la FST
> Responsable d'un club embarqué microdesign
> Tél : +216 27 105 393
>  
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: MediaController - seek bar

2013-04-18 Thread Larry Meadors
I'll try that...thanks!

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
am sure that the method that shows the needle is not called !!
check your ondraw method


2013/4/18 bob 

> For some reason, that thermometer example doesn't seem to work right:
>
>
> 
>
>
>
>
> Thanks.
>
> On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote:
>>
>> I found this nice tutorial about the subject: http://mindtherobot.**
>> com/blog/272/android-custom-**ui-making-a-vintage-**thermometer/
>>
>> And based on that created this Speedometer: https://github.**
>> com/bilthon/Android-**Speedometer
>>
>> Both projects are very simple, but they demonstrate quite well how to
>> create a custom view similar to the one you apparently want.
>>
>> Nelson
>>
>>
>> On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote:
>>>
>>> hi all,
>>>
>>>
>>>
>>> am
>>> trying to build a custom view witch displays a gauge, what i did is :
>>> 1-designed the gauge with photoshop
>>> 2-created the cutom View and it's .XML file
>>> 3-set the bakcground gauge
>>> So, i need to know how to display a needle and how rotating it
>>> some help will be very grateful
>>>
>>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: MediaController - seek bar

2013-04-18 Thread bob
What about this in the MediaPlayer class?

public void *setOnSeekCompleteListener* (MediaPlayer.OnSeekCompleteListener 
listener)

Thanks.



On Thursday, April 18, 2013 3:06:20 PM UTC-5, Larry Meadors wrote:
>
> I have a audiobook player that saves it's position using a web service. 
>
> It has a periodic timer that saves every 30 seconds which works great, but 
> I'd like to also save immediately after the user moves the position using 
> the seek bar. 
>
> I'm using the built-in MediaController, but it doesn't seem to provide 
> anything except for the MediaPlayerControl interface. 
>
> That interface has a seekTo() method that tells the current position, but 
> it tells it as you're dragging, so it fires off a few dozen evens as you 
> drag it. I really don't care about any of those, just the last one.
>
> Any smart people with a tip for me here? I have a couple of ideas, I'm 
> just not crazy about any of them...
>
> Larry
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread user123
The point is - if somebody sees my app on a tablet, like now, they will 
think what the ...? They'll think I have no idea. But if people sees it in 
compatibility mode (or even better, they can't download it), they say, 
okay, the app was not intended for tablets! - That's a huge difference.



Am Donnerstag, 18. April 2013 22:30:18 UTC+2 schrieb user123:
>
> Well, my layout is density independent. I misused the density folders as 
> approximation for screen size, and it worked well on smartphones
>
> The issue is that this app was never intended for tablets - but, great, in 
> Android it's possible to exclude small screens, but not large ones.
>
> Nobody in the company was interested in using this app on large screens, 
> so I never got the order or time to do this work.
>
> Now this app is available but the development is suspended - I'm also not 
> working there anymore. The app looks perfect in all smartphones. But on 
> tabled-sized screens it has mayor errors, because of some calculations I 
> had to do programmatically, which seem to have a problem when the screen is 
> large, and some places where I forgot nine patch buttons and things like 
> that. There where also a lot of backgrounds with bitmap-shadow, where the 
> content had to be adjusted very accuratedly to look correct.
>
> So, yeah, if I could, I would just put this application off for tablets, 
> because that's was what I was told to, actually. But it's not possible. But 
> I thought "Okay, I can resort to 
> compatibility mode". But great to see, now, that this also doesn't work. 
> So now I have to spend a weekend working for free, because my company 
> doesn't targets the tablet market but Android thinks it's important?
>
> Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy:
>>
>> On Thu, Apr 18, 2013 at 3:53 AM, user123  wrote: 
>> > I did the work to optimize layout for xhdpi devices 
>>
>> Then you did it wrong. Layouts should be density-independent. The 
>> layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus 
>> (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they 
>> are all the same basic screen size, within fractions of an inch. 
>>
>> Screen size != screen density. In fact, there is no correlation between 
>> the two. 
>>
>> -- 
>> Mark Murphy (a Commons Guy) 
>> http://commonsware.com | http://github.com/commonsguy 
>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>
>> _The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread user123
Well, my layout is density independent. I misused the density folders as 
approximation for screen size, and it worked well on smartphones

The issue is that this app was never intended for tablets - but, great, in 
Android it's possible to exclude small screens, but not large ones.

Nobody in the company was interested in using this app on large screens, so 
I never got the order or time to do this work.

Now this app is available but the development is suspended - I'm also not 
working there anymore. The app looks perfect in all smartphones. But on 
tabled-sized screens it has mayor errors, because of some calculations I 
had to do programmatically, which seem to have a problem when the screen is 
large, and some places where I forgot nine patch buttons and things like 
that. There where also a lot of backgrounds with bitmap-shadow, where the 
content had to be adjusted very accuratedly to look correct.

So, yeah, if I could, I would just put this application off for tablets, 
because that's was what I was told to, actually. But it's not possible. But 
I thought "Okay, I can resort to 
compatibility mode". But great to see, now, that this also doesn't work. So 
now I have to spend a weekend working for free, because my company doesn't 
targets the tablet market but Android thinks it's important?

Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy:
>
> On Thu, Apr 18, 2013 at 3:53 AM, user123 > 
> wrote: 
> > I did the work to optimize layout for xhdpi devices 
>
> Then you did it wrong. Layouts should be density-independent. The 
> layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus 
> (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they 
> are all the same basic screen size, within fractions of an inch. 
>
> Screen size != screen density. In fact, there is no correlation between 
> the two. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread user123
Well, my layout is density independent. I misused the density folders as 
approximation for screen size, and it worked well on smartphones

The issue is that this app was never intended for tablets - but, great, in 
Android it's possible to exclude small screens, but not large ones.

Nobody in the company was interested in using this app on large screens, so 
I never got the order or time to do this work.

Now this app is available but the development is suspended - I'm also not 
working there anymore. The app looks perfect in all smartphones. But on 
tabled-sized screens it has mayor errors, because of some calculations I 
had to do programmatically, which seem to have a problem when the screen is 
large, and some places where I forgot nine patch buttons and things like 
that. There where also a lot of backgrounds with bitmap-shadow, where the 
content had to be adjusted with pixel-accuracy to look correct.

So, yeah, if I could, I would just put this application off for tablets, 
because that's was what I was told to, actually. But it's not possible. But 
I thought "Okay, I can resort to 
compatibility mode". But great to see, now, that this also doesn't work. So 
now I have to spend a weekend working for free, because my company doesn't 
targets the tablet market but Android thinks it's important?






Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy:
>
> On Thu, Apr 18, 2013 at 3:53 AM, user123 > 
> wrote: 
> > I did the work to optimize layout for xhdpi devices 
>
> Then you did it wrong. Layouts should be density-independent. The 
> layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus 
> (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they 
> are all the same basic screen size, within fractions of an inch. 
>
> Screen size != screen density. In fact, there is no correlation between 
> the two. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] MediaController - seek bar

2013-04-18 Thread Larry Meadors
I have a audiobook player that saves it's position using a web service.

It has a periodic timer that saves every 30 seconds which works great, but
I'd like to also save immediately after the user moves the position using
the seek bar.

I'm using the built-in MediaController, but it doesn't seem to provide
anything except for the MediaPlayerControl interface.

That interface has a seekTo() method that tells the current position, but
it tells it as you're dragging, so it fires off a few dozen evens as you
drag it. I really don't care about any of those, just the last one.

Any smart people with a tip for me here? I have a couple of ideas, I'm just
not crazy about any of them...

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread bob
 

For some reason, that thermometer example doesn't seem to work right:






Thanks.

On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote:
>
> I found this nice tutorial about the subject: 
> http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/
>
> And based on that created this Speedometer: 
> https://github.com/bilthon/Android-Speedometer
>
> Both projects are very simple, but they demonstrate quite well how to 
> create a custom view similar to the one you apparently want.
>
> Nelson
>
>
> On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote:
>>
>> hi all,
>>
>>
>>
>> am
>>  
>> trying to build a custom view witch displays a gauge, what i did is :
>> 1-designed the gauge with photoshop
>> 2-created the cutom View and it's .XML file 
>> 3-set the bakcground gauge
>> So, i need to know how to display a needle and how rotating it 
>> some help will be very grateful
>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
thank you Bilthon,
i build the custom view i want , i just used 3 drawable ( needle,
centerwheel and a background gauge)
with ondraw and rotate method
I tested it with my emulator and it's working correctly
thank you all for your help :D


2013/4/18 Bilthon 

> I found this nice tutorial about the subject:
> http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/
>
> And based on that created this Speedometer:
> https://github.com/bilthon/Android-Speedometer
>
> Both projects are very simple, but they demonstrate quite well how to
> create a custom view similar to the one you apparently want.
>
> Nelson
>
>
> On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote:
>>
>> hi all,
>>
>>
>>
>> am
>> trying to build a custom view witch displays a gauge, what i did is :
>> 1-designed the gauge with photoshop
>> 2-created the cutom View and it's .XML file
>> 3-set the bakcground gauge
>> So, i need to know how to display a needle and how rotating it
>> some help will be very grateful
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] "textMultiLine and textImeMultiLine"

2013-04-18 Thread John Goche
Hello,

I am trying to understand the difference between the textMultiLine and
textImeMultiLine options for android:inputType in an EditText. However
I have not been able to understand an answer. The documentation
says IME is a control enabling users to enter text but I don't
understand how texMultiLine is different from textImeMultiLine.

Thanks for your help,

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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Which is more suitable for uploading large files? a service on separate process or ...

2013-04-18 Thread Doug
I would definitely dedicate a service for things that do persistent work in 
the background.  There is no real advantage to using a separate process 
unless your upload needs a truckload of memory.

Doug

On Thursday, April 18, 2013 12:21:47 AM UTC-7, AndroidCompile wrote:
>
> Hi,
> When an application needs to upload many large files, which would be a 
> better solution:
> 1) Doing this on a separate process (i.e. remote service)?
> 2) Using a separate thread (or AsyncTask)?
>
> Is there a clear and definite answer to this?
>
> The application, by the way, is uploading things all the time - usually 
> very small chunks of data. 
> Every now and then it needs to send large files, so I want to do that with 
> a separate mechanism then the one I am using.
> (BTW for the small chunks I am using a single task thread which works 
> great)
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread Bilthon
I found this nice tutorial about the subject: 
http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/

And based on that created this Speedometer: 
https://github.com/bilthon/Android-Speedometer

Both projects are very simple, but they demonstrate quite well how to 
create a custom view similar to the one you apparently want.

Nelson


On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote:
>
> hi all,
>
>
>
> am
>  
> trying to build a custom view witch displays a gauge, what i did is :
> 1-designed the gauge with photoshop
> 2-created the cutom View and it's .XML file 
> 3-set the bakcground gauge
> So, i need to know how to display a needle and how rotating it 
> some help will be very grateful
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem

2013-04-18 Thread Robert Greenwalt
What phone hardware?


On Thu, Apr 18, 2013 at 3:27 AM, Long Pu  wrote:

> We only see this issue on Boost phones on WIMAX actually. Pure Sprint
> phones work fine.
>
> The minimal required period is a crazy value like 3~5 seconds.   Hope this
> info can help.
> Our guess is that maybe Boost rents other company's WIMAX network, so they
> would like to try their best to clean up idle connections.
>
>
> Thanks.
>
> Cheers.
> Long
>
>
>
> On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt 
> wrote:
>
>> Thanks Long Pu for the reasoning for not using GCM.
>>
>> You only have this problem on sprint wimax, correct?  Have to tried very
>> frequent keep-alives?  Figuring out roughly what the required period is may
>> help us find the cause.  We can talk with Sprint and Samsung about it, but
>> the timeout info would be useful before that.
>>
>> R
>>
>>
>> On Wed, Apr 17, 2013 at 7:28 AM, Long Pu  wrote:
>>
>>> We have to consider multiple platforms(iOS, Android, Blackberry). On
>>> iOS, push notification
>>> is not an option for our application.  If use GCM, we need  another
>>> extra special design especially for android.
>>>
>>>
>>> On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt <
>>> rgreenw...@google.com> wrote:
>>>
 Could you use GCM  
 instead
 of rolling your own long-lived connection with independent keepalive?
  It'll be better for the users battery and better for the carriers network
 and you won't have to figure out issues like these.


 On Sat, Apr 13, 2013 at 3:35 AM, Long  wrote:

> Hi Developers,
> I have an background service which connects my server with a TCP
> connection.
> My background service sends a ping packet to my server every
> 4minutes to keep the socket alive.
>The problem is that the device can not get the packet from the
> server after a short time(3 seconds from my test) after the ping is sent.
>This app works fine on other networks(AT&T, verizon).
>
>The strange thing is that if I force the device to connect to
> 3G(EVDO revision A), it works fine.
>
>It seems to me that, on Sprint 4G network, when an app sends a
> packet through a tcp socket, and then the socket is idle for
> several seconds, then the app will never be able to receive packets
> from this socket.
>
>I don't think it's related to the 4G signal, since this issue can
> be reproduced every time.
>
>Any suggestions?
>
>
>
>
>
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to
> android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to android-developers+unsubscr...@googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

  --
 --
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, 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 a topic in the
 Google Groups "Android Developers" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>
>>>
>>> --
>>> Things don' happen. Things are made to happen.
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-deve

Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread bob
 

I think the best solution is for you to not use compatibility mode.


I think it was mainly a stopgap solution for when tablets first came out.  
People probably wouldn't buy a tablet if nothing would run on it.  


But tablets have been out long enough so that it doesn't make sense to only 
design an app for a 2 inch wide phone and then run it in compatibility mode 
on a tablet.


Thanks.



On Thursday, April 18, 2013 2:53:05 AM UTC-5, user123 wrote:
>
> Thanks, Mark. I should have done a better research.
>
> So this leads to a quite stupid situation. I did the work to optimize 
> layout for xhdpi devices, like the Galaxy Nexus, and it looks quite well. 
> If I set the compatibility mode to 320dp, this willl be lost on all these 
> devices. Samsung Galaxy s3/4, HTC One, etc, have screen sizes which will 
> make my app go in compatibility mode!
>
> For me this is a bug, specially because the larger the screen, the more 
> sense it makes to have the option available to use compatibility mode. And 
> precisely then it's not possible.
>
>
>
> Am Mittwoch, 17. April 2013 22:36:47 UTC+2 schrieb Mark Murphy (a Commons 
> Guy):
>>
>> If you read the documentation: 
>>
>>
>> http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth
>>  
>>
>> it says: 
>>
>> "Note: Currently, screen compatibility mode emulates only handset 
>> screens with a 320dp width, so screen compatibility mode is not 
>> applied if your value for android:largestWidthLimitDp is larger than 
>> 320." 
>>
>>
>> On Wed, Apr 17, 2013 at 4:26 PM, user123  wrote: 
>> > Ok, the issue is confirmed. I created a brand new project with a blank 
>> > activity, and ran it on a tablet. 
>> > 
>> > The only modification I did was in the manifest, as follows: 
>> > 
>> >  
>> >  
>> > 
>> > 
>> > Then the app goes in compatibility mode - "Hello world!" is zoomed. 
>> Fine. 
>> > 
>> > But if I change to 321 dp - It doesn't go into compatibility mode. 
>> > 
>> > 
>> > I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches 
>> tablet 
>> > emulator. 
>> > 
>> > Is this a bug? 
>> > 
>> > 
>> > 
>> > Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123: 
>> >> 
>> >> I'm trying to force compatibility mode on tablets, for a certain app, 
>> >> because I don't work on it anymore - and currently it looks really 
>> really 
>> >> messed up on tablets. 
>> >> 
>> >> According to the documentation: 
>> >> http://developer.android.com/guide/practices/screen-compat-mode.html 
>> >> 
>> >> There are many different options to set up in the manifest, to make it 
>> >> possible, to the user, to enable compatibility mode. This is not 
>> exactly 
>> >> what I want, but anyways, maybe worth to mention, these options didn't 
>> work. 
>> >> I couldn't find anything on the device to switch to compatibility 
>> mode. I 
>> >> used a Nexus 7 with 4.2. 
>> >> 
>> >> Now there's the part which I need - and I also can't get it to work. 
>> To 
>> >> force compatibility mode, it I have to use this element: 
>> >> 
>> >>  
>> >> 
>> >> When I let the value 320 there, my Galaxy Nexus smartphone goes in 
>> >> compatibility mode. That is unwanted. 
>> >> The Nexus 7 also does, this is good. 
>> >> So I have to use bigger dp - But starting at 321, for some reason I 
>> don't 
>> >> understand, the Nexus 7 doesn't go anymore in compatibility mode. 
>> >> 
>> >> Is this normal? According to what I read the dp of the shortest side 
>> of 
>> >> the Nexus 7 is more than 500, why then it stops on 321? 
>> >> 
>> >> I would let it on 320, but I have optimized layouts for this screen 
>> size 
>> >> and don't want these to go in compatibility mode. 
>> >> 
>> >> Thanks. 
>> >> 
>> >> 
>> >> 
>> >> 
>> > -- 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Android Developers" group. 
>> > To post to this group, send email to android-d...@googlegroups.com 
>> > To unsubscribe from this group, send email to 
>> > android-developers+unsubscr...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/android-developers?hl=en 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups 
>> > "Android Developers" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an 
>> > email to android-developers+unsubscr...@googlegroups.com. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>> > 
>> > 
>>
>>
>>
>> -- 
>> Mark Murphy (a Commons Guy) 
>> http://commonsware.com | http://github.com/commonsguy 
>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>
>> _The Busy Coder's Guide to Android Development_ Version 4.7 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 emai

Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread Piren
Ahh... he might have did it wrong, but that's an over simplification... I 
wish you could use the same layouts for those devices... fact is you cant.
DP and SP do an OK Job to fit each density, but not perfect. The same 
layout on the Galaxy Nexus and on the Nexus S look different enough to 
require modifications if you're pedantic enough or trying to fit a lot of 
views in.
It gets even worse when screen sizes change... thats why they added more 
modifiers (like screen sizes) to allow more control.

Heck, sometimes you'd want to use different layouts for the same screen 
sizes exactly because of the fact the sizes are the same - text that looks 
normal on xxhdpi looks huge on hdpi and text that looks normal on hdpi is 
tiny on xxhdpi.

btw - not to confuse anyone, but it's kinda misleading to say there's no 
correlation between screen density and screen size... Google tried to make 
it so you could program regardless of their values (they didnt succeed) but 
they are correlated (density is defined by screen size after all :-P).

On Thursday, April 18, 2013 2:58:26 PM UTC+3, Mark Murphy (a Commons Guy) 
wrote:
>
> On Thu, Apr 18, 2013 at 3:53 AM, user123 > 
> wrote: 
> > I did the work to optimize layout for xhdpi devices 
>
> Then you did it wrong. Layouts should be density-independent. The 
> layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus 
> (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they 
> are all the same basic screen size, within fractions of an inch. 
>
> Screen size != screen density. In fact, there is no correlation between 
> the two. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread Krishna Mahadik
Dear Friend,

Just include following code in your manifest

 

Thanks & Regards,
Krishna V. Mahadik


On Thu, Apr 18, 2013 at 5:28 PM, Mark Murphy wrote:

> On Thu, Apr 18, 2013 at 3:53 AM, user123  wrote:
> > I did the work to optimize layout for xhdpi devices
>
> Then you did it wrong. Layouts should be density-independent. The
> layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus
> (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they
> are all the same basic screen size, within fractions of an inch.
>
> Screen size != screen density. In fact, there is no correlation between
> the two.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 4.7 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
-- 
. \\\///
.   /\
.   | \\   // |
. ( | (.) (.) |)
--o00o--(_)--o00o-

"Yesterday is not ours to recover, but
tomorrow is ours to win or to lose."

---ooo0---
.   (   )   0ooo
.\ (  (   )
. \_) ) /
.(_/

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Google+ How to know if application is installed by friends

2013-04-18 Thread rudas
Hi,

I'm trying to retrieve the people in a user's circles that have installed 
the current application.

I have used the sample application "PlusSampleActivity" provided in the SDK 
and successfully managed to get the list of all people in the user's 
circles.
However, I'm not sure how to get if the person have installed the 
application or not. The documentation available seems to be very limited...

What I have found is 
https://developer.android.com/reference/com/google/android/gms/plus/model/people/Person.html
I'm using below function but this is always returning false. (I have 
created a user that have installed the app and I can see this when visiting 
this user's profile on the web using Google+)

Is there some other API that should be used? Or any other limitations that 
I don't know about (time until it is visible?)?

public abstract boolean isHasApp ()
>
>  If "true", indicates that the person has installed the app that is
>  making the request and has chosen to expose this install state to the
>  caller. A value of "false" indicates that the install state cannot be
>  determined (it is either not installed or the person has chosen to
>  keep this information private).
>



Best regards,
Raz
 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread Mark Murphy
On Thu, Apr 18, 2013 at 3:53 AM, user123  wrote:
> I did the work to optimize layout for xhdpi devices

Then you did it wrong. Layouts should be density-independent. The
layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus
(xhdpi), which should be the same as a Nexus S (hdpi), etc., as they
are all the same basic screen size, within fractions of an inch.

Screen size != screen density. In fact, there is no correlation between the two.

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

_The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Android - how to handle saving file on low device memory(Internal/External memory)

2013-04-18 Thread sumit gulati
How we can handle the file saving on low device memory(internal/Excternal 
memrory). I know if sufficient space is not available the OS will throw 
IOException but is there any way to handle this gracefully. Also if the 
file size is not known before saving file then how can we handle low memory 
scenario? 

Is there any need to handle the same by checking filespace before saving 
file or catch IOException. What is best practice for some data centric 
applications?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem

2013-04-18 Thread Long Pu
We only see this issue on Boost phones on WIMAX actually. Pure Sprint
phones work fine.

The minimal required period is a crazy value like 3~5 seconds.   Hope this
info can help.
Our guess is that maybe Boost rents other company's WIMAX network, so they
would like to try their best to clean up idle connections.


Thanks.

Cheers.
Long


On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt wrote:

> Thanks Long Pu for the reasoning for not using GCM.
>
> You only have this problem on sprint wimax, correct?  Have to tried very
> frequent keep-alives?  Figuring out roughly what the required period is may
> help us find the cause.  We can talk with Sprint and Samsung about it, but
> the timeout info would be useful before that.
>
> R
>
>
> On Wed, Apr 17, 2013 at 7:28 AM, Long Pu  wrote:
>
>> We have to consider multiple platforms(iOS, Android, Blackberry). On iOS,
>> push notification
>> is not an option for our application.  If use GCM, we need  another extra
>> special design especially for android.
>>
>>
>> On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt > > wrote:
>>
>>> Could you use GCM  
>>> instead
>>> of rolling your own long-lived connection with independent keepalive?
>>>  It'll be better for the users battery and better for the carriers network
>>> and you won't have to figure out issues like these.
>>>
>>>
>>> On Sat, Apr 13, 2013 at 3:35 AM, Long  wrote:
>>>
 Hi Developers,
 I have an background service which connects my server with a TCP
 connection.
 My background service sends a ping packet to my server every
 4minutes to keep the socket alive.
The problem is that the device can not get the packet from the
 server after a short time(3 seconds from my test) after the ping is sent.
This app works fine on other networks(AT&T, verizon).

The strange thing is that if I force the device to connect to
 3G(EVDO revision A), it works fine.

It seems to me that, on Sprint 4G network, when an app sends a
 packet through a tcp socket, and then the socket is idle for
 several seconds, then the app will never be able to receive packets
 from this socket.

I don't think it's related to the 4G signal, since this issue can be
 reproduced every time.

Any suggestions?







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

 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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 a topic in the
>>> Google Groups "Android Developers" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> android-developers+unsubscr...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Things don' happen. Things are made to happen.
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to android-developers+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this gro

Re: [android-developers] Re: Handler Post sequence

2013-04-18 Thread Piren
post() maintains order, just not timing. They'll be handled in the order 
you posted, you just don't know when.

On Thursday, April 18, 2013 11:54:35 AM UTC+3, Filipe wrote:
>
> "If you mean 'android.os.Handler' there is no such method 'Post()'. Did 
> you mean 'post()' or a different type?"
> -I mean post().
>  
> I did not copy the code, I typed it to try to explain my problem, sory for 
> any errors on that.
>  
> I will try to ask the question in a different way:
>  
> I have a worker thread that needs to post several peaces of code to the UI 
> thread.
> So I am using android.os.Handler post() method.
>  
> *How can I ensure that code I "post" to the UI is executed in the same 
> sequence I "post" it*?
>  
> Notes:
> -That code needs to run in the UI thread.
> -Can't use postAtFrontOfQueue() because the worker thread is posting some 
> code has work is getting done, so I can't reverse the call sequence to use 
> this function. Ideal would be something like "postAtEndOfQueue".
>  
> Thanks
>
>  
>  
>
>
> On Thu, Apr 18, 2013 at 12:00 AM, Lew >wrote:
>
>>
>>
>> On Wednesday, April 17, 2013 11:33:21 AM UTC-7, Filipe wrote:
>>>
>>> Hi,
>>>  
>>> Does Handler.Post() respects the "Post" sequence?
>>>
>>
>> If you mean 'android.os.Handler' there is no such method 'Post()'. Did 
>> you mean 'post()' or a different type?
>>
>> A simplifyed version of what I am doing in my Activity is:
>>>  
>>> public void onCreate(Bundle savedInstanceState)
>>> {
>>>  super.onCreate(**savedInstanceState);
>>>  setContentView(new AbsoluteLayout());
>>>  new Handler().Post(new Runnable() {
>>>
>>
>> This should fail to compile if you are using 'android.os.Handler'.
>>  
>>
>>> public void run() {
>>>  CheckView();
>>> }
>>> });
>>> }
>>> private void CheckView()
>>>
>>
>> You should follow the Java naming conventions, by which this method will 
>> be called 'checkView()'.
>>  
>>
>>> {
>>>  int myHeight=getWindow().**findViewById(Window.ID_**
>>> ANDROID_CONTENT).getHeight() ;
>>> }
>>>  
>>> Sometimes in myHeight I get the correct values, and sometimes I don't?
>>>  
>>> If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways 
>>> works, so the problem seems to be that when I use Post() the CheckView() 
>>> code is executed before the setContentView.
>>>  
>>> So how can I guarantee to Post code to be executed at the end of all 
>>> graphic processing has been done, without PostDelayed() ?
>>>  
>>>
>>
>> Start by using the correct method name.
>>
>> -- 
>> Lew
>>  
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/BepSPNyU2Us/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
thank you bob

that's helping me a lot :)

let's code \m/

big up


2013/4/17 bob 

> If you don't use *save*() and *restore*() and something gets drawn after
> your needle, it will also be rotated just as the needle was rotated.
>
>
> So you would probably use something like this:
>
>
> *canvas.save();*
>
>
> canvas.rotate(45, 100, 100);
>
> canvas.drawBitmap(…);
>
>
> *canvas.restore();*
>
>
> Thanks.
>
>
>
>
> On Wednesday, April 17, 2013 12:08:12 PM UTC-5, psyco wrote:
>
>> thank you BOB that helps me a lot :)
>> i used draw method to draw the needle (initial position) then i used
>> rotate like you said to rotate it
>> and it works correctly
>> did i need to use save and restore methods?
>>
>>
>> 2013/4/17 bob 
>>
>>> Break the needle off of that image and put it in it's own image.
>>>
>>> Then use this function in *Canvas*:
>>>
>>> final void *rotate*(float degrees, float px, float py)
>>>
>>> Also, you will call *drawBitmap* in the Canvas class.
>>>
>>> Of course, you will want to *save()* and *restore()* the matrices
>>> before and after the rotation.
>>>
>>> Thanks.
>>>
>>>
>>> On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote:

 hi all,



 am
 trying to build a custom view witch displays a gauge, what i did is :
 1-designed the gauge with photoshop
 2-created the cutom View and it's .XML file
 3-set the bakcground gauge
 So, i need to know how to display a needle and how rotating it
 some help will be very grateful

  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Android Developers" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/android-developers/**CTlRkqPuBVI/unsubscribe?hl=en
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> android-developers+**unsubscr...@googlegroups.com.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> Abdallah Mohamed Amine
>> Élève ingénieur en informatique de la FST
>> Responsable d'un club embarqué microdesign
>> Tél : +216 27 105 393
>>  
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Handler Post sequence

2013-04-18 Thread Filipe Madureira
"If you mean 'android.os.Handler' there is no such method 'Post()'. Did you
mean 'post()' or a different type?"
-I mean post().

I did not copy the code, I typed it to try to explain my problem, sory for
any errors on that.

I will try to ask the question in a different way:

I have a worker thread that needs to post several peaces of code to the UI
thread.
So I am using android.os.Handler post() method.

*How can I ensure that code I "post" to the UI is executed in the same
sequence I "post" it*?

Notes:
-That code needs to run in the UI thread.
-Can't use postAtFrontOfQueue() because the worker thread is posting some
code has work is getting done, so I can't reverse the call sequence to use
this function. Ideal would be something like "postAtEndOfQueue".

Thanks





On Thu, Apr 18, 2013 at 12:00 AM, Lew  wrote:

>
>
> On Wednesday, April 17, 2013 11:33:21 AM UTC-7, Filipe wrote:
>>
>> Hi,
>>
>> Does Handler.Post() respects the "Post" sequence?
>>
>
> If you mean 'android.os.Handler' there is no such method 'Post()'. Did you
> mean 'post()' or a different type?
>
> A simplifyed version of what I am doing in my Activity is:
>>
>> public void onCreate(Bundle savedInstanceState)
>> {
>>  super.onCreate(**savedInstanceState);
>>  setContentView(new AbsoluteLayout());
>>  new Handler().Post(new Runnable() {
>>
>
> This should fail to compile if you are using 'android.os.Handler'.
>
>
>> public void run() {
>>  CheckView();
>> }
>> });
>> }
>> private void CheckView()
>>
>
> You should follow the Java naming conventions, by which this method will
> be called 'checkView()'.
>
>
>> {
>>  int myHeight=getWindow().**findViewById(Window.ID_**
>> ANDROID_CONTENT).getHeight() ;
>> }
>>
>> Sometimes in myHeight I get the correct values, and sometimes I don't?
>>
>> If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways
>> works, so the problem seems to be that when I use Post() the CheckView()
>> code is executed before the setContentView.
>>
>> So how can I guarantee to Post code to be executed at the end of all
>> graphic processing has been done, without PostDelayed() ?
>>
>>
>
> Start by using the correct method name.
>
> --
> Lew
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/BepSPNyU2Us/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Compatibility mode issues on 4.x

2013-04-18 Thread user123
Thanks, Mark. I should have done a better research.

So this leads to a quite stupid situation. I did the work to optimize 
layout for xhdpi devices, like the Galaxy Nexus, and it looks quite well. 
If I set the compatibility mode to 320dp, this willl be lost on all these 
devices. Samsung Galaxy s3/4, HTC One, etc, have screen sizes which will 
make my app go in compatibility mode!

For me this is a bug, specially because the larger the screen, the more 
sense it makes to have the option available to use compatibility mode. And 
precisely then it's not possible.



Am Mittwoch, 17. April 2013 22:36:47 UTC+2 schrieb Mark Murphy (a Commons 
Guy):
>
> If you read the documentation: 
>
>
> http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth
>  
>
> it says: 
>
> "Note: Currently, screen compatibility mode emulates only handset 
> screens with a 320dp width, so screen compatibility mode is not 
> applied if your value for android:largestWidthLimitDp is larger than 
> 320." 
>
>
> On Wed, Apr 17, 2013 at 4:26 PM, user123 > 
> wrote: 
> > Ok, the issue is confirmed. I created a brand new project with a blank 
> > activity, and ran it on a tablet. 
> > 
> > The only modification I did was in the manifest, as follows: 
> > 
> >  
> >  
> > 
> > 
> > Then the app goes in compatibility mode - "Hello world!" is zoomed. 
> Fine. 
> > 
> > But if I change to 321 dp - It doesn't go into compatibility mode. 
> > 
> > 
> > I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet 
> > emulator. 
> > 
> > Is this a bug? 
> > 
> > 
> > 
> > Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123: 
> >> 
> >> I'm trying to force compatibility mode on tablets, for a certain app, 
> >> because I don't work on it anymore - and currently it looks really 
> really 
> >> messed up on tablets. 
> >> 
> >> According to the documentation: 
> >> http://developer.android.com/guide/practices/screen-compat-mode.html 
> >> 
> >> There are many different options to set up in the manifest, to make it 
> >> possible, to the user, to enable compatibility mode. This is not 
> exactly 
> >> what I want, but anyways, maybe worth to mention, these options didn't 
> work. 
> >> I couldn't find anything on the device to switch to compatibility mode. 
> I 
> >> used a Nexus 7 with 4.2. 
> >> 
> >> Now there's the part which I need - and I also can't get it to work. To 
> >> force compatibility mode, it I have to use this element: 
> >> 
> >>  
> >> 
> >> When I let the value 320 there, my Galaxy Nexus smartphone goes in 
> >> compatibility mode. That is unwanted. 
> >> The Nexus 7 also does, this is good. 
> >> So I have to use bigger dp - But starting at 321, for some reason I 
> don't 
> >> understand, the Nexus 7 doesn't go anymore in compatibility mode. 
> >> 
> >> Is this normal? According to what I read the dp of the shortest side of 
> >> the Nexus 7 is more than 500, why then it stops on 321? 
> >> 
> >> I would let it on 320, but I have optimized layouts for this screen 
> size 
> >> and don't want these to go in compatibility mode. 
> >> 
> >> Thanks. 
> >> 
> >> 
> >> 
> >> 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to 
> > android-d...@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Android Developers" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to android-developers+unsubscr...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.7 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Which is more suitable for uploading large files? a service on separate process or ...

2013-04-18 Thread AndroidCompile
Hi,
When an application needs to upload many large files, which would be a 
better solution:
1) Doing this on a separate process (i.e. remote service)?
2) Using a separate thread (or AsyncTask)?

Is there a clear and definite answer to this?

The application, by the way, is uploading things all the time - usually 
very small chunks of data. 
Every now and then it needs to send large files, so I want to do that with 
a separate mechanism then the one I am using.
(BTW for the small chunks I am using a single task thread which works great)

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.