[android-developers] Re: WebView not calling onReceivedError 500 error from server
onReceivedError doesn't get called on HTTP response errors, only resource errors. "... [onRecievedError] errors are not HTTP errors but are unrecoverable resource errors (file not found, no network connection, server not found for the main resource, etc.)." http://code.google.com/p/android/issues/detail?id=968 On Jun 9, 10:13 pm, Brad wrote: > I've got a webview and I've set the webviewclient to my own class > where I override the onReceivedError and onPageFinished methods. > > When my server returns a 500 error code along with an html error > message, onPageFinished gets called but onReceviedError does not. > > I've tried calling a completely bogus url and onReceivedError does get > called in this case (with "unable to resolve host" error code). > > I wouldn't think it would matter but I'm making an https (SSL) call. > > Am I mistaken in believing that onReceivedError should get called when > my server returns 500? > > I could work around this by searching the returned html for a > commented keyword (that I insert in the server code), but alas there > is no way to access the html of the currently displayed page using > webview. > > Basically I want to hide the webview control unless I'm certain that > it's displaying the content that I intend (from my server). -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] What is Development device ID?
In ICS's Developer Options, there's a preference "Development device ID" with a 13 character string (---X screenshot: http://cdn.droid-life.com/wp-content/uploads/2011/12/Screenshot_2011-12-05-12-06-48-365x650.png). I searched high and low to find out what it might before but couldn't find anything. So I looked at the source of the Settings app to see where it was coming from (https://github.com/android/ platform_packages_apps_settings/blob/master/src/com/android/settings/ DevelopmentSettings.java#L143): final Preference verifierDeviceIdentifier = findPreference(VERIFIER_DEVICE_IDENTIFIER); final PackageManager pm = getActivity().getPackageManager(); final VerifierDeviceIdentity verifierIndentity = pm.getVerifierDeviceIdentity(); if (verifierIndentity != null) { verifierDeviceIdentifier.setSummary(verifierIndentity.toString()); } And looking at the online docs, PackageManager#getVerifierDeviceIdentity is not documented. However, viewing the source shows (https://github.com/android/ platform_frameworks_base/blob/master/core/java/android/content/pm/ PackageManager.java#L2658): /** * Returns the device identity that verifiers can use to associate their * scheme to a particular device. This should not be used by anything other * than a package verifier. * * @return identity that uniquely identifies current device * @hide */ public abstract VerifierDeviceIdentity getVerifierDeviceIdentity(); It states that it is a device identifier, yet says we shouldn't use it to identify devices... Does anyone know if this is in someway similar to ANDROID_ID? If not, does anyone know what this is for? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Is there a similar tool to instruments for Android development?
I was wondering if there was a simple way to track Android process memory usage as well as state similar to the way iOS apps were tracked in this video: http://speirs.org/blog/2012/1/6/ios-multitasking-in-detail.html If there is, it would be very helpful for people to understand Activity lifecycles as it depicts them visually. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] No resource identifier found for attribute 'tabLayout' in package 'android'
Is there any reason that the attribute android:tablayout isn't publicly available? I can find it in the source here: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/attrs.xml#L2912 but it doesn't show up in the docs here: http://developer.android.com/reference/android/widget/TabWidget.html nor does it work if I try to use it in Eclipse. Am I doing something wrong or was it hidden for some reason? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem building android library project with multiple source directories using ant and r14
I don't know if this is a bug or if i'm doing something wrong, but I am unable to build my Android library with multiple source directories using ant with ADK r14. My ant.properties: source.dir=src;libs/apache/src/java;libs/signpost/signpost-core/src/ main/java;libs/signpost/signpost-commonshttp4/src/main/java;libs/ gchttprequest/src My build.xml is clean and created by android update project -p . I run: $ ant clean release Crashlog: ... -compile: [javac] /Developer/android-sdk/tools/ant/build.xml:600: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 68 source files to /Users/grantland/development/ kiip/android-sdk/kiip/bin/classes [javac] Note: /Users/grantland/development/kiip/android-sdk/kiip/ libs/signpost/signpost-core/src/main/java/oauth/signpost/ AbstractOAuthProvider.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [echo] Creating library output jar file... BUILD FAILED /Developer/android-sdk/tools/ant/build.xml:580: The following error occurred while executing this line: /Developer/android-sdk/tools/ant/build.xml:620: /Users/grantland/ development/kiip/android-sdk/kiip/src;libs/apache/src/java;libs/ signpost/signpost-core/src/main/java;libs/signpost/signpost- commonshttp4/src/main/java;libs/gchttprequest/src does not exist. I've checked and all my source directories exist and the lines in the main build.xml it crashes in is: 620: 621: 622: 623: I'm pretty sure line 623 causes the crash since fileset is unable to accept multiple directories. I can get around this by copying the entire -compile target and commenting out line 622 and it works. Am I doing something wrong, or is this a bug? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en