[android-developers] Re: Auto refresh data from webserver to activity
Antonis Kanaris wrote: I use Android:onClickvoid for call from layout main activity...is ok?or wrong method? nobody will help you if you don't want to show any piece of your code, sorry i don't have a magic crystal ball... pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
i use this code for call function refreshRunable from button layout... Button android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignRight=@+id/textView1 android:layout_below=@+id/textView1 android:layout_marginTop=57dp android:onClick=refreshRunable android:text=Button Refresh automatically / -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
I have this message on editor main.java ... The value of the field ReadWebpageAsyncTask.refreshRunnable is not used -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] OOM with heap enough
Ok, as told on previous emails, I managed to reduce the heap use even more sacrificing image definition on xdpi devices. The good news is that most of the OOM crashes seems to gone, but the bad news is that NOT all of them and the worst is that this kind of crashes in particular persists. java.lang.OutOfMemoryError: (Heap Size=49187KB, Allocated=38975KB) Again, there is more heap available than the one needed by the image trying to load. But anyway there is a worse problem here: it shouldn't beign using 38Mb in no way neither... Anyway I have had only two of these in last 24 hours, both in devices with Android 4.0.4, both with rare resolutions with a density between hdpi and xdpi, and in both cases it happened after ten minutes of game play, so it may be a memory leak. The problem, again, is that it only seems to affect a few devices that I haven't to test, and I have not seen memory leaks in no other, so I think that if the incidence of this problem were just about two crashes on a thousand boots, I would just ignore it. Best regards, On 11/21/2012 03:58 PM, Mark Murphy wrote: First, you do not know necessarily what BitmapFactory.Options are being specified on the decodeResource() call, as that does not appear to be called from your code, and it could be they have strange values in there. Beyond that, last I knew, Dalvik does not have a compacting garbage collector. I haven't seen a recent statement as to whether or not that limitation has been fixed. If it is still the case, though, your issue may not so much that you are out of memory, but that there is no single contiguous block that meets your needs. On Wed, Nov 21, 2012 at 9:48 AM, Francisco Marzoa fmmar...@gmail.com mailto:fmmar...@gmail.com wrote: Look at this: 0java.lang.OutOfMemoryError: (Heap Size=48547KB, Allocated=33541KB) 1at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 2at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:595) 3at com.badlogic.androidgames.framework.impl.AndroidGraphics.newPixmap(AndroidGraphics.java:77) 4at com.badlogic.androidgames.framework.impl.AndroidGraphics.newPixmap(AndroidGraphics.java:133) 5at net.iberdroid.ruletaafortunadacore.MainMenuScreen.loadImages(MainMenuScreen.java:255) 6at net.iberdroid.ruletaafortunadacore.MainMenuScreen.enable(MainMenuScreen.java:241) The image that I am trying to load at MainMenuScreen.java:255 The weird thing is that there is free heap enough for loading that image: it is a 800x480 png indexed but with transparency, so I load it using four bytes per pixel (ARGB) and it should use about 1M5 of memory as a raw bitmap... but it crashes anyway trying to load an image ten times smaller the available heap space (48-35 = 15Mb). These things makes me crazy... Bests, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.3 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
Antonis Kanaris wrote: i use this code for call function refreshRunable from button layout... Button android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignRight=@+id/textView1 android:layout_below=@+id/textView1 android:layout_marginTop=57dp android:onClick=refreshRunable android:text=Button Refresh automatically / http://stackoverflow.com/questions/4153517/how-exactly-does-the-androidonclick-xml-attribute-differ-from-setonclicklistene pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Navigation Apps
Any app with maps built into the app? I tried Navfree, but needs to download the map after the app is installed. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
Τη Παρασκευή, 23 Νοεμβρίου 2012 10:38:57 π.μ. UTC+2, ο χρήστης skink έγραψε: Antonis Kanaris wrote: i use this code for call function refreshRunable from button layout... Button android:id=@+id/button1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignRight=@+id/textView1 android:layout_below=@+id/textView1 android:layout_marginTop=57dp android:onClick=refreshRunable android:text=Button Refresh automatically / http://stackoverflow.com/questions/4153517/how-exactly-does-the-androidonclick-xml-attribute-differ-from-setonclicklistene pskink ok need extra codebut why work for the first button onclick:readWebpage without Listener? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google Calendar API v3 with AccountManager not working for some accounts?
SOLVED: accountManager.invalidateAuthToken(account.type, null); doesn't seem to be enough. One has to provide the name of the old token instead of null. Although the documentation says that the token can be null and it will invalidate it for the whole account type. Here is what works: *try*{ calendarList = CalendarService.calendarList().list().execute(); accountManager.invalidateAuthToken(account.type, myToken); }*catch* (Exception e) { e.printStackTrace(); } On Thursday, November 22, 2012 10:30:41 AM UTC+1, Christopher Masser wrote: I'm using the AccountManager getAuthToken(..) method to retrieve a token for Google Calendar sync. While sync works in most cases, several users report the following error when trying to get the calendarList of the Google calendar API: com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized{code : 401,errors : [ {domain : global,location : Authorization,locationType : header,message : Invalid Credentials,reason : authError} ],message : Invalid Credentials} Their native Android calendar app continues to sync normally.i.e., they do have internet connection and they do have registered accounts on their device.Here is what I do: AccountManager accountManager = AccountManager.get(this);Account[] accounts = accountManager.getAccountsByType(com.google);...//for each account:...accountManager.invalidateAuthToken(account.type, null);accountManager.getAuthToken(account, oauth2:https://www.googleapis.com/auth/calendar;, true, new AccountManagerCallbackBundle(){ public void run(AccountManagerFutureBundle future) {try{ Bundle bundle = future.getResult(); if(bundle.containsKey(AccountManager.KEY_AUTHTOKEN)) { String token = bundle.getString(AccountManager.KEY_AUTHTOKEN); AfterGetToken(token); }else { if(bundle.containsKey(AccountManager.KEY_INTENT)) { Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT); intent.setFlags(intent.getFlags() ~Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivityForResult(intent, REQUEST_AUTHENTICATE); //-start all over in onActivityResult } }}catch(Exception e){ e.printStackTrace();invalidateToken(account, null); //-start again}} }, null); private void AfterGetToken(String myToken){ GoogleCredential credential = new GoogleCredential().setAccessToken(myToken); CalendarService = new com.google.api.services.calendar.Calendar.Builder(transport, new JacksonFactory(), null) .setApplicationName(MY_APP_NAME) .setHttpRequestInitializer(credential) .setJsonHttpRequestInitializer(new JsonHttpRequestInitializer() { public void initialize(JsonHttpRequest request) throws IOException { com.google.api.services.calendar.CalendarRequest calendarRequest = (CalendarRequest) request; calendarRequest.setKey(MY_API_KEY); calendarRequest.setOauthToken(credential.getAccessToken()); } }).build(); CalendarList calendarList = null; * try*{ calendarList = CalendarService.calendarList().list().execute(); }*catch* (Exception e) { e.printStackTrace(); } //do stuff with calendarList } //These are my imports: *import* android.accounts.Account; *import* android.accounts.AccountManager; *import* com.google.api.client.googleapis.auth.oauth2.GoogleCredential; *import* com.google.api.client.http.HttpTransport; *import* com.google.api.client.http.javanet.NetHttpTransport; *import* com.google.api.client.http.json.JsonHttpRequest; *import* com.google.api.client.http.json.JsonHttpRequestInitializer; *import* com.google.api.client.json.jackson.JacksonFactory; *import* com.google.api.services.calendar.CalendarRequest; *import* com.google.api.services.calendar.model.*CalendarList*; Thanks for your help! Christopher -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google Calendar API v3 with AccountManager not working for some accounts?
sorry, corrected here: *try*{ calendarList = CalendarService.calendarList().list().execute(); }*catch* (Exception e) { e.printStackTrace(); accountManager.invalidateAuthToken(account.type, myToken); //start all over } On Thursday, November 22, 2012 10:30:41 AM UTC+1, Christopher Masser wrote: I'm using the AccountManager getAuthToken(..) method to retrieve a token for Google Calendar sync. While sync works in most cases, several users report the following error when trying to get the calendarList of the Google calendar API: com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized{code : 401,errors : [ {domain : global,location : Authorization,locationType : header,message : Invalid Credentials,reason : authError} ],message : Invalid Credentials} Their native Android calendar app continues to sync normally.i.e., they do have internet connection and they do have registered accounts on their device.Here is what I do: AccountManager accountManager = AccountManager.get(this);Account[] accounts = accountManager.getAccountsByType(com.google);...//for each account:...accountManager.invalidateAuthToken(account.type, null);accountManager.getAuthToken(account, oauth2:https://www.googleapis.com/auth/calendar;, true, new AccountManagerCallbackBundle(){ public void run(AccountManagerFutureBundle future) {try{ Bundle bundle = future.getResult(); if(bundle.containsKey(AccountManager.KEY_AUTHTOKEN)) { String token = bundle.getString(AccountManager.KEY_AUTHTOKEN); AfterGetToken(token); }else { if(bundle.containsKey(AccountManager.KEY_INTENT)) { Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT); intent.setFlags(intent.getFlags() ~Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivityForResult(intent, REQUEST_AUTHENTICATE); //-start all over in onActivityResult } }}catch(Exception e){ e.printStackTrace();invalidateToken(account, null); //-start again}} }, null); private void AfterGetToken(String myToken){ GoogleCredential credential = new GoogleCredential().setAccessToken(myToken); CalendarService = new com.google.api.services.calendar.Calendar.Builder(transport, new JacksonFactory(), null) .setApplicationName(MY_APP_NAME) .setHttpRequestInitializer(credential) .setJsonHttpRequestInitializer(new JsonHttpRequestInitializer() { public void initialize(JsonHttpRequest request) throws IOException { com.google.api.services.calendar.CalendarRequest calendarRequest = (CalendarRequest) request; calendarRequest.setKey(MY_API_KEY); calendarRequest.setOauthToken(credential.getAccessToken()); } }).build(); CalendarList calendarList = null; * try*{ calendarList = CalendarService.calendarList().list().execute(); }*catch* (Exception e) { e.printStackTrace(); } //do stuff with calendarList } //These are my imports: *import* android.accounts.Account; *import* android.accounts.AccountManager; *import* com.google.api.client.googleapis.auth.oauth2.GoogleCredential; *import* com.google.api.client.http.HttpTransport; *import* com.google.api.client.http.javanet.NetHttpTransport; *import* com.google.api.client.http.json.JsonHttpRequest; *import* com.google.api.client.http.json.JsonHttpRequestInitializer; *import* com.google.api.client.json.jackson.JacksonFactory; *import* com.google.api.services.calendar.CalendarRequest; *import* com.google.api.services.calendar.model.*CalendarList*; Thanks for your help! Christopher -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
How i can use this http://stackoverflow.com/questions/5822161/refreshing-the-activity inside my code with AsyncTask for update activity? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Google Calendar API v3 with AccountManager not working for some accounts?
On Fri, Nov 23, 2012 at 5:59 PM, Christopher Masser cmas...@gmail.com wrote: SOLVED: accountManager.invalidateAuthToken(account.type, null); doesn't seem to be enough. One has to provide the name of the old token instead of null. Although the documentation says that the token can be null and it will invalidate it for the whole account type. In recent versions it will actually throw IllegalArgumentException if the token is null. All invalidate() does it find the token in the DB and delete it, so it won't match if there is no token. Cf. the actual code (from JB 4.2) if (authToken == null || accountType == null) { return; } Cursor cursor = db.rawQuery( SELECT + TABLE_AUTHTOKENS + . + AUTHTOKENS_ID + , + TABLE_ACCOUNTS + . + ACCOUNTS_NAME + , + TABLE_AUTHTOKENS + . + AUTHTOKENS_TYPE + FROM + TABLE_ACCOUNTS + JOIN + TABLE_AUTHTOKENS + ON + TABLE_ACCOUNTS + . + ACCOUNTS_ID + = + AUTHTOKENS_ACCOUNTS_ID + WHERE + AUTHTOKENS_AUTHTOKEN + = ? AND + TABLE_ACCOUNTS + . + ACCOUNTS_TYPE + = ?, new String[]{authToken, accountType}); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
As told to Mark, I do not think so: the game is just starting, loading the first Screen at all. Really? Data suggest quite the contrary: your heap is heavily fragmented, your process have allocated 48MB and released a lot (since there is 15MB), that's suggest lots of memory operations. My guess is that you are leaking memory between restarts, through some caches or other global (static) stuff. After few cycles of enter-exit OOM happens, I'd check if after exiting from game memory is correctly freed. Regards, Bart -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
Antonis Kanaris wrote: ok need extra codebut why work for the first button onclick:readWebpage without Listener? read it again: http://stackoverflow.com/questions/4153517/how-exactly-does-the-androidonclick-xml-attribute-differ-from-setonclicklistene pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2
This also seems to happen on the Nexus 7 running 4.1 / 4.2 but again, not on the emulator versions. On Thursday, November 22, 2012 9:58:52 AM UTC, Ryan Bateman wrote: I'm attempting to write a simple API management class and running into an issue when using HttpUrlConnection to POST content on a Galaxy Nexus recently upgraded to 4.2. In effect, attempting to post content fails on the first attempt with an EOFException: java.io.EOFException at libcore.io.Streams.readAsciiLine(Streams.java:203) at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:573) at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:821) at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283) at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:495) at com.murts.network.APIClient.post(APIClient.java:126) at com.murts.network.APIManager$1.doInBackground(APIManager.java:49) The second attempt to post (with the same data) will work fine, as will every alternate attempt to do so after that. The code is as follows: URL url = new URL(urlString); connection = (HttpURLConnection) url.openConnection(); connection.setUseCaches(false); connection.setDoOutput(true); connection.setRequestProperty(Content-type, application/json; charset=utf-8); connection.setFixedLengthStreamingMode(postContent.getBytes().length); output = connection.getOutputStream(); output.write(postContent.getBytes()); if (connection.getResponseCode() / 100 == 2) { Ln.d(Seemed to work: + connection.getResponseCode()); return new NetworkResponse(NetworkStatus.OKAY, connection.getResponseCode(), ); } else { String errorResponse = new String(readStream(connection.getErrorStream())); Ln.e(TAG , Error: + errorResponse); String statusLine; if (connection.getHeaderFields().get(null) != null (statusLine = connection.getHeaderFields().get(null).get(0)) != null TextUtils.split(statusLine, ).length 2) { int potentialStatusCode = Integer.parseInt(TextUtils.split(statusLine, )[1]); Ln.d(Parsed out empty response to reveal: + potentialStatusCode); return new NetworkResponse(NetworkStatus.OKAY, potentialStatusCode, ); } } } catch (IOException e) { Ln.e(e); } finally { if (connection != null) { connection.disconnect(); } } Testing on a 4.2 image on an emulator seems to work well, as does testing on previous versions of Android on an emulator (2.3+). I can't see any immediate issues with the code (it may looks hackish in parts, but that's due more to being churned over thanks to endless frustration with this issue) but perhaps I've missed something? Anyone have any thoughts with this, on either a Galaxy Nexus in general or with 4.2 specifically? Thanks in advance for any assistance (or even thoughts at all.) Ryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
A good way to cut bitmap memory usage in half is to load them with BitmapFactory.Options.inPreferredConfig = Bitmap.Config.RGB_565. Eg 16 bits vs 32 bits. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2
Don't quote me on that but I vaguely remember someone mentionning that POST request must not have a body. So I'd try again with no body. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2
That's not right, I'm afraid (unless I'm misunderstanding you.) POST requests for REST APIs generally have a body that contains their content. I had a dig into the Google IO 2012 POST request code and it seems like it does some odd things. HttpURLConnection conn = null; try { conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setUseCaches(false); conn.setChunkedStreamingMode(0); conn.setRequestMethod(POST); conn.setRequestProperty(Content-Type, application/x-www-form-urlencoded;charset=UTF-8); conn.setRequestProperty(Content-Length, Integer.toString(body.length())); // post the request OutputStream out = conn.getOutputStream(); out.write(body.getBytes()); out.close(); // handle the response int status = conn.getResponseCode(); if (status != 200) { throw new IOException(Post failed with error code + status); } } finally { It sets a specific request method after already setting doOutput (which, apparently, forces the request to use POST) and sets a fixed-length HTTP header while still using chunked request mode. Which doesn't make a large amount of sense. I am at a loss and wondering if it's something to do with my internet service using some kind of proxy that I'm not aware of and the HttpUrlConnection failing to redirect somehow the first time. ('curl'ing the same request works fine.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HttpURLConnection on Galaxy Nexus 4.2
On Friday, 23 November 2012 11:23:45 UTC+1, Ryan Bateman wrote: That's not right You are right. What I said was for DELETE requests. Of course POST requests have a body. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Why is ActivityGroup deprecated?
On Fri, Nov 23, 2012 at 1:37 AM, Franzi Roesner franzi.roes...@gmail.comwrote: Right, my question is, why are Fragments better / why were they created? See this original post from Dianne Hackborn on the introduction of Fragments: http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html You can also consult the documentation to read up on the topic. Your questions should be answered implicitly as you understand better what they do and what they're for. Also, this, :) http://lmgtfy.com/?q=why+fragments - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
You cannot use it all if you have images with alpha transparency, that's the case of many images in most games, and so its in my game. Actually I already use RGB_565 where I can. Best regards, On 11/23/2012 10:46 AM, b0b wrote: A good way to cut bitmap memory usage in half is to load them with BitmapFactory.Options.inPreferredConfig = Bitmap.Config.RGB_565. Eg 16 bits vs 32 bits. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Navigation Apps
On Fri, Nov 23, 2012 at 3:48 AM, Jack Harvard jack.harv...@gmail.comwrote: Any app with maps built into the app? I tried Navfree, but needs to download the map after the app is installed. Yes, I'm sure there are many. What is the purpose of your question, and, more importantly, how does it relate to developing android apps with the SDK? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
On 11/23/2012 10:30 AM, a1 wrote: As told to Mark, I do not think so: the game is just starting, loading the first Screen at all. Really? Well, that's what I can see on that stack trace. Data suggest quite the contrary: I think that data may suggest a wide number of different things. your heap is heavily fragmented, your process have allocated 48MB and released a lot (since there is 15MB), that's suggest lots of memory operations. My guess is that you are leaking memory between restarts, through some caches or other global (static) stuff. After few cycles of enter-exit OOM happens, I'd check if after exiting from game memory is correctly freed. Memory is corrrectly freed after exiting from the game. Anyway I will try to add code to gather more information from the heap for further releases, if it is possible, so I can limit the potential causes. Thanks for your answer, Regards, Bart -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Auto refresh data from webserver to activity
ok i look it betterthanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Fragment transaction between 2 FragmentActivity
i implement side navigation in my code and i used this librairy https://github.com/korovyansk/android-fb-like-slideout-navigation the list side extends FragmentActivity and the Main side extends FragmentActivity (see picture). [image: enter image description here] when i click in item of the list i want the main fragment replaced by another fragment so it there a way to do transaction fragment in the Main FragmentActivity from the list FragmentActivity what i can add to this code to make the transaction in Main not in List FragmentTransaction ft =getActivity().getSupportFragmentManager().beginTransaction(); ft.replace(R.id.fragment, newFragment); ft.addToBackStack(null); ft.commit(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Need Advice in Syncing Data From Android Device to SQL-Server Database
TCP List Available In Emulator System Directory: C:\Windows\system32# netstat -an netstat -an Proto Recv-Q Send-Q Local Address Foreign AddressState tcp0 0 127.0.0.1:5037 0.0.0.0:* LISTEN tcp0 0 0.0.0.0: 0.0.0.0:* LISTEN tcp 97 0 10.0.2.15: 10.0.2.2:52557 ESTABLISHED # - TCP List Available in Android Device while Connecting Through USB System Directory: C:\Windows\system32$ netstat -an netstat -an Proto Recv-Q Send-Q Local Address Foreign AddressState tcp 0 0 127.0.0.1: 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1: 127.0.0.1:59142 ESTABLISHED tcp 0 0 127.0.0.1:59141127.0.0.1: ESTABLISHED tcp 0 0 127.0.0.1: 127.0.0.1:59141 ESTABLISHED tcp 0 0 127.0.0.1:59142127.0.0.1: ESTABLISHED tcp6 0 1 :::223.178.145.5:59916 :::74.125.236.41:443CLOSE_WA IT tcp6 0 1 :::223.178.145.5:54502 :::202.86.6.175:80CLOSE_WAIT tcp6 0 1 :::223.178.145.5:55982 :::106.10.137.175:80CLOSE_WA IT tcp6 0 1 :::223.178.145.5:50863 :::74.125.235.56:80CLOSE_WAI T tcp6 0 0 :::223.178.145.5:43622 :::67.195.186.237:80ESTABLIS HED tcp6 0 1 :::223.178.145.5:45061 :::203.84.220.39:80CLOSE_WAI T tcp6 0 1 :::223.178.145.5:38525 :::74.125.236.41:443CLOSE_WA IT tcp6 48 0 :::223.178.145.5:55454 :::173.194.72.188:5228ESTABL ISHED tcp6 0 1 :::223.178.145.5:40214 :::74.125.236.46:443CLOSE_WA IT tcp6 0 1 :::223.178.145.5:58103 :::74.125.236.32:443CLOSE_WA IT tcp6 0 1 :::223.178.145.5:34903 :::74.125.236.39:443CLOSE_WA IT $ Above Are TCP List in Android phone and Device I tried port forward also below are the code of that but it's also giving error please give me any idea To Solve this syncing issue. Port Forward C:\Android\android-sdk\platform-toolsadb forward tcp: 194.178.100.1:1433 Computer name: PC23-PC User name: User-PC System Directory: C:\Windows\system32error: cannot bind socket On Tue, Nov 20, 2012 at 10:52 AM, Anees Thyrantakath sakzk...@gmail.comwrote: Refer this link http://amitku.wordpress.com/2011/08/03/how-to-connect-and-access-sql-database-server-from-android-app/ On Sun, Nov 18, 2012 at 8:59 AM, Durgesh Kumar colthurl...@gmail.comwrote: Sir I am also working with a same project and I am beginner for this. Can I get a sample code for the same. This will help many users like me. On Wednesday, 14 November 2012 13:10:02 UTC+5:30, Aadi Rockzz wrote: Hi, I wrote an application in android which will sync with SQL-server database that is sitting on my Local Server. while testing in real device using emulator it's not syncing Giving me IOException. I'm new to Android Technology. what my doubt is if i install this App in my android device when i have to perform sync operation by connecting the device through USB. Is there any need of Application to be installed that will help the device to sync data to Database. Please Help me to Solve this issue. Best Regards, Aadi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Auto refresh data from webserver to activity
You should try to use an AlarmManager isntead and create a Broadcast Receiver to update the data when the Alarm is fired! On Fri, Nov 23, 2012 at 1:36 PM, Antonis Kanaris ant...@in.gr wrote: ok i look it betterthanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
W dniu piątek, 23 listopada 2012 12:31:22 UTC+1 użytkownik Fran napisał: On 11/23/2012 10:30 AM, a1 wrote: As told to Mark, I do not think so: the game is just starting, loading the first Screen at all. Really? Well, that's what I can see on that stack trace. But you don't know if this is first run hence you cannot make assumption about process heap state (moreover other data suggest that this is not the case). Data suggest quite the contrary: I think that data may suggest a wide number of different things. If the data is valid (heap size and allocation size) this means that at least at some point your process allocated around 48MB total (if you check android heap management sources you will notice that heap grow algorithm do not excessively over-allocate) and when OOM occurs you still have 33MB allocated. All of above suggest a lot of allocation. your heap is heavily fragmented, your process have allocated 48MB and released a lot (since there is 15MB), that's suggest lots of memory operations. My guess is that you are leaking memory between restarts, through some caches or other global (static) stuff. After few cycles of enter-exit OOM happens, I'd check if after exiting from game memory is correctly freed. Memory is corrrectly freed after exiting from the game. Did you check with MAT? Also you may try to verify this theory by forcing process termination with System.exit. -- Regards, Bart -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Auto refresh data from webserver to activity
Τη Παρασκευή, 23 Νοεμβρίου 2012 2:06:11 μ.μ. UTC+2, ο χρήστης Paul-Peter Tournaris έγραψε: You should try to use an AlarmManager isntead and create a Broadcast Receiver to update the data when the Alarm is fired Please send me a link with a good tutorial for convert my code with AlarmManager? Paul-Peter Tournaris your email? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Auto refresh data from webserver to activity
Search the Google there are a lot of tutorials for it even in the official Google Developers site! On Fri, Nov 23, 2012 at 2:51 PM, Antonis Kanaris ant...@in.gr wrote: Τη Παρασκευή, 23 Νοεμβρίου 2012 2:06:11 μ.μ. UTC+2, ο χρήστης Paul-Peter Tournaris έγραψε: You should try to use an AlarmManager isntead and create a Broadcast Receiver to update the data when the Alarm is fired Please send me a link with a good tutorial for convert my code with AlarmManager? Paul-Peter Tournaris your email? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Blocked my UI thread by background service
Hello Jonathan, Thanx a lot for suggestion to use IntentService, now my app doesn't block UI thread, it works perfectly. again Thank you. On Sat, Nov 10, 2012 at 3:05 AM, Jonathan S xfsuno...@gmail.com wrote: Why you are not using IntentService? that class stop the service when it finished. On Friday, November 9, 2012 3:21:25 PM UTC-5, Rajan wrote: What i need to do = 1. I need to get Latitude longitude every 1 min. 2. after getting this lat long, i need to call one web service through which i have to send latitude, longitude, TAG TAG is kind of ON or OFF text : that can be set on button press event. What i have done = 1. i created one simple service that can be use to get lat long and also use AsynTask inside the service for calling a webservice 2. i have use Time class for ping after every 1 min. 3. now i need to add TAG value inside the background service using on button pressed event : that i have already done [ like : Intent i = new Intent(this, BackgroundService.class); i.putExtra(TAG,ON); startService(i); ] My Problem = it block my UI thread after every 1 min. , means when my time is going to ping a backgroundService for finding a lat long at that time it will block my UI for few seconds. so how can i prevent my UI thread ?? Note : for start stop to the background service, i have use Handler class Message class please help me i'm stuck in this scenario since last 2 to 3 days, i didn't find any single way to prevent my UI thread. thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] execute some code just before my application throw force close error
is it possible to execute some code just before my application throw force close error, throughout the app. i know about the broadcast receiver, that can help me out when any changes occur in my phone, but how can i identify @ where and @ which location my app throws force close error. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: execute some code just before my application throw force close error
See the source code for ACRA. *ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form. It is targetted to android applications developers to help them get data from their applications when they crash or behave erroneously.* * * *http://acra.ch/* *https://github.com/ACRA/acra* * * On Friday, November 23, 2012 1:38:40 PM UTC, Rajan wrote: is it possible to execute some code just before my application throw force close error, throughout the app. i know about the broadcast receiver, that can help me out when any changes occur in my phone, but how can i identify @ where and @ which location my app throws force close error. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Traffic not showing for France in MapView
Or an issue that look like this ? With traffic not showing in another country but showing in countries around. And showing in Google Maps otherwise. Country agreement issue ?? Le jeudi 22 novembre 2012 12:11:50 UTC+1, Fazerty a écrit : Nobody has got the same issue ? Le mercredi 17 octobre 2012 16:12:57 UTC+2, Fazerty a écrit : Hello everybody, Is the following normal ? When I use a MapView with settraffic(true) in order to show traffic stream, the traffic in France is not showing. But it is showing in England, Belgium, Spain... I have the same issue with ZTE 2.3.4, HTC Desire 2.1 and Samsung Galaxy SII 2.3.4 Is traffic for France not available in MapView ? It is strange because traffic in France exists on Google Maps Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Sending IPv6-packets from emulator to host-machine
Hi, I'm trying to send IPv6 packets from my emulated device to my host-machine. Is there any IPv6 address to reach the hosts ::1 address from the emulator (Something similar to 10.0.2.2 for IPv4)? I didn't find any information about using IPv6 with an emulated device in the emulator networking guidehttp://developer.android.com/tools/devices/emulator.html#emulatornetworking or searching the web. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] execute some code just before my application throw force close error
On Fri, Nov 23, 2012 at 8:38 AM, Rajan r.d.thak...@gmail.com wrote: is it possible to execute some code just before my application throw force close error, throughout the app. http://developer.android.com/reference/java/lang/Thread.html#setDefaultUncaughtExceptionHandler%28java.lang.Thread.UncaughtExceptionHandler%29 - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Handle WifiDirect Invitation Decline
Hi How to handle if the Group Owner declines the request to join the group? Is there any call back available for the same? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: In search of Nexus 10 ADB drivers
Same for me. ADB recognizes Nexus 7 but not Nexus 10. The Nexus 10 ADB dirver is launched since it appear in Windows device list as Android Composite ADB Interface -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: In search of Nexus 10 ADB drivers
Fixed: after 1h of uncessuful googling and WTFs, ADB finally recognized the device I change Settings Stogae Menu USB Computer connection to Camera (PTP). The default is Media Device (MTP) and prevent ADB to find the dvice... WTF. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Why is ActivityGroup deprecated?
Thanks, that post didn't come up in my searches, hence I asked here. On Friday, November 23, 2012 3:23:44 AM UTC-8, TreKing wrote: On Fri, Nov 23, 2012 at 1:37 AM, Franzi Roesner franzi@gmail.comjavascript: wrote: Right, my question is, why are Fragments better / why were they created? See this original post from Dianne Hackborn on the introduction of Fragments: http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html You can also consult the documentation to read up on the topic. Your questions should be answered implicitly as you understand better what they do and what they're for. Also, this, :) http://lmgtfy.com/?q=why+fragments - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
On 11/23/2012 01:19 PM, a1 wrote: W dniu piątek, 23 listopada 2012 12:31:22 UTC+1 użytkownik Fran napisał: On 11/23/2012 10:30 AM, a1 wrote: As told to Mark, I do not think so: the game is just starting, loading the first Screen at all. Really? Well, that's what I can see on that stack trace. But you don't know if this is first run hence you cannot make assumption about process heap state (moreover other data suggest that this is not the case). Data suggest quite the contrary: I think that data may suggest a wide number of different things. If the data is valid (heap size and allocation size) this means that at least at some point your process allocated around 48MB total (if you check android heap management sources you will notice that heap grow algorithm do not excessively over-allocate) and when OOM occurs you still have 33MB allocated. All of above suggest a lot of allocation. Well, as told this may suggest a wide number of different things, for example as you implicitly noted there may be a problem with the report itself and the data may be not reliable, another option is that there may be a bug in the heap management of those devices causing the problem. Also having a wide gap between allocated and used heap only mean that probably that memory was used before, but you do not know if it was used by a number of tiny objects or just by a few big ones. And, of course, you cannot infer how many times they were stored and released or things like that. As told before, I will try to put some bugsense code for further versions, to see if I can gather more reliable and precise information on heap state on these crashes. your heap is heavily fragmented, your process have allocated 48MB and released a lot (since there is 15MB), that's suggest lots of memory operations. My guess is that you are leaking memory between restarts, through some caches or other global (static) stuff. After few cycles of enter-exit OOM happens, I'd check if after exiting from game memory is correctly freed. Memory is corrrectly freed after exiting from the game. Did you check with MAT? Also you may try to verify this theory by forcing process termination with System.exit. I've doing that since half hundred of versions ago, more or less, so I am pretty sure about it. Bests, -- Regards, Bart -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
MTP should work. All my devices are set to MTP and work just fine with adb. On Fri, Nov 23, 2012 at 8:46 AM, b0b pujos.mich...@gmail.com wrote: Fixed: after 1h of uncessuful googling and WTFs, ADB finally recognized the device I change Settings Stogae Menu USB Computer connection to Camera (PTP). The default is Media Device (MTP) and prevent ADB to find the dvice... WTF. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Wrong resolution ???
Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Wrong resolution ???
What does android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html give you? On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OOM with heap enough
Did you check with MAT? Also you may try to verify this theory by forcing process termination with System.exit. I've doing that since half hundred of versions ago, more or less, so I am pretty sure about it. No you don't only you only kill on explicte exit (probably in onBackPressed) not in onDestroy, and as I suspected you leak as hell (like 10MB) on activity restarts (I crashed your game with OOM on SGS2 with 128MB heap and on N7 with 256MB heap): 11-23 19:30:27.673: D/dalvikvm(6289): GC_BEFORE_OOM freed 24K, 2% free 12K/129735K, paused 54ms 11-23 19:30:27.673: E/dalvikvm-heap(6289): Out of memory on a 1536016-byte allocation. 11-23 19:30:27.673: I/dalvikvm(6289): main prio=5 tid=1 RUNNABLE 11-23 19:30:27.673: I/dalvikvm(6289): | group=main sCount=0 dsCount=0 obj=0x40c80460 self=0x12988 11-23 19:30:27.673: I/dalvikvm(6289): | sysTid=6289 nice=0 sched=0/0 cgrp=default handle=1074959656 11-23 19:30:27.673: I/dalvikvm(6289): | schedstat=( 6635628723 11025881606 23463 ) utm=527 stm=136 core=1 11-23 19:30:27.673: I/dalvikvm(6289): at android.graphics.Bitmap.nativeCreate(Native Method) 11-23 19:30:27.678: I/dalvikvm(6289): at android.graphics.Bitmap.createBitmap(Bitmap.java:605) 11-23 19:30:27.678: I/dalvikvm(6289): at android.graphics.Bitmap.createBitmap(Bitmap.java:585) 11-23 19:30:27.678: I/dalvikvm(6289): at com.badlogic.androidgames.framework.impl.AndroidGame.onCreate(AndroidGame.java:182) 11-23 19:30:27.678: I/dalvikvm(6289): at com.marzoa.ruletafree.RuletaAfortunadaGame.onCreate(RuletaAfortunadaGame.java:19) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.Activity.performCreate(Activity.java:4470) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.ActivityThread.access$600(ActivityThread.java:127) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158) 11-23 19:30:27.678: I/dalvikvm(6289): at android.os.Handler.dispatchMessage(Handler.java:99) 11-23 19:30:27.678: I/dalvikvm(6289): at android.os.Looper.loop(Looper.java:137) 11-23 19:30:27.678: I/dalvikvm(6289): at android.app.ActivityThread.main(ActivityThread.java:4511) 11-23 19:30:27.678: I/dalvikvm(6289): at java.lang.reflect.Method.invokeNative(Native Method) 11-23 19:30:27.678: I/dalvikvm(6289): at java.lang.reflect.Method.invoke(Method.java:511) 11-23 19:30:27.678: I/dalvikvm(6289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 11-23 19:30:27.678: I/dalvikvm(6289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 11-23 19:30:27.678: I/dalvikvm(6289): at dalvik.system.NativeStart.main(Native Method) -- Regards, Bart -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Wrong resolution ???
Probably confusion. It's kind of hard to sort out information from those documents. In fact I found that emulators and real devices were picking up different dimens.xml files I was using for setting font sizes than what the documentation claimed. Fortunately this had also been discovered by other developers on Stackoverflow and with provided solutions. Samsung seems to be a major culprit in designing devices that are tricky to create emulators for. They really need to supply emulator images for the devices that don't fall in line with Android standard pixel densities. However as I read recently Google is changing the licensing to prevent this. If you are familiar with the hardware industry they do this to differentiate their different models which benefits marketing but not developers or consumers. On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote: What does android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html give you? On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Drawing complex shapes with hollow parts
In fact, after doing some further work on this, this is what I have found : The simplest way of achieving this is to 1. Create the path object 2. Set the fill type to Path.FillType.WINDING . 3. draw the outline segments using lineTo, cubicTo, etc, ensuring that the outline closes itself. 4. draw the inner holes, each one using a different direction. ie: if the outline was drawn clockwise, then the first hole must be anti-clockwise, the second clockwise, etc... 5. Draw the path on the canvas with Canvas.drawPath(...) . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Emulator for Samsung GT-P3100 7
I have a customer who reports that with my recent update the menu icon has disappeared. I'm assuming the whole bottom bar has disappeared. However my update took that into account and the target SDK is set at 11 and the build SDK for 9. I'm using the support-4 jar. The configuration for this device (some places referred to as the Galaxy 2 7 ) seems about the same as a Nexus 7. However the Nexus 7 emulator does not replicate this problem. I'm assuming that the device is picking up the wrong dimens.xml and thus actually pushing off the entire bottom bar. Some what is the oddity about the GT-P3100? It took a bit of experimentation to get emulators to select the proper dimens.xml folder as they apparently don't work the way the documentation say they do. For instance my Galaxy Nexus phone needed a values-sw360p folder not a 320p as suggested in the docs. I'm also hoping that the new licensing for manufacturers that Google announced the other day put an end to these wildass pixel densities that give developers headaches. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
What do we do for Linux? I get the Camera folder for a Galaxy Nexus opening on Ubuntu 10.04 but with my other devices I could get the whole SD card. It also refuses to copy the JPG picture files though it will copy the video files. I read this has something to do with MTP. On Friday, November 23, 2012 9:50:15 AM UTC-8, Romain Guy (Google) wrote: MTP should work. All my devices are set to MTP and work just fine with adb. On Fri, Nov 23, 2012 at 8:46 AM, b0b pujos@gmail.com javascript:wrote: Fixed: after 1h of uncessuful googling and WTFs, ADB finally recognized the device I change Settings Stogae Menu USB Computer connection to Camera (PTP). The default is Media Device (MTP) and prevent ADB to find the dvice... WTF. -- 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 -- Romain Guy Android framework engineer roma...@android.com javascript: -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Wrong resolution ???
On 11/23/2012 07:52 PM, jtoolsdev wrote: Probably confusion. It's kind of hard to sort out information from those documents. In fact I found that emulators and real devices were picking up different dimens.xml files I was using for setting font sizes than what the documentation claimed. Fortunately this had also been discovered by other developers on Stackoverflow and with provided solutions. Erm... do yo think that any of those may be useful for my case? have you got any links? Thanks in advance, Samsung seems to be a major culprit in designing devices that are tricky to create emulators for. They really need to supply emulator images for the devices that don't fall in line with Android standard pixel densities. However as I read recently Google is changing the licensing to prevent this. If you are familiar with the hardware industry they do this to differentiate their different models which benefits marketing but not developers or consumers. On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote: What does android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html http://developer.android.com/reference/android/util/DisplayMetrics.html give you? On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Wrong resolution ???
Exactly the same wrong resolution, and dpi at 160 in all cases as expected since it is a mdpi device. metricsDisplayMetrics (id=830019718568) density1.0 densityDpi160 heightPixels752 noncompatDensity1.0 noncompatHeightPixels752 noncompatScaledDensity1.0 noncompatWidthPixels1238 noncompatXdpi160.0 noncompatYdpi160.0 scaledDensity1.0 widthPixels1238 xdpi160.0 ydpi160.0 Regards, On 11/23/2012 07:37 PM, RichardC wrote: What does android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html give you? On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] android.database.sqlite.SQLiteDiskIOException: disk I/O error: COMMIT;
Hi, I am experimenting some crashes with this exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error: COMMIT; I think it may occur by several reasons, including low storage for example, or a broken sd card, or so... but there may be another reasons. The question is: Is there any manner of obtaining more detailed information about WHY this exception was raised exactly? Best regards, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
On Fri, Nov 23, 2012 at 6:47 PM, Romain Guy romain...@android.com wrote: MTP should work. All my devices are set to MTP and work just fine with adb. Ah, good old works on my machine(TM), right? ;-) For what it's worth, if I set my Nexus 7 to MTP, adb devices lists it like this: no permissions On PTP, it works just right. This is true for 4.1.1, 4.1.2 and 4.2. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
Ah, good old works on my machine(TM), right? ;-) More like I've never heard of this issue before :) I'll ask around in the office on Monday to see if it's a known issue. -- Romain Guy Android framework engineer romain...@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-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
On Fri, Nov 23, 2012 at 8:30 PM, jtoolsdev brianjto...@gmail.com wrote: What do we do for Linux? I get the Camera folder for a Galaxy Nexus opening on Ubuntu 10.04 but with my other devices I could get the whole SD card. It also refuses to copy the JPG picture files though it will copy the video files. I read this has something to do with MTP. Just another case of replacing a fully working pedestrian solution (USB mass storage) with limited or half-broken fancy stuff (MTP) I'm afraid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
On Fri, Nov 23, 2012 at 9:25 PM, Romain Guy romain...@android.com wrote: Ah, good old works on my machine(TM), right? ;-) More like I've never heard of this issue before :) I'll ask around in the office on Monday to see if it's a known issue. Cool, thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Does anyone have a Samsung Galaxy Tablet 10.1?
Does anyone have a Samsung Galaxy Tablet 10.1'' with 1280x800 pixels of screen resolution? I rather like to know what DisplayMetrics reports to him, since I am trying to emulate it but getting wrong parameters with the emulator, and I suspect that the problem is with the emulator itself. Thanks a lot in advance, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] hi
where is the file On Nov 22, 2012 6:54 AM, sree android android.sreeni...@gmail.com wrote: First thanks for your replay and spend your valuable time for me. What ever u said entire thing is 100% right,but how can i solve my problem i did not have anybody for solve these problem. These is Login access using JSON webservices , Here My server code and Android is gave.when i running these code connection null is came in line number 54 in android code mobile class.if u have interest to solve these problem please solve me,database is not importent here.u can change whatever u have. plz execute and solve problem -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Does anyone have a Samsung Galaxy Tablet 10.1?
On Fri, Nov 23, 2012 at 3:44 PM, Francisco Marzoa fmmar...@gmail.com wrote: Does anyone have a Samsung Galaxy Tablet 10.1'' with 1280x800 pixels of screen resolution? I rather like to know what DisplayMetrics reports to him, since I am trying to emulate it but getting wrong parameters with the emulator, and I suspect that the problem is with the emulator itself. 11-23 16:07:53.161: E/ScrapActivity(1205): DisplayMetrics{density=1.0, width=1280, height=800, scaledDensity=1.0, xdpi=160.15764, ydpi=160.0} -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Can we determine APK Install date time?
http://stackoverflow.com/questions/5311644/get-application-installed-date-on-android 2009年10月23日金曜日 10時04分38秒 UTC+9 Dianne Hackborn: No the system doesn't currently maintain this. On Thu, Oct 22, 2009 at 4:59 PM, Open ldon...@gmail.com javascript:wrote: I would like to know this too, it seems like something that the PackageManager would maintain so I'm surprised to read on the thread by Josh Dobbs that it doesn't. Is there another way? On Sep 15, 5:42 am, Shibbs shibu.deva...@gmail.com wrote: Hi all, By any means, programmatically can I get theinstalldate time of the already installed apps on the android device. The ApplicationInfo doesn't provide this info. While digging through the /data folder through the DDMS perspective, I saw the installed apk's do contains theDate time of when it was installed, but the sad part is that this /data folder is not accessible on the device programmatically. Any help in this regard? Thanks, Shibbs -- Dianne Hackborn Android framework engineer hac...@android.com javascript: Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Does anyone have a Samsung Galaxy Tablet 10.1?
Thanks a million Mark. On Nov 23, 2012 10:11 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Nov 23, 2012 at 3:44 PM, Francisco Marzoa fmmar...@gmail.com wrote: Does anyone have a Samsung Galaxy Tablet 10.1'' with 1280x800 pixels of screen resolution? I rather like to know what DisplayMetrics reports to him, since I am trying to emulate it but getting wrong parameters with the emulator, and I suspect that the problem is with the emulator itself. 11-23 16:07:53.161: E/ScrapActivity(1205): DisplayMetrics{density=1.0, width=1280, height=800, scaledDensity=1.0, xdpi=160.15764, ydpi=160.0} -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Wrong resolution ???
I was looking for it earlier but haven't found it yet. I don't know if you are declaring any dimens.xml but do you have a navigation bar on right when landscape? That would account for the 1238 resolution. Then the top is for the status bar or whatever it is being called these days. And 160 dpi is correct. In my case I need for the app to use the correct dimens.xml file but it wasn't working as advertised. On Friday, November 23, 2012 11:46:12 AM UTC-8, Fran wrote: On 11/23/2012 07:52 PM, jtoolsdev wrote: Probably confusion. It's kind of hard to sort out information from those documents. In fact I found that emulators and real devices were picking up different dimens.xml files I was using for setting font sizes than what the documentation claimed. Fortunately this had also been discovered by other developers on Stackoverflow and with provided solutions. Erm... do yo think that any of those may be useful for my case? have you got any links? Thanks in advance, Samsung seems to be a major culprit in designing devices that are tricky to create emulators for. They really need to supply emulator images for the devices that don't fall in line with Android standard pixel densities. However as I read recently Google is changing the licensing to prevent this. If you are familiar with the hardware industry they do this to differentiate their different models which benefits marketing but not developers or consumers. On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote: What does android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html give you? On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: Hi there, I have an emulator instance that seems to be reporting wrong resolution, but I am not sure if it is a problem of the emulator or may be also a problem in an actual device with same setup since I have no one. I use this code to get the resolution: getWindowManager().getDefaultDisplay().getWidth() getWindowManager().getDefaultDisplay().getHeight() The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches screen and 1280x800 resolution, with software buttons. The problem is that putting it on landscape mode (pressing ctrl+f12, you know), and executing my app, it reports following resolution: 1238x752 I would understand that 752 due these 48 pixels being reserved for the software buttons, but the 1238 has no sense at all: software buttons are put just in one position depending on device orientation, not both... Do you think it is just an emulator bug or may I found this situation on actual devices? Thanks a lot 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.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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create soap request in ksoap2 for a wcf webservice method with complex types?
Den fredagen den 23:e november 2012 kl. 05:26:57 UTC+1 skrev Raneez: And you are not supposed to comment here, if you dont have any idea about this. Directing to a inactive forum is not a good attitude, give a hand if you know something else go away! With that attitude you will not get any help. Not getting help might be an indication that you ask in the wrong place. (I could quote you and say please go away but that would be a bad attitude) Have a nice day. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In search of Nexus 10 ADB drivers
It happened a lot to me when I worked testing with different devices. Usually the safest option was charge only. Marina On Nov 23, 2012 2:47 p.m., Romain Guy romain...@android.com wrote: MTP should work. All my devices are set to MTP and work just fine with adb. On Fri, Nov 23, 2012 at 8:46 AM, b0b pujos.mich...@gmail.com wrote: Fixed: after 1h of uncessuful googling and WTFs, ADB finally recognized the device I change Settings Stogae Menu USB Computer connection to Camera (PTP). The default is Media Device (MTP) and prevent ADB to find the dvice... WTF. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: proguard.cfg assumenosideeffects options
It is not possible to let ProGuard remove System.out.print statements. The option -assumenosideeffects can remove all PrintStream#print statements, but that is generally not a desirable. Eric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [android-ICS] test-librsloader_intermediates/test-librsloader] Error
If some one had tried to answer this? I am through it. Thanks. On Wed, Nov 21, 2012 at 4:05 PM, krisand krishna.andr...@gmail.com wrote: have tried the existing solutions on google groups. None works. Any idea is appreciated. Compilation platform: Ubuntu 12.04 host C: test-librsloader = frameworks/compile/linkloader/ **android/test-librsloader.c host Executable: test-librsloader (out/host/linux-x86/obj/** EXECUTABLES/test-librsloader_**intermediates/test-**librsloader) out/host/linux-x86/obj/STATIC_**LIBRARIES/libLLVMSupport_** intermediates/libLLVMSupport.**a(Signals.o): In function `PrintStackTrace': /android_working_dir/external/**llvm/lib/Support/Unix/Signals.**inc:219: undefined reference to `dladdr' /android_working_dir/external/**llvm/lib/Support/Unix/Signals.**inc:231: undefined reference to `dladdr' out/host/linux-x86/obj/STATIC_**LIBRARIES/libLLVMSupport_** intermediates/libLLVMSupport.**a(Threading.o): In function `llvm::llvm_execute_on_thread(**void (*)(void*), void*, unsigned int)': android_working_dir/external/**llvm/lib/Support/Threading.**cpp:97: undefined reference to `pthread_create' android_working_dir/external/**llvm/lib/Support/Threading.**cpp:92: undefined reference to `pthread_attr_setstacksize' android_working_dir/external/**llvm/lib/Support/Threading.**cpp:101: undefined reference to `pthread_join' out/host/linux-x86/obj/STATIC_**LIBRARIES/libLLVMSupport_** intermediates/libLLVMSupport.**a(Mutex.o): In function `MutexImpl': /android_working_dir/external/**llvm/lib/Support/Mutex.cpp:70: undefined reference to `pthread_mutexattr_init' android_working_dir/external/**llvm/lib/Support/Mutex.cpp:76: undefined reference to `pthread_mutexattr_settype' android_working_dir/external/**llvm/lib/Support/Mutex.cpp:81: undefined reference to `pthread_mutexattr_setpshared' android_working_dir/external/**llvm/lib/Support/Mutex.cpp:90: undefined reference to `pthread_mutexattr_destroy' out/host/linux-x86/obj/STATIC_**LIBRARIES/libLLVMSupport_** intermediates/libLLVMSupport.**a(Mutex.o): In function `llvm::sys::MutexImpl::**tryacquire()': android_working_dir/external/**llvm/lib/Support/Mutex.cpp:**144: undefined reference to `pthread_mutex_trylock' collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/**EXECUTABLES/test-librsloader_** intermediates/test-**librsloader] Error 1 -- You received this message because you are subscribed to the Google Groups android-platform group. To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/w-wiywtUiLYJ. To post to this group, send email to android-platf...@googlegroups.com. To unsubscribe from this group, send email to android-platform+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/android-platform?hl=en. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator for Samsung GT-P3100 7
Solved. I was able to replicate the problem using the 7 WSVGA tablet image under the Device Definitions. Interesting thing and possibly a bug in the image is that I couldn't even get a navigation bar with version 4.0.3 which is what the user has and that was on any app including the built in ones. With 4.2 installed the navigation bar came back and the menu overflow displayed. The blog item Say Goodbye to the Menu Button could use a rewrite. Even the writer admits the whole thing is a bit confusing. For my app I had set the targetSDK in the manifest to 11 and setting it back to 9 solved the problem. This needs to be sorted out and made clearer in the docs. On Friday, November 23, 2012 11:26:53 AM UTC-8, jtoolsdev wrote: I have a customer who reports that with my recent update the menu icon has disappeared. I'm assuming the whole bottom bar has disappeared. However my update took that into account and the target SDK is set at 11 and the build SDK for 9. I'm using the support-4 jar. The configuration for this device (some places referred to as the Galaxy 2 7 ) seems about the same as a Nexus 7. However the Nexus 7 emulator does not replicate this problem. I'm assuming that the device is picking up the wrong dimens.xml and thus actually pushing off the entire bottom bar. Some what is the oddity about the GT-P3100? It took a bit of experimentation to get emulators to select the proper dimens.xml folder as they apparently don't work the way the documentation say they do. For instance my Galaxy Nexus phone needed a values-sw360p folder not a 320p as suggested in the docs. I'm also hoping that the new licensing for manufacturers that Google announced the other day put an end to these wildass pixel densities that give developers headaches. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google Play adding permission requests after upload. - Lose reach, existing users lose upgrade path
On Thursday, November 22, 2012 2:22:34 PM UTC-8, TreKing wrote: On Thu, Nov 22, 2012 at 12:01 PM, JP joachim@gmail.com javascript:wrote: There are no new features that would require any new permissions, and the target-sdk remains at 11. (min-sdk level 3) Turns out that Google Play in its infinite wisdom added permission requests that aren't required for the app, at least not for the devices I've tested it on over the years. Update. I checked a number of Android Market-published APKs way back, and it appears the APK export added the offending permissions (WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE and READ_PHONE_STATE) for quite some time already. Only recently Android Market / Google Play seems to have picked up on these, hence the app going over the cliff for a monster amount (I figure) of devices. After digging, that lead me to find this: http://stackoverflow.com/questions/1747178/android-permissions-phone-calls-read-phone-state-and-identity Turns out advancing to min-sdk level 4 in the manifest file resolves the issue as the permissions above are no longer added. Buh buy, Cupcake. Well, I can live with losing G1 owners that never updated to Donut. Would be *nice* though to have meaningful error messages in Android Market. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] best practices for maintaining translations through app updates
I am planning to add translations to my Android app. I have created a Get Localization http://www.getlocalization.com/ project for users to translate my string resources. However, I have some concerns. My app is still under constant development, and I typically add features every week or two. Often these features will contain some new strings. So it seems that either I would have to wait for users to translate the new strings before updating the app, or else release an update with incomplete translations (in which case the users will see the English strings for the new features). I feel like there is not a good solution and this is making me very reluctant to incorporate the translations. I'm wondering whether I should wait until my app becomes more stable in terms of features, but this could be a while away. I'm just hoping that some of you might have some advice for me - perhaps there is some solution I haven't considered. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Develop Android Forum Software
Hello I want to develop a forum software for android where members will ask the question and other members and administrator will answer the question. I need to insert, update, delete, display data into sql server. How can I do this please suggest me. If anyone has sample code please share me. My email address is mojamc...@gmail.com Thanks Mojammel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Develop Android Forum Software
On Fri, Nov 23, 2012 at 11:52 PM, Mojam mojamc...@gmail.com wrote: I need to insert, update, delete, display data into sql server. How can I do this please suggest me. Get a book or use internet to find information on this topic. Or be more specific if you want help from this group. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Develop Android Forum Software
Thanks for your reply. I want to connect sql server database with android and insert, update, delete data from sql server using android user interface. I know I need web service to do that. I already created a web service for that from visual studio 2008. Now I want to know how shall I connect with that service and Insert, update, delete data from sql server by using android UI. On Saturday, November 24, 2012 11:34:16 AM UTC+6, TreKing wrote: On Fri, Nov 23, 2012 at 11:52 PM, Mojam moja...@gmail.com javascript:wrote: I need to insert, update, delete, display data into sql server. How can I do this please suggest me. Get a book or use internet to find information on this topic. Or be more specific if you want help from this group. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Develop Android Forum Software
On Sat, Nov 24, 2012 at 12:40 AM, Mojam mojamc...@gmail.com wrote: Now I want to know how shall I connect with that service and Insert, update, delete data from sql server by using android UI. Connecting to a web service is not really android specific. Create some REST-ful interface to do the operations you require, then use standard Java networking libraries to connect to your service. From the Android side. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Develop Android Forum Software
thanks for your reply. Can u please suggest me any link from where I can read and gain knowledge about it or can you please provid me some sample code. On Sat, Nov 24, 2012 at 11:58 AM, TreKing treking...@gmail.com wrote: On Sat, Nov 24, 2012 at 12:40 AM, Mojam mojamc...@gmail.com wrote: Now I want to know how shall I connect with that service and Insert, update, delete data from sql server by using android UI. Connecting to a web service is not really android specific. Create some REST-ful interface to do the operations you require, then use standard Java networking libraries to connect to your service. From the Android side. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- * * * * * * * * * * *Md. Mojammel Haque* *Senior Software Engineer* *Skype : mojamcpds1* *E-Mail : mojamc...@gmail.com* ** *Cell : +88-019-21-621 111, **018-17-045 882* *Website : *http://smartphone-developersbd.com * * *Take Risks And Conquer Your Fears* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: best practices for maintaining translations through app updates
Here's some of my experience, would love to hear more from others: I've had the fortune of having some passionate users voluntarily translate one of my apps so far into 9 languages, from English. In addition there's an iOS version with slightly different text here and there. I've used the free google translate toolkit (http://translate.google.com/toolkit/) which accepts strings.xml files as well as html files, etc. I converted the iOS Localizable.strings format to a strings.xml format (and then back). The first few translations were done manually, with no toolkit, and it was tough. The toolkit really helps, as the UI is pretty nice, and it fills in some default machine translations which can be edited. In addition there's the ability to add comments, etc. I really started this after the app was relatively mature, but there have been changes in the text over time, and I've found that the best way to keep track of that is to simply create new files with the new text, for translation. If there's quite a bit of change, then I wait until all the translations come back before I put out a release. It's hard to offer advice as far as whether you should wait or not, it really depends on how important reaching more users are to you, vs. having a stable app. It's probably not the end of the world to have some strings in english, but it can also be jarring to a user. One thing that i've realized in hindsight is that, a picture truly is worth 1000 words, and now I think very carefully before adding any text to the application that can't otherwise be represented more universally. In fact, the structure of some languages, such as German, has wreaked havoc on several critical UI elements which had text in them for which English words were compact. So that may be something to consider. I'm also coming from a place where people have voluntarily translated the application text, for which I am extremely grateful, so I hesitate to frivolously reach out to them constantly. If you're paying for translations from professionals, then I'm sure it will be different. Please, anyone else with experience on this, chime in. I'm curious about this Get Localization as well, has anyone else used it? How is the quality of the translation? There's a few languages I'd love to get some translations in and I'd love to hear what works and doesn't. On Friday, November 23, 2012 11:13:03 PM UTC-5, UgglyNoodle wrote: I am planning to add translations to my Android app. I have created a Get Localization http://www.getlocalization.com/ project for users to translate my string resources. However, I have some concerns. My app is still under constant development, and I typically add features every week or two. Often these features will contain some new strings. So it seems that either I would have to wait for users to translate the new strings before updating the app, or else release an update with incomplete translations (in which case the users will see the English strings for the new features). I feel like there is not a good solution and this is making me very reluctant to incorporate the translations. I'm wondering whether I should wait until my app becomes more stable in terms of features, but this could be a while away. I'm just hoping that some of you might have some advice for me - perhaps there is some solution I haven't considered. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Develop Android Forum Software
On Sat, Nov 24, 2012 at 1:06 AM, Mojam Dewan mojamc...@gmail.com wrote: Can u please suggest me any link from where I can read and gain knowledge about it or can you please provid me some sample code. I don't have sample code, but here are a few links where you can gain a lot of knowledge and probably find code samples. www.google.com www.bing.com www.yahoo.com www.duckduckgo.com Hope that helps. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en