[android-developers] Re: Handler Post sequence
Lew wrote: So how can I guarantee to Post code to be executed at the end of all graphic processing has been done, without PostDelayed() ? Start by using the correct method name. -- Lew docs.mono-android.net/index.aspx?link=M %3aAndroid.OS.Handler.PostDelayed(Java.Lang.IRunnable%2c+System.Int64) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Applications that relies on external datas.
that's not the point of the fragment... i meant that the fragment should handle both the logic (and data download) and the UI. then you can just plop it in any activity you want and you're set. Regarding the Application onCreate - Yeah, it will be before anything else, but you dont know how long it would take to finish. it's as pointless as doing it in the first activity. (being a UI thread makes no difference, it's the same thread as in the activities... either way you'd have to pass the work to the background). On Wednesday, April 17, 2013 7:35:45 PM UTC+3, mbaroukh wrote: If using fragment, I suppose I could make only one activity that will handle logic (and data download) that will do what AndroidApplication should and many fragment that won't have to manage more than their own state. But that did not seems clean to me. Doing it in OnCreate of the application wouldn't help much, you'd still have to program all activities to know the data is still not there.. so not much gained here. I don't understand why : when application stats, onCreate is call before anything else. I can then load sme (small) data statically (eventually ...) and I am sure I can rely on them while the application is not evicted from memory. On the application resume, if application has benn destroyed, onCreate() is called again so there seems not to be any problem here. Except the (bad) fact I'm on UIThread, of course. I'm surprised there no library to handle those activity LifeCycle but I imagine it must be something tricky. I suppose the best option would be to use the same process as http://androidannotations.org/ to generate all the boilerplate code at compile time. Anyway, thanks a lot for your answer. Mike Le mercredi 17 avril 2013 18:12:34 UTC+2, Piren a écrit : I'll reply here for both messages: Yeah it is android design, i dont like it myself but they did supply some help - Fragments... they are the middle ground between pure UI and BL... You can have a fragment that handles the whole thing and use it in both activities (i personally think that the code to handle the fragments would be the same as code to handle a progress dialog :-) ) Doing it in OnCreate of the application wouldn't help much, you'd still have to program all activities to know the data is still not there.. so not much gained here. On Wednesday, April 17, 2013 6:57:11 PM UTC+3, mbaroukh wrote: Service or not every activity must implement a logic to wait for the download to complete isn't it ? So it must have a logic for it own process and a logic for the download. That make those activities more complicated than they have to be. Is it and Android design problem that have no solution and which we have to live with or do I missed something ? Mike Le mercredi 17 avril 2013 17:41:45 UTC+2, RichardC a écrit : Use a Service to retrieve and manage the data, Bind the service from Activity A and B. If the data is available use it, if it not download it (in the service). On Wednesday, April 17, 2013 3:57:28 PM UTC+1, mbaroukh wrote: I have a problem that appear on every new developpement. I never found a clean way to handle it so I'm asking for your help. Suppose you have an app that rely on data coming from network. Every activity needs those data. So my approach actually is to handle the download by the first activity and store it so it will be widely available. No other activity will be launched before data is stored so every activity will be sure it will be always available. Suppose we have the sequence Activity A (that load data) Then Activity B that use data Then application goes to background is killed by system is wake up on B == No problem because data is stored so it will be available and all will be fine. But, suppose that before to be waked up, data is cleared. The application wake up on activity B with no data available. There will be a NPE. Of course, I can add in the OnCreate() method of application B that, if data is not available, launch activity A and finish. But I also have to handle it in onResume(), on Pause(), on Create(), onDestroy(). And I have to make it in all my application's activities that use data which is not really clean. I don't wan't that all my activities inherit from a single one. I don't want to have only one activity with lot of fragments. The best option whould have been that the Android Application object is able to handle startup and change the first intent in certain conditions. then, if we are going to run B and data is not available, lauch A instead. but sadly, this is not possible. So my question : How do you handle this kind of problem ? Thanks for any advice. Mike -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this
[android-developers] Re: How can users enable compatibility mode?
You are using a tablet right? :) Big screen support only shows the Zoom icon on large screen devices (tablets, maybe phablets as well, never seen it on a Note though) On Wednesday, April 17, 2013 11:11:39 PM UTC+3, user123 wrote: Well, then that's my question. Why the device is not showing them. I put both min and target SDK to 8. I also don't have manifest element for explicit support of large screens. So this option should appear. But I don't see it. Just the action bar, with 3 dots for my custom menu and that's it :( Am Mittwoch, 17. April 2013 09:09:20 UTC+2 schrieb Piren: You don't enable it on the device.. the device does it for you. If the app wasn't designed for a tablet and meets the conditions (like having the targetSdk below a set level and/or having not declared it is destined for big screens) then the device will show the proper compatibility options like the Zoom button or the 3 dots. On Monday, April 15, 2013 10:37:42 PM UTC+3, user123 wrote: I read here http://developer.android.com/guide/practices/screen-compat-mode.htmlthat 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.
[android-developers] Which is more suitable for uploading large files? a service on separate process or ...
Hi, When an application needs to upload many large files, which would be a better solution: 1) Doing this on a separate process (i.e. remote service)? 2) Using a separate thread (or AsyncTask)? Is there a clear and definite answer to this? The application, by the way, is uploading things all the time - usually very small chunks of data. Every now and then it needs to send large files, so I want to do that with a separate mechanism then the one I am using. (BTW for the small chunks I am using a single task thread which works great) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
Thanks, Mark. I should have done a better research. So this leads to a quite stupid situation. I did the work to optimize layout for xhdpi devices, like the Galaxy Nexus, and it looks quite well. If I set the compatibility mode to 320dp, this willl be lost on all these devices. Samsung Galaxy s3/4, HTC One, etc, have screen sizes which will make my app go in compatibility mode! For me this is a bug, specially because the larger the screen, the more sense it makes to have the option available to use compatibility mode. And precisely then it's not possible. Am Mittwoch, 17. April 2013 22:36:47 UTC+2 schrieb Mark Murphy (a Commons Guy): If you read the documentation: http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth it says: Note: Currently, screen compatibility mode emulates only handset screens with a 320dp width, so screen compatibility mode is not applied if your value for android:largestWidthLimitDp is larger than 320. On Wed, Apr 17, 2013 at 4:26 PM, user123 ivans...@gmail.com javascript: wrote: Ok, the issue is confirmed. I created a brand new project with a blank activity, and ran it on a tablet. The only modification I did was in the manifest, as follows: uses-sdk android:minSdkVersion=8 android:targetSdkVersion=8 / supports-screens android:largestWidthLimitDp=320 / Then the app goes in compatibility mode - Hello world! is zoomed. Fine. But if I change to 321 dp - It doesn't go into compatibility mode. I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet emulator. Is this a bug? Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123: I'm trying to force compatibility mode on tablets, for a certain app, because I don't work on it anymore - and currently it looks really really messed up on tablets. According to the documentation: http://developer.android.com/guide/practices/screen-compat-mode.html There are many different options to set up in the manifest, to make it possible, to the user, to enable compatibility mode. This is not exactly what I want, but anyways, maybe worth to mention, these options didn't work. I couldn't find anything on the device to switch to compatibility mode. I used a Nexus 7 with 4.2. Now there's the part which I need - and I also can't get it to work. To force compatibility mode, it I have to use this element: supports-screens android:largestWidthLimitDp=320 / When I let the value 320 there, my Galaxy Nexus smartphone goes in compatibility mode. That is unwanted. The Nexus 7 also does, this is good. So I have to use bigger dp - But starting at 321, for some reason I don't understand, the Nexus 7 doesn't go anymore in compatibility mode. Is this normal? According to what I read the dp of the shortest side of the Nexus 7 is more than 500, why then it stops on 321? I would let it on 320, but I have optimized layouts for this screen size and don't want these to go in compatibility mode. Thanks. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Handler Post sequence
If you mean 'android.os.Handler' there is no such method 'Post()'. Did you mean 'post()' or a different type? -I mean post(). I did not copy the code, I typed it to try to explain my problem, sory for any errors on that. I will try to ask the question in a different way: I have a worker thread that needs to post several peaces of code to the UI thread. So I am using android.os.Handler post() method. *How can I ensure that code I post to the UI is executed in the same sequence I post it*? Notes: -That code needs to run in the UI thread. -Can't use postAtFrontOfQueue() because the worker thread is posting some code has work is getting done, so I can't reverse the call sequence to use this function. Ideal would be something like postAtEndOfQueue. Thanks On Thu, Apr 18, 2013 at 12:00 AM, Lew lewbl...@gmail.com wrote: On Wednesday, April 17, 2013 11:33:21 AM UTC-7, Filipe wrote: Hi, Does Handler.Post() respects the Post sequence? If you mean 'android.os.Handler' there is no such method 'Post()'. Did you mean 'post()' or a different type? A simplifyed version of what I am doing in my Activity is: public void onCreate(Bundle savedInstanceState) { super.onCreate(**savedInstanceState); setContentView(new AbsoluteLayout()); new Handler().Post(new Runnable() { This should fail to compile if you are using 'android.os.Handler'. public void run() { CheckView(); } }); } private void CheckView() You should follow the Java naming conventions, by which this method will be called 'checkView()'. { int myHeight=getWindow().**findViewById(Window.ID_** ANDROID_CONTENT).getHeight() ; } Sometimes in myHeight I get the correct values, and sometimes I don't? If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways works, so the problem seems to be that when I use Post() the CheckView() code is executed before the setContentView. So how can I guarantee to Post code to be executed at the end of all graphic processing has been done, without PostDelayed() ? Start by using the correct method name. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/BepSPNyU2Us/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to create a custom gauge in android
thank you bob that's helping me a lot :) let's code \m/ big up 2013/4/17 bob b...@coolfone.comze.com If you don't use *save*() and *restore*() and something gets drawn after your needle, it will also be rotated just as the needle was rotated. So you would probably use something like this: *canvas.save();* canvas.rotate(45, 100, 100); canvas.drawBitmap(…); *canvas.restore();* Thanks. On Wednesday, April 17, 2013 12:08:12 PM UTC-5, psyco wrote: thank you BOB that helps me a lot :) i used draw method to draw the needle (initial position) then i used rotate like you said to rotate it and it works correctly did i need to use save and restore methods? 2013/4/17 bob b...@coolfone.comze.com Break the needle off of that image and put it in it's own image. Then use this function in *Canvas*: final void *rotate*(float degrees, float px, float py) Also, you will call *drawBitmap* in the Canvas class. Of course, you will want to *save()* and *restore()* the matrices before and after the rotation. Thanks. On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/** topic/android-developers/**CTlRkqPuBVI/unsubscribe?hl=enhttps://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Abdallah Mohamed Amine Élève ingénieur en informatique de la FST Responsable d'un club embarqué microdesign Tél : +216 27 105 393 http://microdesignclub.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Abdallah Mohamed Amine Élève ingénieur en informatique de la FST Responsable d'un club embarqué microdesign Tél : +216 27 105 393 http://microdesignclub.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Handler Post sequence
post() maintains order, just not timing. They'll be handled in the order you posted, you just don't know when. On Thursday, April 18, 2013 11:54:35 AM UTC+3, Filipe wrote: If you mean 'android.os.Handler' there is no such method 'Post()'. Did you mean 'post()' or a different type? -I mean post(). I did not copy the code, I typed it to try to explain my problem, sory for any errors on that. I will try to ask the question in a different way: I have a worker thread that needs to post several peaces of code to the UI thread. So I am using android.os.Handler post() method. *How can I ensure that code I post to the UI is executed in the same sequence I post it*? Notes: -That code needs to run in the UI thread. -Can't use postAtFrontOfQueue() because the worker thread is posting some code has work is getting done, so I can't reverse the call sequence to use this function. Ideal would be something like postAtEndOfQueue. Thanks On Thu, Apr 18, 2013 at 12:00 AM, Lew lewb...@gmail.com javascript:wrote: On Wednesday, April 17, 2013 11:33:21 AM UTC-7, Filipe wrote: Hi, Does Handler.Post() respects the Post sequence? If you mean 'android.os.Handler' there is no such method 'Post()'. Did you mean 'post()' or a different type? A simplifyed version of what I am doing in my Activity is: public void onCreate(Bundle savedInstanceState) { super.onCreate(**savedInstanceState); setContentView(new AbsoluteLayout()); new Handler().Post(new Runnable() { This should fail to compile if you are using 'android.os.Handler'. public void run() { CheckView(); } }); } private void CheckView() You should follow the Java naming conventions, by which this method will be called 'checkView()'. { int myHeight=getWindow().**findViewById(Window.ID_** ANDROID_CONTENT).getHeight() ; } Sometimes in myHeight I get the correct values, and sometimes I don't? If I change the Handler.Post to Handler.PostDelayed(...,1000) it allways works, so the problem seems to be that when I use Post() the CheckView() code is executed before the setContentView. So how can I guarantee to Post code to be executed at the end of all graphic processing has been done, without PostDelayed() ? Start by using the correct method name. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/BepSPNyU2Us/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:. 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
We only see this issue on Boost phones on WIMAX actually. Pure Sprint phones work fine. The minimal required period is a crazy value like 3~5 seconds. Hope this info can help. Our guess is that maybe Boost rents other company's WIMAX network, so they would like to try their best to clean up idle connections. Thanks. Cheers. Long On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt rgreenw...@google.comwrote: Thanks Long Pu for the reasoning for not using GCM. You only have this problem on sprint wimax, correct? Have to tried very frequent keep-alives? Figuring out roughly what the required period is may help us find the cause. We can talk with Sprint and Samsung about it, but the timeout info would be useful before that. R On Wed, Apr 17, 2013 at 7:28 AM, Long Pu long...@gmail.com wrote: We have to consider multiple platforms(iOS, Android, Blackberry). On iOS, push notification is not an option for our application. If use GCM, we need another extra special design especially for android. On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt rgreenw...@google.com wrote: Could you use GCM http://developer.android.com/google/gcm/index.html 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 long...@gmail.com 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(ATT, verizon). The strange thing is that if I force the device to connect to 3G(EVDO revision A), it works fine. It seems to me that, on Sprint 4G network, when an app sends a packet through a tcp socket, and then the socket is idle for several seconds, then the app will never be able to receive packets from this socket. I don't think it's related to the 4G signal, since this issue can be reproduced every time. Any suggestions? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Things don' happen. Things are made to happen. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a
[android-developers] Android - how to handle saving file on low device memory(Internal/External memory)
How we can handle the file saving on low device memory(internal/Excternal memrory). I know if sufficient space is not available the OS will throw IOException but is there any way to handle this gracefully. Also if the file size is not known before saving file then how can we handle low memory scenario? Is there any need to handle the same by checking filespace before saving file or catch IOException. What is best practice for some data centric applications? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
On Thu, Apr 18, 2013 at 3:53 AM, user123 ivanschu...@gmail.com wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Google+ How to know if application is installed by friends
Hi, I'm trying to retrieve the people in a user's circles that have installed the current application. I have used the sample application PlusSampleActivity provided in the SDK and successfully managed to get the list of all people in the user's circles. However, I'm not sure how to get if the person have installed the application or not. The documentation available seems to be very limited... What I have found is https://developer.android.com/reference/com/google/android/gms/plus/model/people/Person.html I'm using below function but this is always returning false. (I have created a user that have installed the app and I can see this when visiting this user's profile on the web using Google+) Is there some other API that should be used? Or any other limitations that I don't know about (time until it is visible?)? public abstract boolean isHasApp () If true, indicates that the person has installed the app that is making the request and has chosen to expose this install state to the caller. A value of false indicates that the install state cannot be determined (it is either not installed or the person has chosen to keep this information private). Best regards, Raz -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
Dear Friend, Just include following code in your manifest supports-screens android:largeScreens=true android:normalScreens=true android:smallScreens=true android:resizeable=true android:anyDensity=true / Thanks Regards, Krishna V. Mahadik On Thu, Apr 18, 2013 at 5:28 PM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Apr 18, 2013 at 3:53 AM, user123 ivanschu...@gmail.com wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- . \\\/// . /\ . | \\ // | . ( | (.) (.) |) --o00o--(_)--o00o- Yesterday is not ours to recover, but tomorrow is ours to win or to lose. ---ooo0--- . ( ) 0ooo .\ ( ( ) . \_) ) / .(_/ -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
Ahh... he might have did it wrong, but that's an over simplification... I wish you could use the same layouts for those devices... fact is you cant. DP and SP do an OK Job to fit each density, but not perfect. The same layout on the Galaxy Nexus and on the Nexus S look different enough to require modifications if you're pedantic enough or trying to fit a lot of views in. It gets even worse when screen sizes change... thats why they added more modifiers (like screen sizes) to allow more control. Heck, sometimes you'd want to use different layouts for the same screen sizes exactly because of the fact the sizes are the same - text that looks normal on xxhdpi looks huge on hdpi and text that looks normal on hdpi is tiny on xxhdpi. btw - not to confuse anyone, but it's kinda misleading to say there's no correlation between screen density and screen size... Google tried to make it so you could program regardless of their values (they didnt succeed) but they are correlated (density is defined by screen size after all :-P). On Thursday, April 18, 2013 2:58:26 PM UTC+3, Mark Murphy (a Commons Guy) wrote: On Thu, Apr 18, 2013 at 3:53 AM, user123 ivans...@gmail.com javascript: wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
I think the best solution is for you to not use compatibility mode. I think it was mainly a stopgap solution for when tablets first came out. People probably wouldn't buy a tablet if nothing would run on it. But tablets have been out long enough so that it doesn't make sense to only design an app for a 2 inch wide phone and then run it in compatibility mode on a tablet. Thanks. On Thursday, April 18, 2013 2:53:05 AM UTC-5, user123 wrote: Thanks, Mark. I should have done a better research. So this leads to a quite stupid situation. I did the work to optimize layout for xhdpi devices, like the Galaxy Nexus, and it looks quite well. If I set the compatibility mode to 320dp, this willl be lost on all these devices. Samsung Galaxy s3/4, HTC One, etc, have screen sizes which will make my app go in compatibility mode! For me this is a bug, specially because the larger the screen, the more sense it makes to have the option available to use compatibility mode. And precisely then it's not possible. Am Mittwoch, 17. April 2013 22:36:47 UTC+2 schrieb Mark Murphy (a Commons Guy): If you read the documentation: http://developer.android.com/guide/topics/manifest/supports-screens-element.html#largestWidth it says: Note: Currently, screen compatibility mode emulates only handset screens with a 320dp width, so screen compatibility mode is not applied if your value for android:largestWidthLimitDp is larger than 320. On Wed, Apr 17, 2013 at 4:26 PM, user123 ivans...@gmail.com wrote: Ok, the issue is confirmed. I created a brand new project with a blank activity, and ran it on a tablet. The only modification I did was in the manifest, as follows: uses-sdk android:minSdkVersion=8 android:targetSdkVersion=8 / supports-screens android:largestWidthLimitDp=320 / Then the app goes in compatibility mode - Hello world! is zoomed. Fine. But if I change to 321 dp - It doesn't go into compatibility mode. I tested with a Nexus 7 tablet, Nexus 7 emulator, and 10.1 inches tablet emulator. Is this a bug? Am Dienstag, 19. März 2013 17:46:49 UTC+1 schrieb user123: I'm trying to force compatibility mode on tablets, for a certain app, because I don't work on it anymore - and currently it looks really really messed up on tablets. According to the documentation: http://developer.android.com/guide/practices/screen-compat-mode.html There are many different options to set up in the manifest, to make it possible, to the user, to enable compatibility mode. This is not exactly what I want, but anyways, maybe worth to mention, these options didn't work. I couldn't find anything on the device to switch to compatibility mode. I used a Nexus 7 with 4.2. Now there's the part which I need - and I also can't get it to work. To force compatibility mode, it I have to use this element: supports-screens android:largestWidthLimitDp=320 / When I let the value 320 there, my Galaxy Nexus smartphone goes in compatibility mode. That is unwanted. The Nexus 7 also does, this is good. So I have to use bigger dp - But starting at 321, for some reason I don't understand, the Nexus 7 doesn't go anymore in compatibility mode. Is this normal? According to what I read the dp of the shortest side of the Nexus 7 is more than 500, why then it stops on 321? I would let it on 320, but I have optimized layouts for this screen size and don't want these to go in compatibility mode. Thanks. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because
Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem
What phone hardware? On Thu, Apr 18, 2013 at 3:27 AM, Long Pu long...@gmail.com wrote: We only see this issue on Boost phones on WIMAX actually. Pure Sprint phones work fine. The minimal required period is a crazy value like 3~5 seconds. Hope this info can help. Our guess is that maybe Boost rents other company's WIMAX network, so they would like to try their best to clean up idle connections. Thanks. Cheers. Long On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt rgreenw...@google.comwrote: Thanks Long Pu for the reasoning for not using GCM. You only have this problem on sprint wimax, correct? Have to tried very frequent keep-alives? Figuring out roughly what the required period is may help us find the cause. We can talk with Sprint and Samsung about it, but the timeout info would be useful before that. R On Wed, Apr 17, 2013 at 7:28 AM, Long Pu long...@gmail.com wrote: We have to consider multiple platforms(iOS, Android, Blackberry). On iOS, push notification is not an option for our application. If use GCM, we need another extra special design especially for android. On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt rgreenw...@google.com wrote: Could you use GCM http://developer.android.com/google/gcm/index.html 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 long...@gmail.com 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(ATT, verizon). The strange thing is that if I force the device to connect to 3G(EVDO revision A), it works fine. It seems to me that, on Sprint 4G network, when an app sends a packet through a tcp socket, and then the socket is idle for several seconds, then the app will never be able to receive packets from this socket. I don't think it's related to the 4G signal, since this issue can be reproduced every time. Any suggestions? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Things don' happen. Things are made to happen. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: how to create a custom gauge in android
I found this nice tutorial about the subject: http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ And based on that created this Speedometer: https://github.com/bilthon/Android-Speedometer Both projects are very simple, but they demonstrate quite well how to create a custom view similar to the one you apparently want. Nelson On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Which is more suitable for uploading large files? a service on separate process or ...
I would definitely dedicate a service for things that do persistent work in the background. There is no real advantage to using a separate process unless your upload needs a truckload of memory. Doug On Thursday, April 18, 2013 12:21:47 AM UTC-7, AndroidCompile wrote: Hi, When an application needs to upload many large files, which would be a better solution: 1) Doing this on a separate process (i.e. remote service)? 2) Using a separate thread (or AsyncTask)? Is there a clear and definite answer to this? The application, by the way, is uploading things all the time - usually very small chunks of data. Every now and then it needs to send large files, so I want to do that with a separate mechanism then the one I am using. (BTW for the small chunks I am using a single task thread which works great) -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] textMultiLine and textImeMultiLine
Hello, I am trying to understand the difference between the textMultiLine and textImeMultiLine options for android:inputType in an EditText. However I have not been able to understand an answer. The documentation says IME is a control enabling users to enter text but I don't understand how texMultiLine is different from textImeMultiLine. Thanks for your help, John Goche -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to create a custom gauge in android
thank you Bilthon, i build the custom view i want , i just used 3 drawable ( needle, centerwheel and a background gauge) with ondraw and rotate method I tested it with my emulator and it's working correctly thank you all for your help :D 2013/4/18 Bilthon bilt...@gmail.com I found this nice tutorial about the subject: http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ And based on that created this Speedometer: https://github.com/bilthon/Android-Speedometer Both projects are very simple, but they demonstrate quite well how to create a custom view similar to the one you apparently want. Nelson On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Abdallah Mohamed Amine Élève ingénieur en informatique de la FST Responsable d'un club embarqué microdesign Tél : +216 27 105 393 http://microdesignclub.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: how to create a custom gauge in android
For some reason, that thermometer example doesn't seem to work right: https://lh4.googleusercontent.com/-TexVCcRcNGg/UXAygbVmnAI/AYk/7-4nLHQYVPQ/s1600/therm.png Thanks. On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote: I found this nice tutorial about the subject: http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ And based on that created this Speedometer: https://github.com/bilthon/Android-Speedometer Both projects are very simple, but they demonstrate quite well how to create a custom view similar to the one you apparently want. Nelson On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] MediaController - seek bar
I have a audiobook player that saves it's position using a web service. It has a periodic timer that saves every 30 seconds which works great, but I'd like to also save immediately after the user moves the position using the seek bar. I'm using the built-in MediaController, but it doesn't seem to provide anything except for the MediaPlayerControl interface. That interface has a seekTo() method that tells the current position, but it tells it as you're dragging, so it fires off a few dozen evens as you drag it. I really don't care about any of those, just the last one. Any smart people with a tip for me here? I have a couple of ideas, I'm just not crazy about any of them... Larry -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
Well, my layout is density independent. I misused the density folders as approximation for screen size, and it worked well on smartphones The issue is that this app was never intended for tablets - but, great, in Android it's possible to exclude small screens, but not large ones. Nobody in the company was interested in using this app on large screens, so I never got the order or time to do this work. Now this app is available but the development is suspended - I'm also not working there anymore. The app looks perfect in all smartphones. But on tabled-sized screens it has mayor errors, because of some calculations I had to do programmatically, which seem to have a problem when the screen is large, and some places where I forgot nine patch buttons and things like that. There where also a lot of backgrounds with bitmap-shadow, where the content had to be adjusted with pixel-accuracy to look correct. So, yeah, if I could, I would just put this application off for tablets, because that's was what I was told to, actually. But it's not possible. But I thought Okay, I can resort to compatibility mode. But great to see, now, that this also doesn't work. So now I have to spend a weekend working for free, because my company doesn't targets the tablet market but Android thinks it's important? Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy: On Thu, Apr 18, 2013 at 3:53 AM, user123 ivans...@gmail.com javascript: wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
Well, my layout is density independent. I misused the density folders as approximation for screen size, and it worked well on smartphones The issue is that this app was never intended for tablets - but, great, in Android it's possible to exclude small screens, but not large ones. Nobody in the company was interested in using this app on large screens, so I never got the order or time to do this work. Now this app is available but the development is suspended - I'm also not working there anymore. The app looks perfect in all smartphones. But on tabled-sized screens it has mayor errors, because of some calculations I had to do programmatically, which seem to have a problem when the screen is large, and some places where I forgot nine patch buttons and things like that. There where also a lot of backgrounds with bitmap-shadow, where the content had to be adjusted very accuratedly to look correct. So, yeah, if I could, I would just put this application off for tablets, because that's was what I was told to, actually. But it's not possible. But I thought Okay, I can resort to compatibility mode. But great to see, now, that this also doesn't work. So now I have to spend a weekend working for free, because my company doesn't targets the tablet market but Android thinks it's important? Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy: On Thu, Apr 18, 2013 at 3:53 AM, user123 ivans...@gmail.com javascript: wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Compatibility mode issues on 4.x
The point is - if somebody sees my app on a tablet, like now, they will think what the ...? They'll think I have no idea. But if people sees it in compatibility mode (or even better, they can't download it), they say, okay, the app was not intended for tablets! - That's a huge difference. Am Donnerstag, 18. April 2013 22:30:18 UTC+2 schrieb user123: Well, my layout is density independent. I misused the density folders as approximation for screen size, and it worked well on smartphones The issue is that this app was never intended for tablets - but, great, in Android it's possible to exclude small screens, but not large ones. Nobody in the company was interested in using this app on large screens, so I never got the order or time to do this work. Now this app is available but the development is suspended - I'm also not working there anymore. The app looks perfect in all smartphones. But on tabled-sized screens it has mayor errors, because of some calculations I had to do programmatically, which seem to have a problem when the screen is large, and some places where I forgot nine patch buttons and things like that. There where also a lot of backgrounds with bitmap-shadow, where the content had to be adjusted very accuratedly to look correct. So, yeah, if I could, I would just put this application off for tablets, because that's was what I was told to, actually. But it's not possible. But I thought Okay, I can resort to compatibility mode. But great to see, now, that this also doesn't work. So now I have to spend a weekend working for free, because my company doesn't targets the tablet market but Android thinks it's important? Am Donnerstag, 18. April 2013 13:58:26 UTC+2 schrieb Mark Murphy: On Thu, Apr 18, 2013 at 3:53 AM, user123 ivans...@gmail.com wrote: I did the work to optimize layout for xhdpi devices Then you did it wrong. Layouts should be density-independent. The layout of an Xperia Z (xxhdpi) should be the same as a Galaxy Nexus (xhdpi), which should be the same as a Nexus S (hdpi), etc., as they are all the same basic screen size, within fractions of an inch. Screen size != screen density. In fact, there is no correlation between the two. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.7 Available! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: MediaController - seek bar
What about this in the MediaPlayer class? public void *setOnSeekCompleteListener* (MediaPlayer.OnSeekCompleteListener listener) Thanks. On Thursday, April 18, 2013 3:06:20 PM UTC-5, Larry Meadors wrote: I have a audiobook player that saves it's position using a web service. It has a periodic timer that saves every 30 seconds which works great, but I'd like to also save immediately after the user moves the position using the seek bar. I'm using the built-in MediaController, but it doesn't seem to provide anything except for the MediaPlayerControl interface. That interface has a seekTo() method that tells the current position, but it tells it as you're dragging, so it fires off a few dozen evens as you drag it. I really don't care about any of those, just the last one. Any smart people with a tip for me here? I have a couple of ideas, I'm just not crazy about any of them... Larry -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to create a custom gauge in android
am sure that the method that shows the needle is not called !! check your ondraw method 2013/4/18 bob b...@coolfone.comze.com For some reason, that thermometer example doesn't seem to work right: https://lh4.googleusercontent.com/-TexVCcRcNGg/UXAygbVmnAI/AYk/7-4nLHQYVPQ/s1600/therm.png Thanks. On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote: I found this nice tutorial about the subject: http://mindtherobot.** com/blog/272/android-custom-**ui-making-a-vintage-**thermometer/http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ And based on that created this Speedometer: https://github.** com/bilthon/Android-**Speedometerhttps://github.com/bilthon/Android-Speedometer Both projects are very simple, but they demonstrate quite well how to create a custom view similar to the one you apparently want. Nelson On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Abdallah Mohamed Amine Élève ingénieur en informatique de la FST Responsable d'un club embarqué microdesign Tél : +216 27 105 393 http://microdesignclub.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: MediaController - seek bar
I'll try that...thanks! Larry -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: how to create a custom gauge in android
Apparently, the Nexus 7 has no temperature sensor according to this method: private void attachToSensor() { SensorManager sensorManager = getSensorManager(); ListSensor sensors = sensorManager.getSensorList(Sensor.TYPE_TEMPERATURE); if (sensors.size() 0) { Sensor sensor = sensors.get(0); sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_FASTEST, handler); } else { Log.e(TAG, No temperature sensor found); } } Thanks. On Thursday, April 18, 2013 4:14:03 PM UTC-5, psyco wrote: am sure that the method that shows the needle is not called !! check your ondraw method 2013/4/18 bob b...@coolfone.comze.com javascript: For some reason, that thermometer example doesn't seem to work right: https://lh4.googleusercontent.com/-TexVCcRcNGg/UXAygbVmnAI/AYk/7-4nLHQYVPQ/s1600/therm.png Thanks. On Thursday, April 18, 2013 11:13:37 AM UTC-5, Bilthon wrote: I found this nice tutorial about the subject: http://mindtherobot.** com/blog/272/android-custom-**ui-making-a-vintage-**thermometer/http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/ And based on that created this Speedometer: https://github.** com/bilthon/Android-**Speedometerhttps://github.com/bilthon/Android-Speedometer Both projects are very simple, but they demonstrate quite well how to create a custom view similar to the one you apparently want. Nelson On Wednesday, April 17, 2013 7:04:37 AM UTC-3, psyco wrote: hi all, https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/ADU/wXMM1ppiHz4/s1600/thermometer_icon.pngam trying to build a custom view witch displays a gauge, what i did is : 1-designed the gauge with photoshop 2-created the cutom View and it's .XML file 3-set the bakcground gauge So, i need to know how to display a needle and how rotating it some help will be very grateful -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Abdallah Mohamed Amine Élève ingénieur en informatique de la FST Responsable d'un club embarqué microdesign Tél : +216 27 105 393 http://microdesignclub.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: MediaController - seek bar
Worked perfectly. Thanks. Larry -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Sprint 4G(WIMAX) tcp connection problem
It's galaxy S2. I believe the GCM works on this phone. I am wondering what GCM does to keep his socket alive. It would not seed keep alive packets in short period like several seconds, this would burn out battery very quickly. My guess is that the carrier can recognize the GCM tcp connection and only keep it alive. Cheers. Long On Fri, Apr 19, 2013 at 12:00 AM, Robert Greenwalt rgreenw...@google.comwrote: What phone hardware? On Thu, Apr 18, 2013 at 3:27 AM, Long Pu long...@gmail.com wrote: We only see this issue on Boost phones on WIMAX actually. Pure Sprint phones work fine. The minimal required period is a crazy value like 3~5 seconds. Hope this info can help. Our guess is that maybe Boost rents other company's WIMAX network, so they would like to try their best to clean up idle connections. Thanks. Cheers. Long On Thu, Apr 18, 2013 at 1:03 AM, Robert Greenwalt rgreenw...@google.comwrote: Thanks Long Pu for the reasoning for not using GCM. You only have this problem on sprint wimax, correct? Have to tried very frequent keep-alives? Figuring out roughly what the required period is may help us find the cause. We can talk with Sprint and Samsung about it, but the timeout info would be useful before that. R On Wed, Apr 17, 2013 at 7:28 AM, Long Pu long...@gmail.com wrote: We have to consider multiple platforms(iOS, Android, Blackberry). On iOS, push notification is not an option for our application. If use GCM, we need another extra special design especially for android. On Mon, Apr 15, 2013 at 11:23 PM, Robert Greenwalt rgreenw...@google.com wrote: Could you use GCM http://developer.android.com/google/gcm/index.html 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 long...@gmail.com 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(ATT, verizon). The strange thing is that if I force the device to connect to 3G(EVDO revision A), it works fine. It seems to me that, on Sprint 4G network, when an app sends a packet through a tcp socket, and then the socket is idle for several seconds, then the app will never be able to receive packets from this socket. I don't think it's related to the 4G signal, since this issue can be reproduced every time. Any suggestions? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/3FvPZp5n2K0/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Things don' happen. Things are made to happen. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to