기본 콘텐츠로 건너뛰기

5월, 2015의 게시물 표시

javascript callback proxy

function proxyCallback(callback) {       return function (res) {         if (res.status < 200 && res.status >= 300) {           return callback(res.status, res.data.error);         }         return callback(null, res.data);       }     }     function posts_list(callback) {       var req = {         method: 'GET',         url: '/api/1/posts'       };       $http(req).then(proxyCallback(callback));     }

android webview post data

호출 순서 1. javascript 에서 post 할 데이터를 plugin 으로 보낸다. { "username":"홍길동" , "userpassword":"" } 2. 이 데이터를 안드로이드 플러그인에서 string 으로 만든 후 , Json Object 로 보낸다. String postData = "username="+  URLEncoder . encode ( username, "UTF-8" ); String params =  Base64.encodeToString(params.getBytes(), Base64.URL_SAFE); 3.WebView 호출하는데서는 2번에서 암호화 한 값을 풀어서, byte[] 로 보낸다. String tmp = new String(Base64.decode( params , Base64. URL_SAFE )); String url = "http://www.example.com" ; String postData = "username=my_username&password=my_password" ; webview . postUrl ( url , EncodingUtils . getBytes ( postData , "BASE64" )); 위와 같이 보낸다.

ant task email example

ant installjars ant email <?xml version="1.0" encoding="UTF-8"?> <project name="SplashActivity" default="help"> <target description="Generates and send junit test reports" name="email"> <mail mailhost="smtp.gmail.com" enableStartTLS="true" mailport="465" password="*******" ssl="true" subject="1Q Transfer APK" user="kildongp@gmail.com" cclist="labj0812@gmail.com,wanna88@empal.com,amour10@daum.net" > <from address="amour10@finger.co.kr"></from> <replyto address="amour10@finger.co.kr"></replyto> <to address="bongfish@finger.co.kr"></to> <message>1Q 뱅킹이 성공적으로 빌드 되었습니다.</message> <attachments> <fileset dir="./bin"> <include name="**/*debug.a