¡@

Home 

2014/10/16 ¤W¤È 08:23:48

android Programming Glossary: sf

How to create a BKS (BouncyCastle) format Java Keystore that contains a client certificate chain

http://stackoverflow.com/questions/4065379/how-to-create-a-bks-bouncycastle-format-java-keystore-that-contains-a-client-c

verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate.. client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER.. SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e How to invoke..

Apache HttpClient on Android producing CertPathValidatorException (IssuerName != SubjectName)

http://stackoverflow.com/questions/4115101/apache-httpclient-on-android-producing-certpathvalidatorexception-issuername

verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate.. client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER.. SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e private static..

Resizing/Scaling Down Android Widgets (DatePicker and TimePicker)

http://stackoverflow.com/questions/4261527/resizing-scaling-down-android-widgets-datepicker-and-timepicker

LinearLayout and overwrite method getChildStaticTransformation 1 and setStaticTransformationsEnabled explicit to true... method getChildStaticTransformation 1 and setStaticTransformationsEnabled explicit to true. In the method getChildStaticTransformation.. explicit to true. In the method getChildStaticTransformation you can manipulate the tranformation parameter to scale..

Multi-gradient shapes

http://stackoverflow.com/questions/4381033/multi-gradient-shapes

like it'd be a great help ShapeDrawable.ShaderFactory sf new ShapeDrawable.ShaderFactory @Override public Shader resize.. PaintDrawable p.setShape new RectShape p.setShaderFactory sf Basically the int array allows you to select multiple color.. findViewById R.id.thebutton ShapeDrawable.ShaderFactory sf new ShapeDrawable.ShaderFactory @Override public Shader resize..

HTTPS and self-signed certificate issue

http://stackoverflow.com/questions/5947162/https-and-self-signed-certificate-issue

trustStore.load null null SSLSocketFactory sf new CustomSSLSocketFactory trustStore sf.setHostnameVerifier.. SSLSocketFactory sf new CustomSSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER.. 80 registry.register new Scheme https sf 443 Creating thread safe client connection manager ClientConnectionManager..

How can I adb install an apk to multiple connected devices?

http://stackoverflow.com/questions/8610733/how-can-i-adb-install-an-apk-to-multiple-connected-devices

listed. Something like bash adb devices tail n 3 cut sf 1 d xargs iX adb s X install ... Comments suggest this might..

How do I retrieve the data from AsyncTasks doInBackground()?

http://stackoverflow.com/questions/9273989/how-do-i-retrieve-the-data-from-asynctasks-doinbackground

@return the result of whether the login was successful by looking at the response parameter of the JSON object. public.. trustStore.load null null SSLSocketFactory sf new MySSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER.. null SSLSocketFactory sf new MySSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER..

'No peer certificate' error in Android 2.3 but NOT in 4

http://stackoverflow.com/questions/9574870/no-peer-certificate-error-in-android-2-3-but-not-in-4

verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate.. client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER.. SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e And here is the..

How to create a BKS (BouncyCastle) format Java Keystore that contains a client certificate chain

http://stackoverflow.com/questions/4065379/how-to-create-a-bks-bouncycastle-format-java-keystore-that-contains-a-client-c

to the SSLSocketFactory. The factory is responsible for the verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial.. Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e.. ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e How to invoke the above code in your Activity class DefaultHttpClient client..

Apache HttpClient on Android producing CertPathValidatorException (IssuerName != SubjectName)

http://stackoverflow.com/questions/4115101/apache-httpclient-on-android-producing-certpathvalidatorexception-issuername

to the SSLSocketFactory. The factory is responsible for the verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial.. Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e private.. client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e private static void maybeCreateHttpClient Context context if mHttpClient null..

Resizing/Scaling Down Android Widgets (DatePicker and TimePicker)

http://stackoverflow.com/questions/4261527/resizing-scaling-down-android-widgets-datepicker-and-timepicker

is a very bad hack but it should work Create a new view extending LinearLayout and overwrite method getChildStaticTransformation 1 and setStaticTransformationsEnabled explicit to true. In the method getChildStaticTransformation you can manipulate.. work Create a new view extending LinearLayout and overwrite method getChildStaticTransformation 1 and setStaticTransformationsEnabled explicit to true. In the method getChildStaticTransformation you can manipulate the tranformation parameter.. getChildStaticTransformation 1 and setStaticTransformationsEnabled explicit to true. In the method getChildStaticTransformation you can manipulate the tranformation parameter to scale down all the content of your extended LinearLayout. And..

Multi-gradient shapes

http://stackoverflow.com/questions/4381033/multi-gradient-shapes

in Android but I've found a good solution posted here that looks like it'd be a great help ShapeDrawable.ShaderFactory sf new ShapeDrawable.ShaderFactory @Override public Shader resize int width int height LinearGradient lg new LinearGradient.. .55f 1 Shader.TileMode.REPEAT return lg PaintDrawable p new PaintDrawable p.setShape new RectShape p.setShaderFactory sf Basically the int array allows you to select multiple color stops and the following float array defines where those stops.. like this in your onCreate method Button theButton Button findViewById R.id.thebutton ShapeDrawable.ShaderFactory sf new ShapeDrawable.ShaderFactory @Override public Shader resize int width int height LinearGradient lg new LinearGradient..

HTTPS and self-signed certificate issue

http://stackoverflow.com/questions/5947162/https-and-self-signed-certificate-issue

null try KeyStore trustStore KeyStore.getInstance KeyStore.getDefaultType trustStore.load null null SSLSocketFactory sf new CustomSSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER Setting up parameters.. KeyStore.getDefaultType trustStore.load null null SSLSocketFactory sf new CustomSSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER Setting up parameters HttpParams params new BasicHttpParams.. registry.register new Scheme http PlainSocketFactory.getSocketFactory 80 registry.register new Scheme https sf 443 Creating thread safe client connection manager ClientConnectionManager ccm new ThreadSafeClientConnManager params registry..

How can I adb install an apk to multiple connected devices?

http://stackoverflow.com/questions/8610733/how-can-i-adb-install-an-apk-to-multiple-connected-devices

and then run adb s DEVICE_SERIAL_NUM install... for every device listed. Something like bash adb devices tail n 3 cut sf 1 d xargs iX adb s X install ... Comments suggest this might work better for newer versions adb devices tail n 2 cut sf..

How do I retrieve the data from AsyncTasks doInBackground()?

http://stackoverflow.com/questions/9273989/how-do-i-retrieve-the-data-from-asynctasks-doinbackground

boolean connError public int getResponseCode return responseCode @return the result of whether the login was successful by looking at the response parameter of the JSON object. public Boolean DidLoginSucceed Will Crash on socket error return.. try KeyStore trustStore KeyStore.getInstance KeyStore.getDefaultType trustStore.load null null SSLSocketFactory sf new MySSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER HttpParams params.. KeyStore.getDefaultType trustStore.load null null SSLSocketFactory sf new MySSLSocketFactory trustStore sf.setHostnameVerifier SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER HttpParams params new BasicHttpParams HttpProtocolParams.setVersion..

'No peer certificate' error in Android 2.3 but NOT in 4

http://stackoverflow.com/questions/9574870/no-peer-certificate-error-in-android-2-3-but-not-in-4

to the SSLSocketFactory. The factory is responsible for the verification of the server certificate. SSLSocketFactory sf new SSLSocketFactory trusted Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial.. Hostname verification from certificate http hc.apache.org httpcomponents client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e And.. client ga tutorial html connmgmt.html#d4e506 sf.setHostnameVerifier SSLSocketFactory.STRICT_HOSTNAME_VERIFIER return sf catch Exception e throw new AssertionError e And here is the code that instantiates it DefaultHttpClient client new MyHttpClient..