[android-developers] showing more than three PagerTabStrip in ViewPager at a time

2013-04-15 Thread Ansh
am using a ViewPager in which I am able to have 3 PagerTabStrip. But I want 
to have more than 3, maybe 4 or 5. I tried using setTextSpacing() but that 
didn't work. There is no direct option also to have some a some amount of 
PaperTitleStrip.

Any Suggestions how can we implement the same.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Hi use this free apps https://play.google.com/store/apps/details?id=com.manager.folder.jay&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5tYW5hZ2VyLmZvbGRlci5qYXkiXQ..

2013-04-15 Thread Fabien R
On 05/04/2013 14:56, Jayavelu Viswanathan wrote:
>  Hi use this free apps
> https://play.google.com/store/apps/details?id=com.manager.folder.jay&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5tYW5hZ2VyLmZvbGRlci5qYXkiXQ
> ..
>
Stop spamming...
-
Fabien

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

2013-04-15 Thread William Ferguson
Fragment#isVisible is returning true even if the user has navigated to 
another Activity. However #isResumed returns false, so maybe that is the 
right target.

On Sunday, April 14, 2013 11:42:06 PM UTC+10, Harri Smått wrote:
>
> Hi, 
>
> You could try using Fragment.isVisible() to determine whether the fragment 
> is visible and can trigger a dialog. For situations where fragment is in 
> the background you could use a Toast perhaps? 
>
> -- 
> H 
>
> On Apr 14, 2013, at 4:25 PM, William Ferguson 
> > 
> wrote: 
>
> > I have a Fragment that fires an async task to connect to a remote 
> server. If it fails to connect (eg times out) then I use use a Handler to 
> display a dialog to the user. 
> > 
> > final DialogFragment newFragment = 
> AlertDialogFragment.createConnectionFailedDialog(getSupportActivity()); 
> > newFragment.show(getFragmentManager()); 
>
>

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

2013-04-15 Thread William Ferguson
Hi Piren, what is an appropriate definition of "Started" in this instance?

WIlliam

On Monday, April 15, 2013 1:17:36 AM UTC+10, Piren wrote:
>
> Check the fragment state before showing, it should be Started, if not, 
> keep a flag saying that says this dialog needs to be shown. Check for the 
> flag state during onStart/onResume and show the dialog if needed
>
> On Sunday, April 14, 2013 4:25:03 PM UTC+3, William Ferguson wrote:
>>
>> I have a Fragment that fires an async task to connect to a remote server. 
>> If it fails to connect (eg times out) then I use use a Handler to display a 
>> dialog to the user.
>>
>> final DialogFragment newFragment = 
>>> AlertDialogFragment.createConnectionFailedDialog(getSupportActivity());
>>> newFragment.show(getFragmentManager());
>>
>>
>> All good except that the async task if the user navigates away from the 
>> Activity hosting that Fragment (eg goes to Preferences) then when the time 
>> out occurs the Fragment is in a quasi shut down state and the following 
>> exception is thrown.
>>
>> 04-14 23:11:51.407: ERROR/AndroidRuntime(6267): FATAL EXCEPTION: main
>>> java.lang.IllegalStateException: Can not perform this action 
>>> after onSaveInstanceState
>>> at 
>>> android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1327)
>>> at 
>>> android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1338)
>>> at 
>>> android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
>>> at 
>>> android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
>>> at 
>>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:369)
>>> at 
>>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:350)
>>> at 
>>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:329)
>>> at 
>>> au.com.xandar.wirelesstiming.connection.ConnectionFragment.updateUserInterfaceOnClose(ConnectionFragment.java:197)
>>> at 
>>> au.com.xandar.wirelesstiming.connection.ConnectionFragment.access$200(ConnectionFragment.java:26)
>>> at 
>>> au.com.xandar.wirelesstiming.connection.ConnectionFragment$2.run(ConnectionFragment.java:96)
>>> at android.os.Handler.handleCallback(Handler.java:725)
>>> at android.os.Handler.dispatchMessage(Handler.java:92)
>>> at android.os.Looper.loop(Looper.java:137)
>>> at android.app.ActivityThread.main(ActivityThread.java:5041)
>>> at java.lang.reflect.Method.invokeNative(Native Method)
>>> at java.lang.reflect.Method.invoke(Method.java:511)
>>> at 
>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
>>> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
>>> at dalvik.system.NativeStart.main(Native Method)
>>
>>
>> What is the correct way to handle this scenario?
>>
>> Ideally I'd like to always display the dialog, but if that is not an 
>> option, then what do I use to determine whether the dialog should be 
>> displayed or not?
>>
>>
>> William 
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: showing more than three PagerTabStrip in ViewPager at a time

2013-04-15 Thread Piren
Thats because it can only display 3. if you want more, you'll have to 
create your own.
Just take the source code for the strip and extrapolate it for more than 
3,  shouldn't be that hard. (or just write your own from 
scratch,  shouldn't be that hard either)

On Monday, April 15, 2013 10:32:11 AM UTC+3, Ansh wrote:
>
> am using a ViewPager in which I am able to have 3 PagerTabStrip. But I 
> want to have more than 3, maybe 4 or 5. I tried using setTextSpacing() but 
> that didn't work. There is no direct option also to have some a some amount 
> of PaperTitleStrip.
>
> Any Suggestions how can we implement the same.
>

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

2013-04-15 Thread Douglas Drumond
No, you don't change uses-permission to uses-feature, you use both.
uses-permission is required to access bluetooth, or you'll get an error.
When you use uses-permission, it's assumed the feature is also required.
Then you use the tag uses-feature and set the attribute required to false.
So you have permission to use the feature if it's present, but you're also
stating your app can function without it.



--
Douglas Drumond
http://drumond19.com


2013/4/15 limtc 

> Thanks for the help! I have read through this twice and still very
> confused - why do we have both uses-permission and uses-feature? So I
> changed from uses-permission to uses-feature and it will work? But why?
>
> My free game has been downloaded couple of million times so I am very
> scared of causing issues for existing users.
>
> 在 2013年4月15日星期一UTC+8上午11时52分09秒,RichardC写道:
>>
>> See 
>>
>> http://developer.android.com/**guide/topics/manifest/uses-**
>> feature-element.html
>>
>>>
>>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> 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 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: showing more than three PagerTabStrip in ViewPager at a time

2013-04-15 Thread Ansh
cool ...I ll try that.
Thanks

On Monday, 15 April 2013 14:12:47 UTC+5:30, Piren wrote:
>
> Thats because it can only display 3. if you want more, you'll have to 
> create your own.
> Just take the source code for the strip and extrapolate it for more than 
> 3,  shouldn't be that hard. (or just write your own from 
> scratch,  shouldn't be that hard either)
>
> On Monday, April 15, 2013 10:32:11 AM UTC+3, Ansh wrote:
>>
>> am using a ViewPager in which I am able to have 3 PagerTabStrip. But I 
>> want to have more than 3, maybe 4 or 5. I tried using setTextSpacing() but 
>> that didn't work. There is no direct option also to have some a some amount 
>> of PaperTitleStrip.
>>
>> Any Suggestions how can we implement the same.
>>
>

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

2013-04-15 Thread Piren
After onStart has been called and before onStop. 
You can be more pedantic about the state if needed - using 
isHidden/isVisible/isResumed .. since having it as "started" 
does  guarantee that the fragment is visible.

On Monday, April 15, 2013 11:32:45 AM UTC+3, William Ferguson wrote:
>
> Hi Piren, what is an appropriate definition of "Started" in this instance?
>
> WIlliam
>
> On Monday, April 15, 2013 1:17:36 AM UTC+10, Piren wrote:
>>
>> Check the fragment state before showing, it should be Started, if not, 
>> keep a flag saying that says this dialog needs to be shown. Check for the 
>> flag state during onStart/onResume and show the dialog if needed
>>
>> On Sunday, April 14, 2013 4:25:03 PM UTC+3, William Ferguson wrote:
>>>
>>> I have a Fragment that fires an async task to connect to a remote 
>>> server. If it fails to connect (eg times out) then I use use a Handler to 
>>> display a dialog to the user.
>>>
>>> final DialogFragment newFragment = 
 AlertDialogFragment.createConnectionFailedDialog(getSupportActivity());
 newFragment.show(getFragmentManager());
>>>
>>>
>>> All good except that the async task if the user navigates away from the 
>>> Activity hosting that Fragment (eg goes to Preferences) then when the time 
>>> out occurs the Fragment is in a quasi shut down state and the following 
>>> exception is thrown.
>>>
>>> 04-14 23:11:51.407: ERROR/AndroidRuntime(6267): FATAL EXCEPTION: main
 java.lang.IllegalStateException: Can not perform this action 
 after onSaveInstanceState
 at 
 android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1327)
 at 
 android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1338)
 at 
 android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
 at 
 android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
 at 
 org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:369)
 at 
 org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:350)
 at 
 org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:329)
 at 
 au.com.xandar.wirelesstiming.connection.ConnectionFragment.updateUserInterfaceOnClose(ConnectionFragment.java:197)
 at 
 au.com.xandar.wirelesstiming.connection.ConnectionFragment.access$200(ConnectionFragment.java:26)
 at 
 au.com.xandar.wirelesstiming.connection.ConnectionFragment$2.run(ConnectionFragment.java:96)
 at android.os.Handler.handleCallback(Handler.java:725)
 at android.os.Handler.dispatchMessage(Handler.java:92)
 at android.os.Looper.loop(Looper.java:137)
 at android.app.ActivityThread.main(ActivityThread.java:5041)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:511)
 at 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
 at dalvik.system.NativeStart.main(Native Method)
>>>
>>>
>>> What is the correct way to handle this scenario?
>>>
>>> Ideally I'd like to always display the dialog, but if that is not an 
>>> option, then what do I use to determine whether the dialog should be 
>>> displayed or not?
>>>
>>>
>>> William 
>>>
>>

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

2013-04-15 Thread Piren
Errr... we need a damn edit button here. i meant: " since having it as 
"started" does **  guarantee that the fragment is visible."  :)


On Monday, April 15, 2013 11:47:22 AM UTC+3, Piren wrote:
>
> After onStart has been called and before onStop. 
> You can be more pedantic about the state if needed - using 
> isHidden/isVisible/isResumed .. since having it as "started" 
> does  guarantee that the fragment is visible.
>
> On Monday, April 15, 2013 11:32:45 AM UTC+3, William Ferguson wrote:
>>
>> Hi Piren, what is an appropriate definition of "Started" in this instance?
>>
>> WIlliam
>>
>> On Monday, April 15, 2013 1:17:36 AM UTC+10, Piren wrote:
>>>
>>> Check the fragment state before showing, it should be Started, if not, 
>>> keep a flag saying that says this dialog needs to be shown. Check for the 
>>> flag state during onStart/onResume and show the dialog if needed
>>>
>>> On Sunday, April 14, 2013 4:25:03 PM UTC+3, William Ferguson wrote:

 I have a Fragment that fires an async task to connect to a remote 
 server. If it fails to connect (eg times out) then I use use a Handler to 
 display a dialog to the user.

 final DialogFragment newFragment = 
> AlertDialogFragment.createConnectionFailedDialog(getSupportActivity());
> newFragment.show(getFragmentManager());


 All good except that the async task if the user navigates away from the 
 Activity hosting that Fragment (eg goes to Preferences) then when the time 
 out occurs the Fragment is in a quasi shut down state and the following 
 exception is thrown.

 04-14 23:11:51.407: ERROR/AndroidRuntime(6267): FATAL EXCEPTION: main
> java.lang.IllegalStateException: Can not perform this action 
> after onSaveInstanceState
> at 
> android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1327)
> at 
> android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1338)
> at 
> android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
> at 
> android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
> at 
> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:369)
> at 
> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:350)
> at 
> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:329)
> at 
> au.com.xandar.wirelesstiming.connection.ConnectionFragment.updateUserInterfaceOnClose(ConnectionFragment.java:197)
> at 
> au.com.xandar.wirelesstiming.connection.ConnectionFragment.access$200(ConnectionFragment.java:26)
> at 
> au.com.xandar.wirelesstiming.connection.ConnectionFragment$2.run(ConnectionFragment.java:96)
> at android.os.Handler.handleCallback(Handler.java:725)
> at android.os.Handler.dispatchMessage(Handler.java:92)
> at android.os.Looper.loop(Looper.java:137)
> at android.app.ActivityThread.main(ActivityThread.java:5041)
> at java.lang.reflect.Method.invokeNative(Native Method)
> at java.lang.reflect.Method.invoke(Method.java:511)
> at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
> at dalvik.system.NativeStart.main(Native Method)


 What is the correct way to handle this scenario?

 Ideally I'd like to always display the dialog, but if that is not an 
 option, then what do I use to determine whether the dialog should be 
 displayed or not?


 William 

>>>

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

2013-04-15 Thread limtc
Thanks!

So it is:







在 2013年4月15日星期一UTC+8下午4时43分27秒,Douglas Drumond写道:
>
> No, you don't change uses-permission to uses-feature, you use both. 
> uses-permission is required to access bluetooth, or you'll get an error. 
> When you use uses-permission, it's assumed the feature is also required. 
> Then you use the tag uses-feature and set the attribute required to false. 
> So you have permission to use the feature if it's present, but you're also 
> stating your app can function without 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
--- 
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: When to show a dialog from Fragment and when not to

2013-04-15 Thread William Ferguson
Hm, thanks.

It just seems strange to need to explicitly check to see if the Fragment 
isResumed prior to showing a Dialog. Before Fragments, Activity#showDialog 
would do nothing if the Activity was already torn down. So it seems kind of 
retrograde. 

I take it all instances of DialogFragment#show that occur from a delayed 
handler need to first check to make sure the Fragment is still resumed or 
potentially face the same issue. Or have I missed something?

William

On Monday, April 15, 2013 6:51:09 PM UTC+10, Piren wrote:
>
> Errr... we need a damn edit button here. i meant: " since having it as 
> "started" does **  guarantee that the fragment is visible."  :)
>
>
> On Monday, April 15, 2013 11:47:22 AM UTC+3, Piren wrote:
>>
>> After onStart has been called and before onStop. 
>> You can be more pedantic about the state if needed - using 
>> isHidden/isVisible/isResumed .. since having it as "started" 
>> does  guarantee that the fragment is visible.
>>
>> On Monday, April 15, 2013 11:32:45 AM UTC+3, William Ferguson wrote:
>>>
>>> Hi Piren, what is an appropriate definition of "Started" in this 
>>> instance?
>>>
>>> WIlliam
>>>
>>> On Monday, April 15, 2013 1:17:36 AM UTC+10, Piren wrote:

 Check the fragment state before showing, it should be Started, if not, 
 keep a flag saying that says this dialog needs to be shown. Check for the 
 flag state during onStart/onResume and show the dialog if needed

 On Sunday, April 14, 2013 4:25:03 PM UTC+3, William Ferguson wrote:
>
> I have a Fragment that fires an async task to connect to a remote 
> server. If it fails to connect (eg times out) then I use use a Handler to 
> display a dialog to the user.
>
> final DialogFragment newFragment = 
>> AlertDialogFragment.createConnectionFailedDialog(getSupportActivity());
>> newFragment.show(getFragmentManager());
>
>
> All good except that the async task if the user navigates away from 
> the Activity hosting that Fragment (eg goes to Preferences) then when the 
> time out occurs the Fragment is in a quasi shut down state and the 
> following exception is thrown.
>
> 04-14 23:11:51.407: ERROR/AndroidRuntime(6267): FATAL EXCEPTION: main
>> java.lang.IllegalStateException: Can not perform this action 
>> after onSaveInstanceState
>> at 
>> android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1327)
>> at 
>> android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1338)
>> at 
>> android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:595)
>> at 
>> android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:574)
>> at 
>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:369)
>> at 
>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:350)
>> at 
>> org.holoeverywhere.app.DialogFragment.show(DialogFragment.java:329)
>> at 
>> au.com.xandar.wirelesstiming.connection.ConnectionFragment.updateUserInterfaceOnClose(ConnectionFragment.java:197)
>> at 
>> au.com.xandar.wirelesstiming.connection.ConnectionFragment.access$200(ConnectionFragment.java:26)
>> at 
>> au.com.xandar.wirelesstiming.connection.ConnectionFragment$2.run(ConnectionFragment.java:96)
>> at android.os.Handler.handleCallback(Handler.java:725)
>> at android.os.Handler.dispatchMessage(Handler.java:92)
>> at android.os.Looper.loop(Looper.java:137)
>> at android.app.ActivityThread.main(ActivityThread.java:5041)
>> at java.lang.reflect.Method.invokeNative(Native Method)
>> at java.lang.reflect.Method.invoke(Method.java:511)
>> at 
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
>> at 
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
>> at dalvik.system.NativeStart.main(Native Method)
>
>
> What is the correct way to handle this scenario?
>
> Ideally I'd like to always display the dialog, but if that is not an 
> option, then what do I use to determine whether the dialog should be 
> displayed or not?
>
>
> William 
>


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

[android-developers] Re: exception when create new AlertDialog

2013-04-15 Thread Carlos Calvo
Thanks, works perfectly

Very thanks I spent hours working on this problem

El domingo, 14 de abril de 2013 20:50:18 UTC+2, Jonathan S escribió:
>
> on new AlertDialog.Builder(getApplication());, replaces getApplication() 
> to MainActivity.this
>
>
> On Sunday, April 14, 2013 10:55:42 AM UTC-4, Carlos Calvo wrote:
>>
>> Hello,
>>
>> I have a ProgressDialog running. Execute method ".dismiss" for destroy 
>> them.
>>
>> But when i create a new AlertDialog i take a exception because the 
>> progessdialog yet still show
>>
>> *Exception *"Unable to add window -- token null is not for an 
>> application"
>>
>> *The code:*
>>
>>if (pd.isShowing()){
>> pd.dismiss();
>> }
>>  MainActivity.this.runOnUiThread(new Runnable() {
>>
>> public void run() {
>>   
>>  AlertDialog.Builder builder = new 
>> AlertDialog.Builder(getApplication());
>> builder.setTitle("Lo sentimos por el Fallo")
>> .setMessage("Resolveremos el fallo lo antes posible")
>> .setCancelable(false)
>> .setIcon(R.drawable.ic_exception)
>> .setPositiveButton("Enviar Fallo",
>> new DialogInterface.OnClickListener() {
>> public void onClick(DialogInterface dialog, int id) {
>> //enviar por mail traza exception
>> mDamageReport.submit( new Exception() );
>> finish();
>> }
>> })
>> .setNegativeButton("Cerrar",
>> new DialogInterface.OnClickListener() {
>> public void onClick(DialogInterface dialog,
>> int id) {
>> finish();
>> }
>> });
>>
>> builder.create().show();
>>
>> }
>> });
>>
>

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

2013-04-15 Thread Google Talk
---

You've been invited by Josphat Muchiri to use Google Talk.

If you already have a Google account, login to Gmail and accept this chat
invitation:
http://mail.google.com/mail/b-ab9fb0fd8e-1fe3510e56-lOq8Cf1coFn8dE0gRgTrglXJ760

To sign up for a Google account and get started with Google Talk, you can
visit:
http://mail.google.com/mail/a-ab9fb0fd8e-1fe3510e56-lOq8Cf1coFn8dE0gRgTrglXJ760?pc=en-rf---a

Learn more at:
http://www.google.com/intl/en/landing/accounts/


Thanks,
The Google Team

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

2013-04-15 Thread nobre
Hi, is this supposed to be working after 2.3 ? I'm experiencing this 
behavior on 4.0.3 and 4.1.1 , URI permissions aren't being granted to an 
Activity that was previously running (singleTask), onNewIntent is called 
and raises SecurityException when trying to use the content resolver.

Em sábado, 30 de abril de 2011 10h49min00s UTC-3, Dianne Hackborn escreveu:
>
> Sorry, this is probably a bug in 2.3 with trying to grant a URI permission 
> to an activity instance that is already running.  I'll look in to this.  In 
> the mean-time, the only solution may be to not use singleTask for the 
> activity being launched to a preview an attachment.  This is actually the 
> preferred thing to do, since your preview activity should be running as its 
> own instance as part of the gmail task.
> On Apr 30, 2011 5:20 AM, "Akshay Goel" > 
> wrote:
> > To add, the exception occurs on this line-
> > 
> > mContext.getContentResolver().openInputStream(intent.getData());
> > 
> > where mContext is the activity context.
> > 
> > -Akshay
> > 
> > On Apr 30, 2:14 pm, Akshay Goel  wrote:
> >> Hello,
> >>
> >> I have declared the launch mode of my activity to be singleTask. If I
> >> launch my application, press the home button, go to an email client
> >> (gmail in this case) & preview an attachment using my application, I
> >> am experiencing asecurityexceptionon Android versions 2.3 & later,
> >> which says that I do not have the permissions to access gmail
> >> attachments. Theexceptiondoes not occur on prior versions & if I do
> >> not use singleTask as the launchMode.
> >>
> >> Is this a known issue?
> >>
> >> Any help will be really appreciated.
> >>
> >> Thanks,
> >> Akshay
> > 
> > -- 
> > 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 post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there good source for Themes for Android applications

2013-04-15 Thread Subodh Nijsure
Yes, I have done google  search on Android Theme collection and
haven't come across anything impressive.

Is there a good collection of web sites where one can purchase/connect
with folks who do theme design for Android?

-Subodh Nijsure

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

2013-04-15 Thread Isuru Madusanka
This is interesting. I wanted to find the same thing, but wasn't
successful. However, there are some built in themes like Holo Dark
etc.

On 4/15/13, Subodh Nijsure  wrote:
> Yes, I have done google  search on Android Theme collection and
> haven't come across anything impressive.
>
> Is there a good collection of web sites where one can purchase/connect
> with folks who do theme design for Android?
>
> -Subodh Nijsure
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 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: bitmapfun project possible bug

2013-04-15 Thread bob
 

What is the BitmapFun example?



I guess I don't have it?






Thanks.



On Sunday, April 14, 2013 5:07:23 PM UTC-5, tsioularisa wrote:
>
> i am using the bitmapfun example and the only part of the code that i have 
> changed is in the class imageGridFragment, where i have added the 
> mImageFetcher.clearCache() in the onDestroy() before the call 
> of mImageFetcher.closeCache();. The problem that i have found is that when 
> i launch the app and starting downloading the images via wifi everything is 
> ok. After that i close the app and the wifi, open the 3G and  relaunch the 
> application again. Also this time everything works fine. Most of the times 
> if i close the data network and reopen the wifi i can't donwload the 
> images. The logcat is the following when the problem occurs:
>
> 04-15 00:41:16.870: D/ImageCache(4141): Memory cache created (size = 16384)
> 04-15 00:41:16.940: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:41:16.940: D/ImageGridFragment(4141): onCreateView - numColumns 
> set to 3
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/Abs/-gnuLQfNnBA/s160-c/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZT1gOI/Abs/hqWgteyNXsg/s160-c/Another%252520Rockaway%252520Sunset.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/--L0Km39l5J8/URquXHGcdNI/Abs/3ZrSJNrSomQ/s160-c/Antelope%252520Butte.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-8HO-4vIFnlw/URquZnsFgtI/Abs/WT8jViTF7vw/s160-c/Antelope%252520Hallway.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/-WIuWgVcU3Qw/URqubRVcj4I/Abs/YvbwgGjwdIQ/s160-c/Antelope%252520Walls.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-UBmLbPELvoQ/URqucCdv0kI/Abs/IdNhr2VQoQs/s160-c/Apre%2525CC%252580s%252520la%252520Pluie.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-s-AFpvgSeew/URquc6dF-JI/Abs/Mt3xNGRUd68/s160-c/Backlit%252520Cloud.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-bvmif9a9YOQ/URquea3heHI/Abs/rcr6wyeQtAo/s160-c/Bee%252520and%252520Flower.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-n7mdm7I7FGs/URqueT_BT-I/Abs/9MYmXlmpSAo/s160-c/Bonzai%252520Rock%252520Sunset.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-4CN4X4t0M1k/URqufPozWzI/Abs/8wK41lg1KPs/s160-c/Caterpillar.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-rrFnVC8xQEg/URqufdrLBaI/Abs/s69WYy_fl1E/s160-c/Chess.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-WVpRptWH8Yw/URqugh-QmDI/Abs/E-MgBgtlUWU/s160-c/Chihuly.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-0BDXkYmckbo/URquhKFW84I/Abs/ogQtHCTk2JQ/s160-c/Closed%252520Door.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-PyggXXZRykM/URquh-kVvoI/Abs/hFtDwhtrHHQ/s160-c/Colorado%252520River%252520Sunset.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/Abs/-gnuLQfNnBA/s160-c/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZT1

[android-developers] Maximum number of emulators per system

2013-04-15 Thread Adam Allred
Hello,

It seems that the maximum number of emulators that can be run on a single 
system is 16, since there are a maximum of 16 consoles allowed according to:

http://developer.android.com/tools/devices/emulator.html#console

and I cannot for the life of me locate a way to run an emulator without a 
console.

Is there a way to run an emulator without a console that I'm just missing? 
If not, is there a way to increase this max value, or perhaps eliminate it 
altogether?

Thanks.

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

2013-04-15 Thread tsioularisa
I am sorry for didn't mention this. It is from developer android 
training. 
If you want more info please tell me!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
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] Maximum number of emulators per system

2013-04-15 Thread Kristopher Micinski
It's not really a console problem, more of a port problem..

http://stackoverflow.com/questions/9924274/maximum-number-of-devices-connected-to-an-adb-server

I've done this before.  But be aware: you really can't run more than
16 emulators unless you're on a machine with tons of processors (I had
~30 cores or so): doing more than one per core is really just a bad
idea.

Kris

On Mon, Apr 15, 2013 at 10:46 AM, Adam Allred  wrote:
> Hello,
>
> It seems that the maximum number of emulators that can be run on a single
> system is 16, since there are a maximum of 16 consoles allowed according to:
>
> http://developer.android.com/tools/devices/emulator.html#console
>
> and I cannot for the life of me locate a way to run an emulator without a
> console.
>
> Is there a way to run an emulator without a console that I'm just missing?
> If not, is there a way to increase this max value, or perhaps eliminate it
> altogether?
>
> Thanks.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To 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 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-15 Thread Robert Greenwalt
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 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-15 Thread Kostya Vasilyev
Robert,

Could you elaborate on the "issues like these" part? Are there changes in
Android that developers should be made aware?

I also have an app that uses long persistent server connection, and using
GCM is not an option either.

It seems that with Android 4.1 and 4.2, connections often go "dead" -- even
though technically connected (at the server side), data pushed by the
server stops getting through (this is verified by server logs).

Android 4.0 does not seem to suffer from these issues, at least not to the
same extent.

A Nexus 7 and a Galaxy Nexus running the same stock 4.2.2, connected to the
same server, over the same WiFi network, will experience dead connections
at different rates (confirmed by logging).

The suggestion to use GCM does not benefit everyone.

It's nice that that Android has GTalk which provides GCM, and has its own
keep-alive logic, but with it being closed source, and with apparent
changes in recent Android versions, this leaves those developers who can't
use GCM dead in the water.

It would be great if someone from Google could comment, and explain, what's
different in Android 4.1 - 4.2 with respect to long running connections,
and what sort of magic is now required to keep them alive, for those apps
that really need it.

Thanks,
-- K


2013/4/15 Robert Greenwalt 

> 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 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 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: bitmapfun project possible bug

2013-04-15 Thread bob
 

Why did you add 


*mImageFetcher.clearCache()*?


You do realize that starts a new AsyncTask, don't you?


Starting a new AsyncTask sounds like a really bad idea in onDestroy().



On Sunday, April 14, 2013 5:07:23 PM UTC-5, tsioularisa wrote:
>
> i am using the bitmapfun example and the only part of the code that i have 
> changed is in the class imageGridFragment, where i have added the 
> mImageFetcher.clearCache() in the onDestroy() before the call 
> of mImageFetcher.closeCache();. The problem that i have found is that when 
> i launch the app and starting downloading the images via wifi everything is 
> ok. After that i close the app and the wifi, open the 3G and  relaunch the 
> application again. Also this time everything works fine. Most of the times 
> if i close the data network and reopen the wifi i can't donwload the 
> images. The logcat is the following when the problem occurs:
>
> 04-15 00:41:16.870: D/ImageCache(4141): Memory cache created (size = 16384)
> 04-15 00:41:16.940: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:41:16.940: D/ImageGridFragment(4141): onCreateView - numColumns 
> set to 3
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/Abs/-gnuLQfNnBA/s160-c/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZT1gOI/Abs/hqWgteyNXsg/s160-c/Another%252520Rockaway%252520Sunset.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/--L0Km39l5J8/URquXHGcdNI/Abs/3ZrSJNrSomQ/s160-c/Antelope%252520Butte.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-8HO-4vIFnlw/URquZnsFgtI/Abs/WT8jViTF7vw/s160-c/Antelope%252520Hallway.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/-WIuWgVcU3Qw/URqubRVcj4I/Abs/YvbwgGjwdIQ/s160-c/Antelope%252520Walls.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-UBmLbPELvoQ/URqucCdv0kI/Abs/IdNhr2VQoQs/s160-c/Apre%2525CC%252580s%252520la%252520Pluie.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-s-AFpvgSeew/URquc6dF-JI/Abs/Mt3xNGRUd68/s160-c/Backlit%252520Cloud.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-bvmif9a9YOQ/URquea3heHI/Abs/rcr6wyeQtAo/s160-c/Bee%252520and%252520Flower.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-n7mdm7I7FGs/URqueT_BT-I/Abs/9MYmXlmpSAo/s160-c/Bonzai%252520Rock%252520Sunset.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-4CN4X4t0M1k/URqufPozWzI/Abs/8wK41lg1KPs/s160-c/Caterpillar.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-rrFnVC8xQEg/URqufdrLBaI/Abs/s69WYy_fl1E/s160-c/Chess.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-WVpRptWH8Yw/URqugh-QmDI/Abs/E-MgBgtlUWU/s160-c/Chihuly.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-0BDXkYmckbo/URquhKFW84I/Abs/ogQtHCTk2JQ/s160-c/Closed%252520Door.jpg
> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh3.googleusercontent.com/-PyggXXZRykM/URquh-kVvoI/Abs/hFtDwhtrHHQ/s160-c/Colorado%252520River%252520Sunset.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/Abs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/Abs/-gnuLQfNnBA/s160-c/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg
> 04-15 00:43:10.100: D/ImageWorker(4141): cancelPotentialWork - cancelled 
> work for 
> https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZ

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

2013-04-15 Thread bob
 

What port number are you using on the server?


Maybe use *port* *80* as it is more open?


Thanks.



On Saturday, April 13, 2013 5:35:13 AM UTC-5, 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.




[android-developers] Re: Maximum number of emulators per system

2013-04-15 Thread bob
 

Out of curiosity, why would you ever need to run *>*16 emulators?


Thanks.



On Monday, April 15, 2013 9:46:10 AM UTC-5, Adam wrote:
>
> Hello,
>
> It seems that the maximum number of emulators that can be run on a single 
> system is 16, since there are a maximum of 16 consoles allowed according to:
>
> http://developer.android.com/tools/devices/emulator.html#console
>
> and I cannot for the life of me locate a way to run an emulator without a 
> console.
>
> Is there a way to run an emulator without a console that I'm just missing? 
> If not, is there a way to increase this max value, or perhaps eliminate it 
> altogether?
>
> Thanks.
>

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

2013-04-15 Thread bob
I like it.

You may want to change the name though as "*Quickly Search Installed Apps*" 
is kind of long and not-so-catchy.

Thanks.



On Thursday, April 4, 2013 11:27:56 AM UTC-5, Satendra Pratap wrote:
>
> Hi All,
>
> Please install my first android Free APP : "Quickly" available in Google 
> Play 
> store at :
>
>
> https://play.google.com/store/apps/details?id=com.in.spd.quickly.activity&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5pbi5zcGQucXVpY2tseS5hY3Rpdml0eSJd
>
> Please comment and provide rating too. Thank you for your nice comments 
> and nice rating in advance :)
> You can find user review at the bottom of the page and rating at the right 
> side of App Description.
>
> Please forward it to your friends also.
>
> It will be a great help.
>
> Satendra
>

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

2013-04-15 Thread Kristopher Micinski
If you're doing large scale testing of your app across a large number
of device configurations, with hundreds of testcases, and you don't
want it to take months.

Kris

On Mon, Apr 15, 2013 at 12:04 PM, bob  wrote:
> Out of curiosity, why would you ever need to run >16 emulators?
>
>
> Thanks.
>
>
>
> On Monday, April 15, 2013 9:46:10 AM UTC-5, Adam wrote:
>>
>> Hello,
>>
>> It seems that the maximum number of emulators that can be run on a single
>> system is 16, since there are a maximum of 16 consoles allowed according to:
>>
>> http://developer.android.com/tools/devices/emulator.html#console
>>
>> and I cannot for the life of me locate a way to run an emulator without a
>> console.
>>
>> Is there a way to run an emulator without a console that I'm just missing?
>> If not, is there a way to increase this max value, or perhaps eliminate it
>> altogether?
>>
>> Thanks.
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To 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 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-15 Thread Robert Greenwalt
On Mon, Apr 15, 2013 at 8:44 AM, Kostya Vasilyev  wrote:

> Robert,
>
> Could you elaborate on the "issues like these" part? Are there changes in
> Android that developers should be made aware?
>

By "issues like these" I just meant the inevitable bugs that will crop up
when making software.  If there is a library on the platform that already
does what you need it is risky to decide to create your own redundant code.


> I also have an app that uses long persistent server connection, and using
> GCM is not an option either.
>
> Can you elaborate on why GCM is not an option for you?  We want to make
GCM useful, so if it's missing features or "is not an option" we want to
know about it..


> It seems that with Android 4.1 and 4.2, connections often go "dead" --
> even though technically connected (at the server side), data pushed by the
> server stops getting through (this is verified by server logs).
>

Is that just on WiMAX as the original poster suggested?  Do you have
bugreports and/or packet captures?


>
> Android 4.0 does not seem to suffer from these issues, at least not to the
> same extent.
>
> A Nexus 7 and a Galaxy Nexus running the same stock 4.2.2, connected to
> the same server, over the same WiFi network, will experience dead
> connections at different rates (confirmed by logging).
>

Can you share a bugreport and packet capture?  There was no intention to
kill long-lived connections in android, so if there is an issue with 4.2.*
we need to hear about it.


> The suggestion to use GCM does not benefit everyone.
>

> It's nice that that Android has GTalk which provides GCM, and has its own
> keep-alive logic, but with it being closed source, and with apparent
> changes in recent Android versions, this leaves those developers who can't
> use GCM dead in the water.
>
> It would be great if someone from Google could comment, and explain,
> what's different in Android 4.1 - 4.2 with respect to long running
> connections, and what sort of magic is now required to keep them alive, for
> those apps that really need it.
>

As I said above we did not intentionally do anything to break long-lived
connections.  We encourage GCM use as it lets us do optimizations based on
mobile network type, etc to save on signaling traffic and battery life, but
you should still be able to roll your own if you wish.

There was a bug introduced in the 4.1 timeframe on mobile-data connections
we stopped counting udp packets when determining if a mobile connection was
hung - this could cause us to reset the mobile connection even when it was
live if only udp packets were being passed.  This doesn't apply to wifi OR
to mobile with GTalk alive - only on a private mobile network where GTalk
servers are inaccessible.

>
> Thanks,
> -- K
>
>
> 2013/4/15 Robert Greenwalt 
>
>> 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 andro

Re: [android-developers] Is there good source for Themes for Android applications

2013-04-15 Thread Nathan
Have wondered about this too. 

I would like to be able to buy or commission a theme like you can buy a 
Wordpress theme. 

I have hired through ODesk, and hired one person worthwhile and another not 
so much. 
It wasn't full service in the sense you would get a finished theme, with 
all the styles and patch 9s. It was more some screen designs that you could 
make a theme from. 

I do recommend this resource. 

http://android-holo-colors.com/

Because simply finding all the attributes and styles you need to override 
could be tedious, and you could always give the files it generates to 
someone for further tweaking. 

Nathan

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

2013-04-15 Thread mixalis anastasiou
I know that i start a new asynctask but it is the only way to auto clear
the memories both lru and disk when the user exits the activity. first of
all i use this (bad) technic because i don't want to waste the user's space
with useless things for him and without let him know how much space do i
need. Second in my application the user can navigate to this activity  from
the home activity using different image resources every time, so after a
long time there will be a very big amount of things on the application's
cache folder. how can i achieve to clear the cache folder every time the
user leaves the activity without using this technic? also is this
responsible for the problem i mentioned before? i am asking this because
when i use only the wifi the problem never occurs no matter how many times
the user will relaunch the activity.
On Apr 15, 2013 6:56 PM, "bob"  wrote:

> Why did you add
>
>
> *mImageFetcher.clearCache()*?
>
>
> You do realize that starts a new AsyncTask, don't you?
>
>
> Starting a new AsyncTask sounds like a really bad idea in onDestroy().
>
>
>
> On Sunday, April 14, 2013 5:07:23 PM UTC-5, tsioularisa wrote:
>>
>> i am using the bitmapfun example and the only part of the code that i
>> have changed is in the class imageGridFragment, where i have added the
>> mImageFetcher.clearCache() in the onDestroy() before the call
>> of mImageFetcher.closeCache();**. The problem that i have found is that
>> when i launch the app and starting downloading the images via wifi
>> everything is ok. After that i close the app and the wifi, open the 3G and
>>  relaunch the application again. Also this time everything works fine. Most
>> of the times if i close the data network and reopen the wifi i can't
>> donwload the images. The logcat is the following when the problem occurs:
>>
>> 04-15 00:41:16.870: D/ImageCache(4141): Memory cache created (size =
>> 16384)
>> 04-15 00:41:16.940: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh6.googleusercontent.**com/-55osAWw3x0Q/URquUtcFr5I/**
>> Abs/rWlj1RUKrYI/s160-**c/A%252520Photographer.jpg
>> 04-15 00:41:16.940: D/ImageGridFragment(4141): onCreateView - numColumns
>> set to 3
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh6.googleusercontent.**com/-55osAWw3x0Q/URquUtcFr5I/**
>> Abs/rWlj1RUKrYI/s160-**c/A%252520Photographer.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh4.googleusercontent.**com/--dq8niRp7W4/URquVgmXvgI/**
>> Abs/-gnuLQfNnBA/s160-**c/A%252520Song%252520of%**
>> 252520Ice%252520and%**252520Fire.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh5.googleusercontent.**com/-7qZeDtRKFKc/URquWZT1gOI/**
>> Abs/hqWgteyNXsg/s160-**c/Another%252520Rockaway%**
>> 252520Sunset.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh3.googleusercontent.**com/--L0Km39l5J8/URquXHGcdNI/**
>> Abs/3ZrSJNrSomQ/s160-**c/Antelope%252520Butte.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh6.googleusercontent.**com/-8HO-4vIFnlw/URquZnsFgtI/**
>> Abs/WT8jViTF7vw/s160-**c/Antelope%252520Hallway.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh4.googleusercontent.**com/-WIuWgVcU3Qw/URqubRVcj4I/**
>> Abs/YvbwgGjwdIQ/s160-**c/Antelope%252520Walls.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh6.googleusercontent.**com/-UBmLbPELvoQ/URqucCdv0kI/**
>> Abs/IdNhr2VQoQs/s160-**c/Apre%2525CC%252580s%**
>> 252520la%252520Pluie.jpg
>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled
>> work for https://lh3.googleusercontent.**com/-s-AFpvgSeew/URquc6dF-JI/**
>> Abs/Mt3xNGRUd68/s160-**c/Backlit%252520Cloud.jpg

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

2013-04-15 Thread Kostya Vasilyev
2013/4/15 Robert Greenwalt 

>
>
>
> On Mon, Apr 15, 2013 at 8:44 AM, Kostya Vasilyev wrote:
>
>> Robert,
>>
>> Could you elaborate on the "issues like these" part? Are there changes in
>> Android that developers should be made aware?
>>
>
> By "issues like these" I just meant the inevitable bugs that will crop up
> when making software.  If there is a library on the platform that already
> does what you need it is risky to decide to create your own redundant code.
>


Yes, I understand the inevitable bugs, but GTalk / GCM work with those
bugs, perhaps becuase they do things a certain way.

I've seen GTalk's service menu, it seems it has separate keep-alive logic
for mobile vs. WiFi Why? I can't tell just by reading the Android
networking docs.


>
>
>> I also have an app that uses long persistent server connection, and using
>> GCM is not an option either.
>>
>> Can you elaborate on why GCM is not an option for you?  We want to make
> GCM useful, so if it's missing features or "is not an option" we want to
> know about it..
>

I have a little email app.

Unless someone can convince Gmail, Yahoo, GMX, AOL, Dovecot, Courier, and
all the rest switch to GCM, I'm kind of stuck with IMAP IDLE, which is a
terrible protocol, but at least it's there.


>
>
>> It seems that with Android 4.1 and 4.2, connections often go "dead" --
>> even though technically connected (at the server side), data pushed by the
>> server stops getting through (this is verified by server logs).
>>
>
> Is that just on WiMAX as the original poster suggested?
>

I don't have / use WiMax, the case I and one of my users investigated with
logging was WiFi.


> Do you have bugreports and/or packet captures?
>

I have seen server logs captured by a very helpful user, and ran my own app
with logging, on two devices with 4.2.2, connected to the same WiFi access
point, and same mail server.

The symptoms are -- I can outline them in just a few sentences.

My Android code is in a socket read (in a worker thread, of course), the
device goes to sleep, the connection stays up.

The server sends small packets of data from time to time.

When the device has been asleep for a while (5-8-10 minutes, IIRC) and the
server sends data:

- The app no longer wakes up and receives the data
- The next socket write from the server results in a socket write error (so
the first packet was not acknowledged)

In the tests I ran, the connection was alive at my home router (it has a UI
where I can see the connections).

If the device was not allowed to go to sleep, the issue did not occur.


>
>
>>
>> Android 4.0 does not seem to suffer from these issues, at least not to
>> the same extent.
>>
>> A Nexus 7 and a Galaxy Nexus running the same stock 4.2.2, connected to
>> the same server, over the same WiFi network, will experience dead
>> connections at different rates (confirmed by logging).
>>
>
> Can you share a bugreport and packet capture?  There was no intention to
> kill long-lived connections in android, so if there is an issue with 4.2.*
> we need to hear about it.
>

Don't have a packet capture, but will try to submit a bug report, since
there seems to be interest on your part. Thank you for this.

Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it tries
to go deeper than before into some sort of sleep state?

Is it possible that this power saving mode has a low-level bug, where the
WiFi radio stops responding to incoming packets?

Would this be related to this old issue? I can only guess of course:
https://code.google.com/p/android/issues/detail?id=9781


>
>
>> The suggestion to use GCM does not benefit everyone.
>>
>
>> It's nice that that Android has GTalk which provides GCM, and has its own
>> keep-alive logic, but with it being closed source, and with apparent
>> changes in recent Android versions, this leaves those developers who can't
>> use GCM dead in the water.
>>
>> It would be great if someone from Google could comment, and explain,
>> what's different in Android 4.1 - 4.2 with respect to long running
>> connections, and what sort of magic is now required to keep them alive, for
>> those apps that really need it.
>>
>
> As I said above we did not intentionally do anything to break long-lived
> connections.  We encourage GCM use as it lets us do optimizations based on
> mobile network type, etc to save on signaling traffic and battery life, but
> you should still be able to roll your own if you wish.
>

How about documenting those "optimizations, etc.", or specifically, the
special things GTalk has to do becuase it runs on Android?

GTalk/GCM seem to work well, but is closed source. I assume there some
subtle parts, which benfit from knowing what the system does (something
more than "create a socket, and call connect() to connect...").


>
>

> There was a bug introduced in the 4.1 timeframe on mobile-data connections
> we stopped counting udp packets when determining if a mobile connection was
> hung - this could cause us to res

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

2013-04-15 Thread Irfan Sheriff
On Mon, Apr 15, 2013 at 10:46 AM, Kostya Vasilyev wrote:

>
>
>
> 2013/4/15 Robert Greenwalt 
>
>>
>>
>>
>> On Mon, Apr 15, 2013 at 8:44 AM, Kostya Vasilyev wrote:
>>
>>> Robert,
>>>
>>> Could you elaborate on the "issues like these" part? Are there changes
>>> in Android that developers should be made aware?
>>>
>>
>> By "issues like these" I just meant the inevitable bugs that will crop up
>> when making software.  If there is a library on the platform that already
>> does what you need it is risky to decide to create your own redundant code.
>>
>
>
> Yes, I understand the inevitable bugs, but GTalk / GCM work with those
> bugs, perhaps becuase they do things a certain way.
>
> I've seen GTalk's service menu, it seems it has separate keep-alive logic
> for mobile vs. WiFi Why? I can't tell just by reading the Android
> networking docs.
>

I dont know what gtalk is doing, but a guess here is that wifi needs more
aggressive keep alives due to NAT time outs being low on some access points.


>
>
>>
>>
>>> I also have an app that uses long persistent server connection, and
>>> using GCM is not an option either.
>>>
>>> Can you elaborate on why GCM is not an option for you?  We want to make
>> GCM useful, so if it's missing features or "is not an option" we want to
>> know about it..
>>
>
> I have a little email app.
>
> Unless someone can convince Gmail, Yahoo, GMX, AOL, Dovecot, Courier, and
> all the rest switch to GCM, I'm kind of stuck with IMAP IDLE, which is a
> terrible protocol, but at least it's there.
>
>
>>
>>
>>> It seems that with Android 4.1 and 4.2, connections often go "dead" --
>>> even though technically connected (at the server side), data pushed by the
>>> server stops getting through (this is verified by server logs).
>>>
>>
>> Is that just on WiMAX as the original poster suggested?
>>
>
> I don't have / use WiMax, the case I and one of my users investigated with
> logging was WiFi.
>
>
>> Do you have bugreports and/or packet captures?
>>
>
> I have seen server logs captured by a very helpful user, and ran my own
> app with logging, on two devices with 4.2.2, connected to the same WiFi
> access point, and same mail server.
>
> The symptoms are -- I can outline them in just a few sentences.
>
> My Android code is in a socket read (in a worker thread, of course), the
> device goes to sleep, the connection stays up.
>
> The server sends small packets of data from time to time.
>
> When the device has been asleep for a while (5-8-10 minutes, IIRC) and the
> server sends data:
>
> - The app no longer wakes up and receives the data
> - The next socket write from the server results in a socket write error
> (so the first packet was not acknowledged)
>
> In the tests I ran, the connection was alive at my home router (it has a
> UI where I can see the connections).
>
> If the device was not allowed to go to sleep, the issue did not occur.
>
>
>>
>>
>>>
>>> Android 4.0 does not seem to suffer from these issues, at least not to
>>> the same extent.
>>>
>>> A Nexus 7 and a Galaxy Nexus running the same stock 4.2.2, connected to
>>> the same server, over the same WiFi network, will experience dead
>>> connections at different rates (confirmed by logging).
>>>
>>
>> Can you share a bugreport and packet capture?  There was no intention to
>> kill long-lived connections in android, so if there is an issue with 4.2.*
>> we need to hear about it.
>>
>
> Don't have a packet capture, but will try to submit a bug report, since
> there seems to be interest on your part. Thank you for this.
>
> Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it tries
> to go deeper than before into some sort of sleep state?
>
> Is it possible that this power saving mode has a low-level bug, where the
> WiFi radio stops responding to incoming packets?
>
> Would this be related to this old issue? I can only guess of course:
> https://code.google.com/p/android/issues/detail?id=9781
>

This bug is a bit old.

Can you clarify what  android device and access point you are using. You
could send Robert or me an email with the details and the bugreport (a
packet capture showing the problem may be even better)

I ask because different wifi drivers do their own power optimizations and I
have seen issues where these optimizations do not work well with certain
access points. We have to chase these issues with the vendors.

There should not be generic issue like this on the platform itself - it is
depended on the wifi driver.

Thanks

>
>
>>
>>
>>> The suggestion to use GCM does not benefit everyone.
>>>
>>
>>> It's nice that that Android has GTalk which provides GCM, and has its
>>> own keep-alive logic, but with it being closed source, and with apparent
>>> changes in recent Android versions, this leaves those developers who can't
>>> use GCM dead in the water.
>>>
>>> It would be great if someone from Google could comment, and explain,
>>> what's different in Android 4.1 - 4.2 with respect to long running
>>> connect

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

2013-04-15 Thread Kostya Vasilyev
2013/4/15 Irfan Sheriff 

>
>
>
> On Mon, Apr 15, 2013 at 10:46 AM, Kostya Vasilyev wrote:
>
>>
>>
>> I've seen GTalk's service menu, it seems it has separate keep-alive logic
>> for mobile vs. WiFi Why? I can't tell just by reading the Android
>> networking docs.
>>
>
> I dont know what gtalk is doing, but a guess here is that wifi needs more
> aggressive keep alives due to NAT time outs being low on some access points.
>

I could see the connections still alive in my router's UI.

Not letting the device go to sleep would make the issue go away (with no
change at the router or NAT or server).

Let me ask you this -- when WiFi goes into power saving mode, is there a
specific upper bound on the time it takes to wake back up (either triggered
by an incoming packet, or an outgoing one)?


>
>
>>
>> Don't have a packet capture, but will try to submit a bug report, since
>> there seems to be interest on your part. Thank you for this.
>>
>> Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it tries
>> to go deeper than before into some sort of sleep state?
>>
>> Is it possible that this power saving mode has a low-level bug, where the
>> WiFi radio stops responding to incoming packets?
>>
>> Would this be related to this old issue? I can only guess of course:
>> https://code.google.com/p/android/issues/detail?id=9781
>>
>
> This bug is a bit old.
>

It's the closest I could find, sorry. I vaguely recall seeing some newer
ones about the same thing.


>
> Can you clarify what  android device and access point you are using. You
> could send Robert or me an email with the details and the bugreport (a
> packet capture showing the problem may be even better)
>

I do not have a packet capture, I had server and app logs, and given that
there are no packet captures, I already explained the gist of it (saving
you having to read the logs).

My devices were (and are) a Galaxy Nexus and a Nexus 7 with 4.2.2 (or
4.2.1?, I worked on this a lot in mid-December of last year). The user's
devices included a Galaxy Nexus with 4.1.

My home router, at the time, was a Zyxel Keentic Giga, with an 80 MBit/s
PPTP connection.



>
> I ask because different wifi drivers do their own power optimizations and
> I have seen issues where these optimizations do not work well with certain
> access points. We have to chase these issues with the vendors.
>

Ok, so the bug is a bit old, but the issue remains to this day?


I can appreciate the complexity of tracking these down, and glad someone is
doing it, but...

it does not help when users have but the latest Android version with
the latest drivers with fixes (I presume).


>
> There should not be generic issue like this on the platform itself - it is
> depended on the wifi driver.
>

Looking at it from an application's point of view, it makes no difference
if it's the driver or the framework or the kernel code.

To the user it's even more simple: "does not work".

Should there be a system level setting to turn off those power
optimizations, if they're known to not be compatible with "all" (taken as a
metaphorical term) access point / router devices?

-- K

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


On Mon, Apr 15, 2013 at 10:46 AM, Kostya Vasilyev wrote:

>
>
>
> 2013/4/15 Robert Greenwalt 
>
>>
>>
>>
>> On Mon, Apr 15, 2013 at 8:44 AM, Kostya Vasilyev wrote:
>>
>>> Robert,
>>>
>>> Could you elaborate on the "issues like these" part? Are there changes
>>> in Android that developers should be made aware?
>>>
>>
>> By "issues like these" I just meant the inevitable bugs that will crop up
>> when making software.  If there is a library on the platform that already
>> does what you need it is risky to decide to create your own redundant code.
>>
>
>
> Yes, I understand the inevitable bugs, but GTalk / GCM work with those
> bugs, perhaps becuase they do things a certain way.
>
> I've seen GTalk's service menu, it seems it has separate keep-alive logic
> for mobile vs. WiFi Why? I can't tell just by reading the Android
> networking docs.
>

Most ipv4 is behind nats.  Even on the carrier side.  Each NATing agent
will have a timeout - no activity and they forget the connection state and
your connection is broken.  That timeout varies form network to network and
the timeout GTalk or GCM use have been tuned from android experience.  This
sort of tuning is another reason why relying on GCM is better than trying
to reinvent it.


>
>
>>
>>
>>> I also have an app that uses long persistent server connection, and
>>> using GCM is not an option either.
>>>
>>> Can you elaborate on why GCM is not an option for you?  We want to make
>> GCM useful, so if it's missing features or "is not an option" we want to
>> know about it..
>>
>
> I have a little email app.
>
> Unless someone can convince Gmail, Yahoo, GMX, AOL, Dovecot, Courier, and
> all the rest switch to GCM, I'm kind of stuck with IMAP IDLE, which is a
> terrible protocol, but at least it's there.
>

>

>
>>
>>
>>> It seems that with Android 4.1 and 4.2, connections often go "dead" --
>>> even though technically connected (at the server side), data pushed by the
>>> server stops getting through (this is verified by server logs).
>>>
>>
>> Is that just on WiMAX as the original poster suggested?
>>
>
> I don't have / use WiMax, the case I and one of my users investigated with
> logging was WiFi.
>
>
>> Do you have bugreports and/or packet captures?
>>
>
> I have seen server logs captured by a very helpful user, and ran my own
> app with logging, on two devices with 4.2.2, connected to the same WiFi
> access point, and same mail server.
>
> The symptoms are -- I can outline them in just a few sentences.
>
> My Android code is in a socket read (in a worker thread, of course), the
> device goes to sleep, the connection stays up.
>
> The server sends small packets of data from time to time.
>
> When the device has been asleep for a while (5-8-10 minutes, IIRC) and the
> server sends data:
>
> - The app no longer wakes up and receives the data
> - The next socket write from the server results in a socket write error
> (so the first packet was not acknowledged)
>
> In the tests I ran, the connection was alive at my home router (it has a
> UI where I can see the connections).
>
> If the device was not allowed to go to sleep, the issue did not occur.
>
>
>>
>>
>>>
>>> Android 4.0 does not seem to suffer from these issues, at least not to
>>> the same extent.
>>>
>>> A Nexus 7 and a Galaxy Nexus running the same stock 4.2.2, connected to
>>> the same server, over the same WiFi network, will experience dead
>>> connections at different rates (confirmed by logging).
>>>
>>
>> Can you share a bugreport and packet capture?  There was no intention to
>> kill long-lived connections in android, so if there is an issue with 4.2.*
>> we need to hear about it.
>>
>
> Don't have a packet capture, but will try to submit a bug report, since
> there seems to be interest on your part. Thank you for this.
>
> Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it tries
> to go deeper than before into some sort of sleep state?
>
> Is it possible that this power saving mode has a low-level bug, where the
> WiFi radio stops responding to incoming packets?
>
> Would this be related to this old issue? I can only guess of course:
> https://code.google.com/p/android/issues/detail?id=9781
>
>
>>
>>
>>> The suggestion to use GCM does not benefit everyone.
>>>
>>
>>> It's nice that that Android has GTalk which provides GCM, and has its
>>> own keep-alive logic, but with it being closed source, and with apparent
>>> changes in recent Android versions, this leaves those developers who can't
>>> use GCM dead in the water.
>>>
>>> It would be great if someone from Google could comment, and explain,
>>> what's different in Android 4.1 - 4.2 with respect to long running
>>> connections, and what sort of magic is now required to keep them alive, for
>>> those apps that really need it.
>>>
>>
>> As I said above we did not intentionally do anything to break long-lived
>> connections.  We encourage GCM use as it lets us do optimizations based on
>> mobile network type, etc to save on si

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

2013-04-15 Thread Irfan Sheriff
On Mon, Apr 15, 2013 at 11:50 AM, Kostya Vasilyev wrote:

>
>
>
> 2013/4/15 Irfan Sheriff 
>
>>
>>
>>
>> On Mon, Apr 15, 2013 at 10:46 AM, Kostya Vasilyev wrote:
>>
>>>
>>>
>>> I've seen GTalk's service menu, it seems it has separate keep-alive
>>> logic for mobile vs. WiFi Why? I can't tell just by reading the Android
>>> networking docs.
>>>
>>
>> I dont know what gtalk is doing, but a guess here is that wifi needs more
>> aggressive keep alives due to NAT time outs being low on some access points.
>>
>
> I could see the connections still alive in my router's UI.
>
> Not letting the device go to sleep would make the issue go away (with no
> change at the router or NAT or server).
>
> Let me ask you this -- when WiFi goes into power saving mode, is there a
> specific upper bound on the time it takes to wake back up (either triggered
> by an incoming packet, or an outgoing one)?
>
>
>>
>>
>>>
>>> Don't have a packet capture, but will try to submit a bug report, since
>>> there seems to be interest on your part. Thank you for this.
>>>
>>> Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it
>>> tries to go deeper than before into some sort of sleep state?
>>>
>>> Is it possible that this power saving mode has a low-level bug, where
>>> the WiFi radio stops responding to incoming packets?
>>>
>>> Would this be related to this old issue? I can only guess of course:
>>> https://code.google.com/p/android/issues/detail?id=9781
>>>
>>
>> This bug is a bit old.
>>
>
> It's the closest I could find, sorry. I vaguely recall seeing some newer
> ones about the same thing.
>
>
>>
>> Can you clarify what  android device and access point you are using. You
>> could send Robert or me an email with the details and the bugreport (a
>> packet capture showing the problem may be even better)
>>
>
> I do not have a packet capture, I had server and app logs, and given that
> there are no packet captures, I already explained the gist of it (saving
> you having to read the logs).
>
> My devices were (and are) a Galaxy Nexus and a Nexus 7 with 4.2.2 (or
> 4.2.1?, I worked on this a lot in mid-December of last year). The user's
> devices included a Galaxy Nexus with 4.1.
>
> My home router, at the time, was a Zyxel Keentic Giga, with an 80 MBit/s
> PPTP connection.
>
>
>
>>
>> I ask because different wifi drivers do their own power optimizations and
>> I have seen issues where these optimizations do not work well with certain
>> access points. We have to chase these issues with the vendors.
>>
>
> Ok, so the bug is a bit old, but the issue remains to this day?
>
>
> I can appreciate the complexity of tracking these down, and glad someone
> is doing it, but...
>
> it does not help when users have but the latest Android version with
> the latest drivers with fixes (I presume).
>

>
>>
>> There should not be generic issue like this on the platform itself - it
>> is depended on the wifi driver.
>>
>
> Looking at it from an application's point of view, it makes no difference
> if it's the driver or the framework or the kernel code.
>
> To the user it's even more simple: "does not work".
>
> Should there be a system level setting to turn off those power
> optimizations, if they're known to not be compatible with "all" (taken as a
> metaphorical term) access point / router devices?
>

There is. You could try turning off settings > wifi > advanced > wi-fi
optimization
 to see if it makes a difference.

The 
HIGH_PERFAPI
also does the same and should be used with care due to power impact.


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

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

2013-04-15 Thread Robert Greenwalt
I think he's suggesting that if app developers can't rely on wifi not
losing packets on this hardware with the AP it will see in the wild, we
should disable optimizations in general.

I think we found from our testing that the optimizations worked with a high
percentage of AP - all AP we tested against before shipping.


On Mon, Apr 15, 2013 at 12:02 PM, Irfan Sheriff  wrote:

>
>
>
> On Mon, Apr 15, 2013 at 11:50 AM, Kostya Vasilyev wrote:
>
>>
>>
>>
>> 2013/4/15 Irfan Sheriff 
>>
>>>
>>>
>>>
>>> On Mon, Apr 15, 2013 at 10:46 AM, Kostya Vasilyev wrote:
>>>


 I've seen GTalk's service menu, it seems it has separate keep-alive
 logic for mobile vs. WiFi Why? I can't tell just by reading the Android
 networking docs.

>>>
>>> I dont know what gtalk is doing, but a guess here is that wifi needs
>>> more aggressive keep alives due to NAT time outs being low on some access
>>> points.
>>>
>>
>> I could see the connections still alive in my router's UI.
>>
>> Not letting the device go to sleep would make the issue go away (with no
>> change at the router or NAT or server).
>>
>> Let me ask you this -- when WiFi goes into power saving mode, is there a
>> specific upper bound on the time it takes to wake back up (either triggered
>> by an incoming packet, or an outgoing one)?
>>
>>
>>>
>>>

 Don't have a packet capture, but will try to submit a bug report, since
 there seems to be interest on your part. Thank you for this.

 Are there any changes to WiFi power saving in 4.1 - 4.2, perhaps it
 tries to go deeper than before into some sort of sleep state?

 Is it possible that this power saving mode has a low-level bug, where
 the WiFi radio stops responding to incoming packets?

 Would this be related to this old issue? I can only guess of course:
 https://code.google.com/p/android/issues/detail?id=9781

>>>
>>> This bug is a bit old.
>>>
>>
>> It's the closest I could find, sorry. I vaguely recall seeing some newer
>> ones about the same thing.
>>
>>
>>>
>>> Can you clarify what  android device and access point you are using. You
>>> could send Robert or me an email with the details and the bugreport (a
>>> packet capture showing the problem may be even better)
>>>
>>
>> I do not have a packet capture, I had server and app logs, and given that
>> there are no packet captures, I already explained the gist of it (saving
>> you having to read the logs).
>>
>> My devices were (and are) a Galaxy Nexus and a Nexus 7 with 4.2.2 (or
>> 4.2.1?, I worked on this a lot in mid-December of last year). The user's
>> devices included a Galaxy Nexus with 4.1.
>>
>> My home router, at the time, was a Zyxel Keentic Giga, with an 80 MBit/s
>> PPTP connection.
>>
>>
>>
>>>
>>> I ask because different wifi drivers do their own power optimizations
>>> and I have seen issues where these optimizations do not work well with
>>> certain access points. We have to chase these issues with the vendors.
>>>
>>
>> Ok, so the bug is a bit old, but the issue remains to this day?
>>
>>
>> I can appreciate the complexity of tracking these down, and glad someone
>> is doing it, but...
>>
>> it does not help when users have but the latest Android version with
>> the latest drivers with fixes (I presume).
>>
>
>>
>>>
>>> There should not be generic issue like this on the platform itself - it
>>> is depended on the wifi driver.
>>>
>>
>> Looking at it from an application's point of view, it makes no difference
>> if it's the driver or the framework or the kernel code.
>>
>> To the user it's even more simple: "does not work".
>>
>> Should there be a system level setting to turn off those power
>> optimizations, if they're known to not be compatible with "all" (taken as a
>> metaphorical term) access point / router devices?
>>
>
> There is. You could try turning off settings > wifi > advanced > wi-fi
> optimization
>  to see if it makes a difference.
>
>  The 
> HIGH_PERFAPI
>  also does the same and should be used with care due to power impact.
>
>
>> -- K
>>
>>  --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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 Develo

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

2013-04-15 Thread Kostya Vasilyev
2013/4/15 Robert Greenwalt 

>
>
> Most ipv4 is behind nats.  Even on the carrier side.  Each NATing agent
> will have a timeout - no activity and they forget the connection state and
> your connection is broken.
>

Keeping the device from going into deep sleep helped avoid the issue. The
NATs can't possibly know that the Android device at the end of a connection
has its screen on or off.

So, I have to conclude it had to do with WiFi power saving.

Is there a specific time limit for the WiFi hardware to come out of deep
power save state?

Knowing this would let me use proper timeouts in my keepalive code. Could
you share this information?



>  That timeout varies form network to network and the timeout GTalk or GCM
> use have been tuned from android experience.  This sort of tuning is
> another reason why relying on GCM is better than trying to reinvent it.
>

IMAP / GCM? No, really, I see your point, but there are times when GCM is
not an option.

-- K

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-15 Thread Kostya Vasilyev
2013/4/15 Irfan Sheriff 

>
>
> On Mon, Apr 15, 2013 at 11:50 AM, Kostya Vasilyev wrote:
>
>>
>>
>> Should there be a system level setting to turn off those power
>> optimizations, if they're known to not be compatible with "all" (taken as a
>> metaphorical term) access point / router devices?
>>
>
> There is. You could try turning off settings > wifi > advanced > wi-fi
> optimization
>  to see if it makes a difference.
>

Thank you. I never noticed that before. Must be new in 4.2?




>
>  The 
> HIGH_PERFAPI
>  also does the same and should be used with care due to power impact.
>

Can you give an estimate how much more power this will consume?

-- K

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

2013-04-15 Thread user123
I read here 
that 
under certain conditions, (optinal) compatibility mode is available to the 
users.

But I can't find it on the device, I looked in the menu of the app, in 
app's settings, display settings, etc. Nothing with compatibility mode. 
Where is it / should it be?

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

2013-04-15 Thread Douglas Drumond
That's it.


--
Douglas Drumond
http://drumond19.com


2013/4/15 limtc 

> Thanks!
>
> So it is:
>
> 
>
> 
>
>  "false" />
>
> 在 2013年4月15日星期一UTC+8下午4时43分27秒,Douglas Drumond写道:
>
>> No, you don't change uses-permission to uses-feature, you use both.
>> uses-permission is required to access bluetooth, or you'll get an error.
>> When you use uses-permission, it's assumed the feature is also required.
>> Then you use the tag uses-feature and set the attribute required to false.
>> So you have permission to use the feature if it's present, but you're also
>> stating your app can function without 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
> ---
> 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 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: Compatibility mode issues on 4.x

2013-04-15 Thread user123
So, now I tested again with the emulator.

I started the shipped AVD for the nexus 7. 800 x 1280 tvdpi.

According to my dip calculatioon, the smallest side (800), with this 
density (~216ppi), is ~479 dp

Now, according to the documentation:




"This indicates that the maximum "smallest screen width" for which your 
application is designed is 320dp. This way, any devices with their smallest 
side being larger than this value will offer screen compatibility mode as a 
user-optional feature." 

And



"This works the same as 
android:compatibleWidthLimitDp
 except 
it force-enables screen compatibility mode and does not allow users to 
disable it."


So to *force compatibility mode*, I put in my manifest:




**



Or:



**


Doesn't work - the Nexus 7 emulator is not in compatibility mode. *Why*?





Am Sonntag, 24. März 2013 01:48:16 UTC+1 schrieb user123:
>
> Nobody uses compatibility mode? I thought it would be a superbasic 
> question, there are a lot of tablets and there are a lot of apps which 
> don't optimize for that size...
>
>
> 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-developers@googlegroups.com
To unsubscribe from this group, 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] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)

2013-04-15 Thread user123
This is strange, since the text disappears completly as soon as the view is 
rotated just a little bit. And it only happens on 4.x. I'm already using 
the camera.

But I solved it rendering the textviews to bitmaps, for now.


Am Montag, 18. März 2013 23:07:53 UTC+1 schrieb Romain Guy (Google):
>
> If you're doing a 3D rotation the problem might be due to a combination of 
> angle of rotation and size of the rotated elements. The element you are 
> rotating might end up being clipped by the camera and disappear. To work 
> around this we expose an API in Camera that lets you specify the distance 
> of the camera to the scene.
>
>
> On Mon, Mar 18, 2013 at 3:02 PM, user123 
> > wrote:
>
>> Now I also noticed that it happens only with 
>> android:hardwareAccelerated="false". When true, the text is displayed.
>>
>> But I need to set it to false, because otherwise the views don't rotate 
>> correctly... (it's a well known issue e.g. with this 
>> coverflow implementation).
>>
>>
>> Am Montag, 18. März 2013 12:52:28 UTC+1 schrieb user123:
>>>
>>> It seems to be 4.2 only. I tested in the emulator 4.0, 4.1 and 4.2 and 
>>> happened only on 4.2. 
>>>
>>> As mentioned, concerning devices, I have only 4.2, where it happens.
>>>
>>> I'm using Google maps api (the emulators have to be configured to use 
>>> this instead of "plain" 4.x), but I think it's not relevant for this.
>>>
>>>
>>>
>>>
>>> Am Montag, 18. März 2013 12:20:12 UTC+1 schrieb user123:

 I just have 2 devices, Galaxy Nexus and Nexus 7, both with 4.2. Can't 
 test on more.

 If nobody else has feedback on this, I would submit the bug anyways (?).



 Am Montag, 18. März 2013 06:56:50 UTC+1 schrieb Romain Guy (Google):
>
> Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please 
> file a bug at b.android.com.
>
>
> On Sun, Mar 17, 2013 at 4:38 PM, user123  wrote:
>
>> I'm rotating a custom view, which contains a textview, using 
>> getChildStaticTransformation:
>>
>> @Override
>> protected boolean getChildStaticTransformation(**View child, 
>> Transformation t) {
>>   t.clear();
>>   t.setTransformationType(**Transformation.TYPE_MATRIX);
>>   camera.save();
>>   final Matrix imageMatrix = t.getMatrix();
>>
>>   float transX = (textView.getWidth() / 2.0f);
>>   float transY = (textView.getHeight() / 2.0f);
>>
>>   camera.rotateY(rot);
>>   camera.getMatrix(imageMatrix);
>>   imageMatrix.preTranslate(-**transX, -transY);
>>   imageMatrix.postTranslate(**transX, transY);
>>   camera.restore();
>>   //...
>> }
>>
>> This works very well on all 2.x devices I have tested, but in 4.x 
>> devices, on angle != 0, the text dissapears. Rotation works well, but 
>> the 
>> text dissapears. It appears again if rotation is 0.
>>
>> What can I do to solve this? Thanks in advance!
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-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
>> .
>>  
>>  
>>
>
>
>
> -- 
> Romain Guy
> Android framework engineer
> roma...@android.com
>  
  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-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.
>>  
>>  
>>
>
>
>
> -- 
> Romain Guy
> Android framework engineer
> roma...@android.com 
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group,

Re: [android-developers] Re: bitmapfun project possible bug

2013-04-15 Thread bob
What exactly does your onDestroy method look like?

My guess is that it looks like this:

*@Override*
*protected void onDestroy() {*
*super.onDestroy();*
* mImageFetcher.clearCache();*
*mImageFetcher.closeCache();*
*}*

I'm pretty sure that's an error.  The last two lines will both create 
threads, which creates a race condition.

There's a race between clearing the cache and closing it.




On Monday, April 15, 2013 12:13:34 PM UTC-5, tsioularisa wrote:
>
> I know that i start a new asynctask but it is the only way to auto clear 
> the memories both lru and disk when the user exits the activity. first of 
> all i use this (bad) technic because i don't want to waste the user's space 
> with useless things for him and without let him know how much space do i 
> need. Second in my application the user can navigate to this activity  from 
> the home activity using different image resources every time, so after a 
> long time there will be a very big amount of things on the application's 
> cache folder. how can i achieve to clear the cache folder every time the 
> user leaves the activity without using this technic? also is this 
> responsible for the problem i mentioned before? i am asking this because 
> when i use only the wifi the problem never occurs no matter how many times 
> the user will relaunch the activity. 
> On Apr 15, 2013 6:56 PM, "bob" > 
> wrote:
>
>> Why did you add 
>>
>>
>> *mImageFetcher.clearCache()*?
>>
>>
>> You do realize that starts a new AsyncTask, don't you?
>>
>>
>> Starting a new AsyncTask sounds like a really bad idea in onDestroy().
>>
>>
>>
>> On Sunday, April 14, 2013 5:07:23 PM UTC-5, tsioularisa wrote:
>>>
>>> i am using the bitmapfun example and the only part of the code that i 
>>> have changed is in the class imageGridFragment, where i have added the 
>>> mImageFetcher.clearCache() in the onDestroy() before the call 
>>> of mImageFetcher.closeCache();**. The problem that i have found is that 
>>> when i launch the app and starting downloading the images via wifi 
>>> everything is ok. After that i close the app and the wifi, open the 3G and 
>>>  relaunch the application again. Also this time everything works fine. Most 
>>> of the times if i close the data network and reopen the wifi i can't 
>>> donwload the images. The logcat is the following when the problem occurs:
>>>
>>> 04-15 00:41:16.870: D/ImageCache(4141): Memory cache created (size = 
>>> 16384)
>>> 04-15 00:41:16.940: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh6.googleusercontent.**com/-55osAWw3x0Q/URquUtcFr5I/**
>>> Abs/rWlj1RUKrYI/s160-**c/A%252520Photographer.jpg
>>> 04-15 00:41:16.940: D/ImageGridFragment(4141): onCreateView - numColumns 
>>> set to 3
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh6.googleusercontent.**com/-55osAWw3x0Q/URquUtcFr5I/**
>>> Abs/rWlj1RUKrYI/s160-**c/A%252520Photographer.jpg
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh4.googleusercontent.**com/--dq8niRp7W4/URquVgmXvgI/**
>>> Abs/-gnuLQfNnBA/s160-**c/A%252520Song%252520of%**
>>> 252520Ice%252520and%**252520Fire.jpg
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh5.googleusercontent.**com/-7qZeDtRKFKc/URquWZT1gOI/**
>>> Abs/hqWgteyNXsg/s160-**c/Another%252520Rockaway%**
>>> 252520Sunset.jpg
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh3.googleusercontent.**com/--L0Km39l5J8/URquXHGcdNI/**
>>> Abs/3ZrSJNrSomQ/s160-**c/Antelope%252520Butte.jpg
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh6.googleusercontent.**com/-8HO-4vIFnlw/URquZnsFgtI/**
>>> Abs/WT8jViTF7vw/s160-**c/Antelope%252520Hallway.jpg
>>> 04-15 00:41:16.960: D/ImageWorker(4141): cancelPotentialWork - cancelled 
>>> work for https://lh4.googleusercontent.**com/-WIuWgVcU3Qw/URqubRVcj4I/**
>>> Abs/YvbwgGjwdIQ/s160-**c/Antelope%252520Walls.jpg

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

2013-04-15 Thread user123
It seems that this combination works:



**

Confirmation follows.

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-developers@googlegroups.com
To unsubscribe from this group, 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: Compatibility mode issues on 4.x

2013-04-15 Thread user123
Ah, no, I became happy too quickly. I was launching an old version of the 
app (where I used 320 dip). So the problem is still the same. No 
compatibility mode.



Am Montag, 15. April 2013 23:05:37 UTC+2 schrieb user123:
>
> It seems that this combination works:
>
> 
>
> **
>
> Confirmation follows.
>
> 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-developers@googlegroups.com
To unsubscribe from this group, 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: Compatibility mode issues on 4.x

2013-04-15 Thread bob
Let's just think about this for a minute.

320 dp is 2 inches.

Here are the specs for your Galaxy Nexus:

1280×720 px *(316 ppi)

So, we are interested in the smallest side.  That is 720.
720/316 = 2.27848101266 inches

So, it is rightly going into compatibility mode on your Galaxy phone since 
2.27848101266 inches is longer than 2 inches.

Let's see what 2.27848101266 is in dp:

2.27848101266 * 160 = 364.556962026 dp

So, if you set it to 365dp or higher, then your phone should not go into 
compatibility mode.

Thanks.


On Tuesday, March 19, 2013 11:46:49 AM UTC-5, user123 wrote:
>
> 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-developers@googlegroups.com
To unsubscribe from this group, 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: bitmapfun project possible bug

2013-04-15 Thread tsioularisa
You are right it is exactly as you wrote it! But if i don't implement it in 
this way how can i achieve to clear the cache every time the user leaves 
the activity? I think it is not good user experience to consume storage for 
things that he can't use. Also i am not sure but if the file becomes too 
large the new images won't be loaded. Also is this which produces the 
problem that i mention before? Correct me if i am wrong but as i see from 
the logcat it seems that BitmapWorkerTask is still alive in the background 
and when the activity starts and this method is being called

public static boolean cancelPotentialWork(Object data, ImageView imageView) 
{
final BitmapWorkerTask bitmapWorkerTask = 
getBitmapWorkerTask(imageView);

if (bitmapWorkerTask != null) {
final Object bitmapData = bitmapWorkerTask.data;
if (bitmapData == null || !bitmapData.equals(data)) {
bitmapWorkerTask.cancel(true);
if (BuildConfig.DEBUG) {
Log.d(TAG, "cancelPotentialWork - cancelled work for " 
+ data);
}
} else {
// The same work is already in progress.
return false;
}
}
return true;
}

the getBitampWokerTask(imageView) doesn't return null as it should. It is 
very strange why this thing doesn't happen when i use only the wifi and 
make the same steps! I can also post the logcat in the case where the 
activity works fine if this helps you!

Sorry for my English!

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

2013-04-15 Thread user123
The problem is the Nexus 7. The smallest side is 4.72 inches. But I can put 
max. 320 dp in the manifest for it to go in compatibility mode. With 321 it 
doesn't work anymore.




Am Montag, 15. April 2013 23:30:37 UTC+2 schrieb bob:
>
> Let's just think about this for a minute.
>
> 320 dp is 2 inches.
>
> Here are the specs for your Galaxy Nexus:
>
> 1280×720 px *(316 ppi)
>
> So, we are interested in the smallest side.  That is 720.
> 720/316 = 2.27848101266 inches
>
> So, it is rightly going into compatibility mode on your Galaxy phone since 
> 2.27848101266 inches is longer than 2 inches.
>
> Let's see what 2.27848101266 is in dp:
>
> 2.27848101266 * 160 = 364.556962026 dp
>
> So, if you set it to 365dp or higher, then your phone should not go into 
> compatibility mode.
>
> Thanks.
>
>
> On Tuesday, March 19, 2013 11:46:49 AM UTC-5, user123 wrote:
>>
>> 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-developers@googlegroups.com
To unsubscribe from this group, 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: Compatibility mode issues on 4.x

2013-04-15 Thread user123
Now I also tested with a tablet emulator with 10.1 diagonal. The smallest 
side should be something around 7 inches. And I still get compatibility 
mode only until max. 320 dp, like in the Nexus 7.


Am Montag, 15. April 2013 23:53:26 UTC+2 schrieb user123:
>
> The problem is the Nexus 7. The smallest side is 4.72 inches. But I can 
> put max. 320 dp in the manifest for it to go in compatibility mode. With 
> 321 it doesn't work anymore.
>
>
>
>
> Am Montag, 15. April 2013 23:30:37 UTC+2 schrieb bob:
>>
>> Let's just think about this for a minute.
>>
>> 320 dp is 2 inches.
>>
>> Here are the specs for your Galaxy Nexus:
>>
>> 1280×720 px *(316 ppi)
>>
>> So, we are interested in the smallest side.  That is 720.
>> 720/316 = 2.27848101266 inches
>>
>> So, it is rightly going into compatibility mode on your Galaxy phone 
>> since 2.27848101266 inches is longer than 2 inches.
>>
>> Let's see what 2.27848101266 is in dp:
>>
>> 2.27848101266 * 160 = 364.556962026 dp
>>
>> So, if you set it to 365dp or higher, then your phone should not go into 
>> compatibility mode.
>>
>> Thanks.
>>
>>
>> On Tuesday, March 19, 2013 11:46:49 AM UTC-5, user123 wrote:
>>>
>>> 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-developers@googlegroups.com
To unsubscribe from this group, 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: bitmapfun project possible bug

2013-04-15 Thread bob
 

Please see this concerning the *execute* method for an AsyncTask:






In particular, for certain versions of Android, your two tasks may run in 
parallel.  However, in Honeycomb onwards, they will not.


On what version of Android did you observe the problem?


Thanks.



On Monday, April 15, 2013 4:34:43 PM UTC-5, tsioularisa wrote:
>
> You are right it is exactly as you wrote it! But if i don't implement it 
> in this way how can i achieve to clear the cache every time the user leaves 
> the activity? I think it is not good user experience to consume storage for 
> things that he can't use. Also i am not sure but if the file becomes too 
> large the new images won't be loaded. Also is this which produces the 
> problem that i mention before? Correct me if i am wrong but as i see from 
> the logcat it seems that BitmapWorkerTask is still alive in the background 
> and when the activity starts and this method is being called
>
> public static boolean cancelPotentialWork(Object data, ImageView 
> imageView) {
> final BitmapWorkerTask bitmapWorkerTask = 
> getBitmapWorkerTask(imageView);
>
> if (bitmapWorkerTask != null) {
> final Object bitmapData = bitmapWorkerTask.data;
> if (bitmapData == null || !bitmapData.equals(data)) {
> bitmapWorkerTask.cancel(true);
> if (BuildConfig.DEBUG) {
> Log.d(TAG, "cancelPotentialWork - cancelled work for " 
> + data);
> }
> } else {
> // The same work is already in progress.
> return false;
> }
> }
> return true;
> }
>
> the getBitampWokerTask(imageView) doesn't return null as it should. It is 
> very strange why this thing doesn't happen when i use only the wifi and 
> make the same steps! I can also post the logcat in the case where the 
> activity works fine if this helps you!
>
> Sorry for my English!
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-15 Thread Irfan Sheriff
On Mon, Apr 15, 2013 at 12:24 PM, Kostya Vasilyev wrote:

>
>
> 2013/4/15 Irfan Sheriff 
>
>>
>>
>> On Mon, Apr 15, 2013 at 11:50 AM, Kostya Vasilyev wrote:
>>
>>>
>>>
>>> Should there be a system level setting to turn off those power
>>> optimizations, if they're known to not be compatible with "all" (taken as a
>>> metaphorical term) access point / router devices?
>>>
>>
>> There is. You could try turning off settings > wifi > advanced > wi-fi
>> optimization
>>  to see if it makes a difference.
>>
>
> Thank you. I never noticed that before. Must be new in 4.2?
>

>
>
>
>>
>>  The 
>> HIGH_PERFAPI
>>  also does the same and should be used with care due to power impact.
>>
>
> Can you give an estimate how much more power this will consume?
>

I do not have the numbers with me now, but this really depends on the
driver and the environment (amount of traffic on air)

I believe in our tests at google, the idle power went up 5 times.

>
> -- K
>
>

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

2013-04-15 Thread Ricardo Cardoso
I have a doubt as to leave the screen only in portrait and reversePortrait,
tested code, but only when the screen turns reversePortrait, I can not go
back to portrait. why?

in my MainActivity.class

@Overridepublic void onConfigurationChanged(Configuration
newConfig) {super.onConfigurationChanged(newConfig);final int rotation
= (((WindowManager) getSystemService(WINDOW_SERVICE))
.getDefaultDisplay().getOrientation());

 unlockScreenOrientation();

 if (!mScreenOrientationLocked) {
 if(rotation == Surface.ROTATION_0){
  
MainActivity.this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
 }else{
MainActivity.this.setRequestedOrientation(9);
 }
mScreenOrientationLocked = true;
 }

}


private void unlockScreenOrientation() {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
mScreenOrientationLocked = false;}

In my AndroidManifest.xml



Can anyone help me please?

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

2013-04-15 Thread Adam
So then this:

"The console port number must be an even integer between 5554 and 5584, 
inclusive.+1 must also be free and will be reserved for ADB."

from:

http://developer.android.com/tools/help/emulator.html

is just lying?

If that's so, it just seems that adb is trying to do the work for you by 
choosing some arbitrary set of "well known ports" to scan;  as long as 
you're willing to do the bookkeeping, then you can handle it yourself. And 
in that case, did you ever try to utilize a single instance of adb for more 
than 16 emulators? It seems that assuming you can specify a random port for 
the emulator console, you could start some large number of emulators and 
then forcibly tell adb where to find all of them. Just curious about that 
part. I have no problem running one adbd per 16 emulator sessions if 
necessary.

Thanks.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To 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: single device development scenario with questions

2013-04-15 Thread George Baker
rh,

In order to make a calendar app you should need to even have to worry about 
the source for the Android OS.  What you will need is the Android SDK which 
you can get at http://developer.android.com/sdk/index.html,  You'll want to 
look towards the bottom of the page under download for other platforms - 
SDK Tools only.  You will also need a copy of JAVA 1.6.

I would recommend you take a look at this Android development workflow 
explanation on the Developer.Android.Com site.  It should help explain the 
process of building an app (
http://developer.android.com/tools/workflow/index.html).  There are also 
some tutorials on the site.  They are for the Eclipse IDE however. While it 
is possible to build an Android app without an IDE it will be very very 
difficult to do.  This is especially true for the layouts of your calendar 
app and if you are new to Android development.  In short not using an IDE 
will dramatically lengthen the amount of time development takes because of 
debugging, layout, etc...  That being said it can be done.  However, I 
wouldn't recommend it.   


Finally, as for building it for your phone only the process is virtually 
identical if you build it for your device only or many.  About the only 
difference is you don't have to worry about testing it on other devices and 
won't have to upload to the Playstore.

Hope this helps,
George




On Monday, April 15, 2013 3:17:34 PM UTC-4, rh wrote:
>
> Hello, 
> I want to pose this as a scenario since the information I've looked at 
> is fragmented and ambiguous and vague.  (that's hard to do all those) 
> I've watched videos and read READMEs and docs/*, etc. I've visited 
> forums and read mail lists. So I'm not even sure what question to 
> ask and that's my reason for posing a scenario. 
>
>

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

2013-04-15 Thread Jayu Sagar
Hi,

Need help in understanding the following case,

Say I have a view '*child*' created in Application context, I add '*child*'
to a parent '*Parent A*' which is in context of Activity '*A*'.

I switch the activity to Activity '*B*' where I would want to add '*child*'
to parent '*Parent B'* which is in context of Activity '*B*'

Tried doing* 'Parent A'.removeview(child)* in onpause of '*A*'

it was of no much help.


Question, can we reuse a single view to multiple parents without recreating
the view ?


Thank you,

Regards,
Jayanand

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