------

[ AD ] Port Monitor ( Try to use a Best WebSite Monitoring Tool )

------

Archos has android tablets starting from 2.8 to 10.1 the cost of Archos Android Tablet  is very cheaper compared to Apple iPad.
We are just talking about Samsung Galaxy tab, how it can be am  alternative for Apple iPad, now another in the list, Archos 10.1 inches screen Android tablet.

The dream for android fans is coming true, Look and feel of this android tablet is amazing and the specialty about this tablet is the screen size compared to the Apple iPad Screen size of 9 inches , Screen size of Archos  is  10.1 inches with a weight of just 480 games and the thickness of this Android tablet is also very minimum it is only 0-47″ – 12mm thin. 

Archos has given a great android tablet which has lesser weight you can watch HD videos, listen to music and you can hear formats such as mp3 and you can add an accessory called Archos Clipper where you can clip it anywhere in the clothing to control the mp3,  and in addition you can browse through the web,  send emails, chat with your friends, do Voice calling and importantly you can download the wealth of all android applications,  3D games and customize it as your own personal smart phone.

Features of Archos 101 Android Tablet

1. Loaded with Android Froyo 2.2 operating system, with a ARM Cortex A8 at 1 GHz with DSP mobile processor. Why it is called as Archos Froyo.
프로요 2.2 / ARM 1Ghz with DSP

2. Maximum Resolution is 1280 by 720 pixels. Easy to connect external keyboard, and you can have multiple connections.
최소 해상도 1280 x 720 픽셀

3.  Leg stand to watch movies with ease, and it can be adjusted to any position. Two memory slots 8Gb and 16 Gb available for this android tablet.

4.  The big Feature is the screen 10.1 inches helps to view movies or browse through the internet with great joy and comfort.
• Graphic accelerator:

5.  HDMI output facility is available and you can connect your Archos android tablet to TV,  and you can play 3D games  with the help of powerful 3D accelerator(3D OpenGL ES 2.0) .You will control the 3D games from your android tablet and play it in the big screen. You can stream videos to your TV remotely through  Protocols like  Samba and UPnP protocols using Wi-Fi.

6. You can watch movies listen to music from your Archos android tablet, No need to store videos in your smart phone, through Wi-Fi you can play it from your PC.

7. Built in Web cam for live video chats , you can do video chat in big 10.1 inches  screen.

8. Adobe Flash is supported and you can  browse the web through Wi-Fi.

9. As all android tablets you need to have data plan to access the internet anywhere.

10.  The great Features is to download millions of applications from an android market, Play 3d games and much more. You can use any number of apps in Archos android tablet.

if you are traveler Archos is the best companion for you, if  you feel you are out of battery you can add Archos battery dock and enjoy video for an extended time.

Overall this Archos Android tablet can be a great alternative to Apple iPad.

References: Archos.com

'0.일반개발' 카테고리의 다른 글

브라우저 벤치마크  (0) 2010.09.20
Android: 3D tunnel demo with OpenGL ES  (0) 2010.09.18
bit.ly  (0) 2010.09.17
안드로이드 플로요 2.2  (0) 2010.09.17
갤럭시S 프로요 업그레이드  (0) 2010.09.17
bit.ly
public static String getShortUrl(String longurl) {
String shortedUrl = "";
BufferedReader in = null;
try {


List params = new ArrayList();
params.add(new BasicNameValuePair("login",""));
params.add(new BasicNameValuePair("apikey",""));
params.add(new BasicNameValuePair("longUrl","http://"));
params.add(new BasicNameValuePair("format","txt"));
HttpHost host = new HttpHost("api.bit.ly/v3/shorten", -1, HttpHost.DEFAULT_SCHEME_NAME);
URI u = URIUtils.createURI("http","api.bit.ly/v3/shorten", -1,"/v3/shorten" , 
URLEncodedUtils.format(params,"UTF-8"),null);
HttpGet httpget = new HttpGet(u);
//Log.d("Lotto","URL : " + u.toString());
HttpResponse response  = httpclient.execute(host,httpget);


if(response.getStatusLine().getStatusCode() != 200) {


} else {
in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while((line=in.readLine()) != null) {
sb.append(line + NL);
}
in.close();


shortedUrl = sb.toString();


}
}catch(Exception e) {
e.printStackTrace();
}finally  {
if(in != null) {
try {
in.close();
}catch(IOException e) {
e.printStackTrace();
}
}
}
return shortedUrl;
}

 

http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/ko//googlephone/android-userguide_kr.pdf

android-userguide_kr.pdf

 

안드로이드 2.2 프로요 기능 정리

 

안드로이드 2.1 버전 정보:  android-2.1-cdd.pdf

 


http://www.androidpub.com/367810#11


 

성능향상

 

외장 메모리에 애플리케이션 설치

익스체인지 지원 강화

데이터 백업 API, 안드로이드 클라우드 -> 디바이스 메시징 (푸쉬 서비스)

어도비 플래쉬 10.1탑재

편리해진 안드로이드 마켓 앱 설치

아이튠 스트리밍 지원

테터링 & 와이파이 핫스팟 

 

 

 

http://graynote.tistory.com/380

 

구글 I/O 두번째날 키노트에서 발표된 안드로이드 프로요 2.2 기능을 정리하고 약간의 부연 설명을 곁들였습니다.

성능향상

• 웹브라우저 성능향상 - V8엔진을 사용하여 자바스크립트의 구동 속도가 2~3배 빨라졌습니다. 기존에 안드로이드폰 브라우저가 특정 웹페이지에서는 상대적으로 속도 차이가 많이 나는 경우가 JavaScript 때문이어서 웹사이트 만들면서도 JavaScript를 제한적으로 사용했는데 이제 부담없이 자바스크립트를 써도 되겠습니다.

• 자바 실행 속도 향상 - CPU를 많이 쓰는 코드에서 2.1버전보다 2~5배 정도의 속도 향상이 있습니다.

• 메모리 관리 능력 향상 - 메모리를 반환하는 속도가 20배 정도 향상 되었습니다. 적은 메모리를 가진 폰에서도 애플리케이션간의 부드럽고 빠른 전환이 가능해졌습니다. 기존에 작업관리 애플리케이션(태스크킬러)류의 앱의 필요성이 없어질 것 같습니다.



외장 메모리에 애플리케이션 설치

외장메모리에 애플리케이션 설치가 가능해져서 안드로이드 내장 메모리 부족에 대한 논란도 적어질 것으로 예상됩니다. 외장 메모리에 암호화된 공간에 안전하게 저장합니다. 그러나 외장 메모리는 사용자에 의해 제거될 수 있기 때문에 게임과 같이 단기적으로 동작하는 앱들을 저장할때만 적합합니다.

익스체인지 지원 강화

• 향상된 보안 - 장치를 해제하기 위해 숫자나 영문으로 구성된 패스워드를 사용할수 있고, Exchange 관리자는 디바이스별로 패스워드 관리를 강제할 수 있습니다.

• 원격 데이터 삭제 - 익스체인지 관리자는 잃어버리거나 도난당한 폰을 원격에서 공장 출시 상태로 초기화할 수 있어 데이터를 안전하게 보호할 수 있습니다. 사무용 폰에서는 필수적으로 들어가 있어야하는 기능입니다.

• 익스체인지 달력 지원 - 달력 앱에서 익스체인지도 지원합니다.

• 자동 탐색 기능 - 익스체인지를 설정하기 위해서 유저네임과 패스워드만 알면 됩니다. (익스체인지 2007 이상 지원)

주소록 검색 - 이메일 앱에서 수신자의 이름을 전화번호부에 있는 경우 자동 완성 시켜줍니다.

2.2 부터는 기업용으로도 많이 채택될 수 있을 것 같습니다. 기업용 시장에서의 안드로이드 성장도 주목해야할 것 같습니다.

데이터 백업 API 

사용자가 공장 초기화를 하거나 장치를 바꾸려고 데이터를 백업하고 복원시킬때 사용자 데이터를 유지할수 있는 방법을 애플리케이션에 제공합니다. 백업 데이터는 클라우드 공간에 저장되는데 스토리지 서비스 제공자는 장치마다 달라질 수 있다는 것을 유의해야 합니다. 대부분의 큰 제조사는 클라우드 서비스를 직접 제공하고 있으므로 제조사별로 스토리지가 달라질 수 있습니다. 구글이 단독으로 제공하지 않고 개방해둔 영역이므로 제조사가 사용자를 붙들어 둘수 있는 중요한 기능중의 하나로 보입니다. 그만큼 시장 선점이 중요해진다는 뜻이기도 합니다.

안드로이드 클라우드 -> 디바이스 메시징

애플리케이션은 이제 클라우드에서 디바이스로 알림이나 폰으로 전송 양방향 푸쉬 싱크등의 기능을 이용할 수 있습니다. 이제 안드로이드에서도 제대로된 푸쉬 서비스를 사용할 수 있게 됩니다. 

어도비 플래쉬 탑재

플래쉬 10.1이 탑재됩니다. 플래쉬는 안드로이드 플랫폼의 핵심 기능이라고는 할 수 없지만 이번 2.2 릴리즈와 함께 폰들에 탑재될것으로 보입니다.

편리해진 안드로이드 마켓 앱 설치

그동안 PC 웹브라우저에서는 앱 정보를 볼수가 없어서, 앱에 대한 접근성이 떨어진다는 불만이 있었는데 PC 웹브라우저에서 앱을 탐색할 수 있게 되었습니다. PC에서 정보를 탐색하고 폰에서 해당 앱을 검색해서 설치하는 것이 아니라 PC 웹브라우저에서 설치 버튼을 선택하면 폰에서 알아서 앱이 자동 설치됩니다.

아이튠 스트리밍 지원

안드로이드폰은 아이폰에 비해 음악과 같은 멀티미디어의 관리나 사용성이 많이 뒤떨어졌는데, 이제 PC등의 아이튠 서버에 접속해서 음악파일을 스트리밍으로 재생할 수 있는 앱이 추가됩니다. 

테터링 & 와이파이 핫스팟

안드로이드폰의 3G 인터넷 연결 여러 무선랜 사용 디바이스들이 공유할 수 있는 기능이 기본으로 탑재됩니다. KT의 에그나 SKT의 브릿지와 같은 제품들이 하는 기능을 안드로이드폰만 있으면 사용할 수 있게 됩니다.



그래픽

OpenGL 2.0 이 Android SDK상에서도 사용할 수 있습니다. YUV 포맷 변환 기능도 추가되었습니다.

 

 

드디어 구글이 안드로이드 2.2 '프로요'(FROYO)를 공식 발표했습니다. 앞서 나온 소문들은 대부분 사실이었지만, 몇 가지 새로운 소식도 추가되었더군요. 오늘 발표된 구글 안드로이드 2.2 프로요의 특징을 간략하게 정리합니다.

 

사용자 삽입 이미지

성능과 속도 향상

 

발표 이전 안드로이드의 성능이 더 좋아질 것이라는 예상대로 새로운 Dalvik JIT 컴파일러를 내장해 2~5배 성능이 더 좋아졌습니다.

더 빨라진 브라우저

V8 자바 스크립트 엔진으로 안드로이드 웹브라우저를 교체해 자바스크립트 성능을 종전보다 2~3배 더 끌어 올렸습니다.

 

사용자 삽입 이미지

기업 위한 기능 강화

 

일정 싱크와 계정 자동 탐색 등 익스체인지 서버를 쓰는 기업을 위한 기능을 더욱 강화했습니다. 또한 원격 데이터 삭제와 패스워드 길이 제한, 잠금 화면 시간 제한 등 기업의 보안 문제를 제어하는 장치 정책 관리자 API를 허용합니다.

풍부해진 API와 서비스

프로요는 새로운 데이터 백업 API와 디바이스 메시징 등 새로운 API와 서비스가 추가됐습니다. 응용 프로그램을 포함한 데이터를 백업하고 복원할 수 있는 서비스를 개발할 수 있는 장치를 마련했는데, 장치를 초기화하거나 다른 제품으로 바꿀 할 때 유용하게 쓰일 수 있습니다. 또한 자기가 쓰고 있는 클라우드 서비스의 메시지를 안드로이드 장치에 설치된 응용 프로그램으로 보내거나 그 반대로 장치에서 클라우드 서비스로 메시지를 알릴 수 있는 서비스가 포함됩니다. 어디에서나 클라우드 서비스와 안드로이드 모바일 응용 프로그램을 유연하게 쓸 수 있게 될 듯 합니다. 새로운 오픈GL ES 2.0 API와 카메라/캠코더, 미디어와 UI 프레임워크, 응용 프로그램 설치와 관련한 API도 다수 공개됐습니다.

 

사용자 삽입 이미지

USB와 무선 태더링

 

USB와 무선 태더링을 포함했습니다. 무선 랜을 갖춘 노트북이나 기타 장치들이 갖고 있다면 다른 단말기가 없어도 프로요 스마트폰을 USB로 연결하거나 무선 핫스팟을 켜고 곧바로 3G 망을 통한 인터넷을 할 수 있습니다.

플래시 10.1과 AIR 포함

예상대로 플래시 10.1과 AIR가 탑재됐습니다.

업그레이드 편해진 안드로이드 마켓

안드로이드 마켓의 자동 업데이트 기능이 포함됐습니다. 무조건 자동으로 응용 프로그램의 업데이트를 할 수도 있고, 업데이트된 응용 프로그램이 많으면 한꺼번에 업데이트를 할 수도 있습니다.

 

사용자 삽입 이미지

카메라와 갤러리 UI 향상

 

카메라는 왼쪽 메뉴 외에도 확대와 축소, 플래시를 켜고 끄는 반투명의 조작 메뉴가 별도로 표시됩니다. 캠코더로 쓸 때는 MMS와 유투브로 쉽게 보낼 수 있는 크기 조절 버튼이나 LED 플래시를 쓸 수 있는 메뉴로 바뀝니다. 갤러리는 사진을 모은 상태에서 확대와 축소 제스처가 추가됐습니다.

SD 카드에 응용 프로그램 설치

프로요는 SD 카드에 응용 프로그램을 설치할 수 있습니다. 내장 메모리가 부족한 안드로이드 폰들에 숨통이 트일 것 같습니다. 버튼 한번으로 설치 위치를 내장 메모리/외장 메모리로 바꿀 수 있습니다.

 

사용자 삽입 이미지

홈 화면 이용 방법 안내

 

홈 화면을 좀더 쉽게 쓸 수 있는 안내 위젯이 설치됩니다.

HQ 모드 추가한 유투브

유투브에서 동영상을 재생할 때 고화질 모드를 선택할 수 있도록 버튼이 추가됩니다.

블루투스 기능 강화

블루투스를 이용한 기능이 강화됐습니다. 블루투스를 장치를 통해 음성으로 전화를 걸 수 있고, 전화 번호를 공유할 수 있습니다. 또한 자동차나 책상 거치대에서 블루투스를 활성화할 수 있도록 했습니다.

커널 업그레이드

2.6.32 커널로 업그레이드 됐고 장치 램을 256MB를 이상 확장할 수 있습니다.

자잘한 것까지 최대한 정리하려했는데, API 쪽은 생각보다 내용이 많아 여기까지만 정리하렵니다. 
 
안드로이드 2.2는 새로운 하드웨어를 요구하기보다 기능의 최적화와 서비스를 개발하는 데 도움이 되는 요소들을 강화한 것이 돋보입니다. 아마 구글은 이전 버전들이 하드웨어쪽의 요구 사항들을 대부분 반영했다고 본 것 같습니다. 더구나 안드로이드를 얹은 하드웨어 제원이 상당히 좋은 편이라 구글의 입장에서 이 하드웨어의 성능을 최대한 이끌어내 서비스와 응용 프로그램을 만들 수 있도록 기본적인 장치를 마련했다고 볼 수 있습니다.

그나저나 이번 발표를 보면 앞으로 안드로이드 스마트폰 제조사들이 해야 할 일이 늘어났습니다. 기존 버전들이 구글의 서비스를 이용했지만, 프로요는 새로운 구글 서비스를 추가하지 않고 필요한 서비스를 개발할 수 있는 API만 포함했기 때문입니다. 대표적으로 백업 API를 넣었지만, 구글이 백업 서비스를 내놓지 않은 것인데요. 안드로이드 스마트폰 제조사가 프로요를 채택하면 백업 기능을 갖춘 제품을 내놓지 않고는 못배기는 상황이 될 것입니다. 이용자의 응용 프로그램을 자사 서버에 넣어두게끔 함으로써 새로운 장치로 바꿨을 때도 자사 제품을 사도록 만들 수 있기 때문이지요. 기업용 제품 개발도 마찬가지고요. 앞으로 안드로이드 스마트폰 제조사에게 따져 묻는 일이 더욱 많아질 것 같네요.

안드로이드 2.2 프로요가 언제부터 업그레이드될지는 아직 모릅니다. 다만 몇 주 안에 넥서스원이 먼저 2.2로 업그레이드될 것으로 보이는데, 그 때 어떻게 달라지는 지 지켜봐야할 것 같습니다. 다른 스마트폰들은 업그레이드를 준비하는 데에만 최소 3개월 정도 걸린다고 봐야하니 올해 안에는 업그레이드가 진행될 듯 싶네요.


http://developer.android.com/sdk/android-2.2.html

'0.일반개발' 카테고리의 다른 글

Archos 10.1 inches screen Android tablet  (0) 2010.09.18
bit.ly  (0) 2010.09.17
갤럭시S 프로요 업그레이드  (0) 2010.09.17
HTTP 연결 테스트 모듈 만들기  (0) 2010.09.16
안드로이드 HTTP 접근 여러방법들...  (0) 2010.09.16

프로즌 요구르트 / 프로요

http://bit.ly/aTOwnl

삼성전자는 자사 공식 트위터인 ‘삼성투모로우’를 통해 갤럭시A, 갤럭시S 스마트폰의 안드로이드 운영체제(OS) 업그레이드를 10월 중 실시할 계획이라고 16일 밝혔다.
 
삼성전자는 트위터에서 “갤럭시A와 S의 프로요 OS 업그레이드를 위해 최종 작업 중이며 10월 중 제공할 예정”이라면서 “프로요 업그레이드를 통해 반응 속도, 플래시 지원 강화, 구글 서비스 추가 등 여러기능이 개선될 것”이라고 말했다.
 
삼성전자는 당초 9월 중에 업그레이드를 실시할 것으로 알려졌다가 10월 초로 일정이 조정된 것이다.

한편 대만 HTC에서 내놓은 ‘디자이어’의 경우 이미 프로요 버전으로 업그레이드를 제공하고 있고, 팬택(시리우스, 이자르 베가), 모토로라(모토로이), LG전자(옵티머스Q, Z) 등은 4분기 중 업그레이드를 계획하고 있다.

안드로이드 OS 2.2 버전인 프로요는 2.1버전에 비해 응용 프로그램 처리 속도를 2~5배까지 높일 수 있고, 어도비 플래시도 제공된다.

'0.일반개발' 카테고리의 다른 글

bit.ly  (0) 2010.09.17
안드로이드 플로요 2.2  (0) 2010.09.17
HTTP 연결 테스트 모듈 만들기  (0) 2010.09.16
안드로이드 HTTP 접근 여러방법들...  (0) 2010.09.16
애플 에어 프린트 ^^ 와우~~~  (0) 2010.09.16
HTTP 연결 테스트 모듈 만들기
 

입력창 설정
txtHost = (EditText)findViewById(R.id.host);
txtPort = (EditText)findViewById(R.id.port);
txtUrl = (EditText)findViewById(R.id.url);
txtResult = (TextView)findViewById(R.id.content);
버튼 달기
		//액션 버튼
		final Button btnFetch1 = (Button)findViewById(R.id.button1);        
		final Button btnFetch2 = (Button)findViewById(R.id.button2);
		final Button btnFetch3 = (Button)findViewById(R.id.button3);
		
		btnFetch1.setOnClickListener(new Button.OnClickListener(){            
			public void onClick(View v){
				txtResult.setText("");
버튼 클릭 설정 (일부분)
		btnFetch3.setOnClickListener(new Button.OnClickListener(){            
			public void onClick(View v){

				
				mPostAsyncTask =
					new PostAsyncTask().execute(
							txtHost.getText().toString().trim()
							,txtPort.getText().toString().trim()
							,txtUrl.getText().toString().trim()
							);
				//getRequest(txtResult,txtUrl);            
			}        
		}); 
AsyncTask 만들기 (비동기 요청/ 쓰레드 )
    private class PostAsyncTask extends AsyncTask {    	
   	   
    	String resultString=null;
    	HttpHost webhost;
		@Override
		protected void onPreExecute() {
			super.onPreExecute();
		}
		@Override
    	protected Long doInBackground(String... strData) {
    		long totalTimeSpent = 0;
    		int numberOfParams = strData.length;
    		//for(int i=0; i<2; i++) {    			
    			//SystemClock.sleep(1000);
    			//totalTimeSpent += new Long(strData[i]);
    		//}
    		HttpParams httpParameters = new BasicHttpParams(); 
    		
    			
    	    // Set the timeout in milliseconds until a connection is established. 
    	    int timeoutConnection = 3000; 
    	    HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection); 
    	    // Set the default socket timeout (SO_TIMEOUT)  
    	    // in milliseconds which is the timeout for waiting for data. 
    	    int timeoutSocket = 3000; 
    	    HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket); 
    		
    		HttpClient client = new DefaultHttpClient(httpParameters);  

    		webhost = new HttpHost(strData[0],Integer.parseInt(strData[1]) );
    		//HttpGet get = new HttpGet("/list"); 
    		HttpGet request = new HttpGet(strData[2]);  
    		
    		try{            
    			//HttpResponse 서버 연결 주소 포트 
    			response = client.execute(webhost, request);   
    			resultString = HttpHelper.request(response);
    			 
    		} catch(Exception ex){ 
    			resultString = "Failed!";
    			//txtResult.setText("Failed!");
    			Log.d(TAG," PostAsyncTask Exception : "+ ex );
    		}  
    		return totalTimeSpent;
    	}   	
    	@Override
    	protected void onProgressUpdate(Integer... progress) {
    	}
    	protected void onPostExecute(Long result) {
    		// 종료 
    		// End
    		txtResult.setText(resultString);       
    	}
    	@Override
		protected void onCancelled() {
			// TODO Auto-generated method stub
			super.onCancelled();
		}    	
    }  



'0.일반개발' 카테고리의 다른 글

안드로이드 플로요 2.2  (0) 2010.09.17
갤럭시S 프로요 업그레이드  (0) 2010.09.17
안드로이드 HTTP 접근 여러방법들...  (0) 2010.09.16
애플 에어 프린트 ^^ 와우~~~  (0) 2010.09.16
SQLite3  (0) 2010.09.16

안드로이드 플랫폼에서 http 리소스에 접근하는 여러가지 방법

첫번째 :  HttpURLConnection  ( java.net )
( get input  stream / given simple url )

1) basic
private InputStream downloadUrl(String url) {
		HttpURLConnection con = null;
		URL url;
		InputStream is=null;
		try {
			url = new URL(url);
			con = (HttpURLConnection) url.openConnection();
			con.setReadTimeout(10000 /* milliseconds */);
			con.setConnectTimeout(15000 /* milliseconds */);
			con.setRequestMethod("GET");
			con.setDoInput(true);
			con.addRequestProperty("Referer", "http://blog.dahanne.net");
			// Start the query
			con.connect();
			is = con.getInputStream();
		}catch (IOException e) {
                        //handle the exception !
			e.printStackTrace();
		}
		return is;
 
	}

2) post method
private InputStream downloadUrl(String url) {
                InputStream myInputStream =null;
		StringBuilder sb = new StringBuilder();
                //adding some data to send along with the request to the server
		sb.append("name=Anthony");
		URL url;
		try {
			url = new URL(url);
			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			OutputStreamWriter wr = new OutputStreamWriter(conn
					.getOutputStream());
                        // this is were we're adding post data to the request
                        wr.write(sb.toString());
			wr.flush();
			myInputStream = conn.getInputStream();
			wr.close();
		} catch (Exception e) {
                        //handle the exception !
			Log.d(TAG,e.getMessage());
		}
                return myInputStream;
}


두번째 : HttpClinet
( get input stream / given simple url )
1) 더 쉽고 나은 방법!
public static InputStream getInputStreamFromUrl(String url) {
		InputStream content = null;
		try {
			HttpGet httpGet = new HttpGet(url);
			HttpClient httpclient = new DefaultHttpClient();
			// Execute HTTP Get Request
			HttpResponse response = httpclient.execute(httpGet);
			content = response.getEntity().getContent();
                } catch (Exception e) {
			//handle the exception !
		}
		return content;
}

2) post method
public static InputStream getInputStreamFromUrl(String url) {
		InputStream content = null;
		try {
          		HttpClient httpclient = new DefaultHttpClient();
			HttpPost httpPost = new HttpPost(url);
			List nameValuePairs = new ArrayList(1);
                        //this is where you add your data to the post method
                        nameValuePairs.add(new BasicNameValuePair(
			"name", "anthony"));
			httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
			// Execute HTTP Post Request
			HttpResponse response = httpclient.execute(httpPost);
			content = response.getEntity().getContent();
		        return content;
	        }
}

3) reading sending a cookie
retrieve cookies
[...]
Cookie sessionCookie =null;
HttpResponse response = httpclient.execute(httpPost);
Header[] allHeaders = response.getAllHeaders();
CookieOrigin origin = new CookieOrigin(host, port,path, false);
for (Header header : allHeaders) {
			List parse = cookieSpecBase.parse(header, origin);
			for (Cookie cookie : parse) {
				// THE cookie
				if (cookie.getName().equals(COOKIE_I_WAS_LOOKING_FOR)
						&& cookie.getValue() != null && cookie.getValue() != "") {
					sessionCookie = cookie;
				}
			}
}
send a cookie ( w/ request )
HttpPost httpPost = new HttpPost(url);
CookieSpecBase cookieSpecBase = new BrowserCompatSpec();
List cookies = new ArrayList();
cookies.add(sessionCookie);
List cookieHeader = cookieSpecBase.formatCookies(cookies);
// Setting the cookie
httpPost.setHeader(cookieHeader.get(0));

'0.일반개발' 카테고리의 다른 글

갤럭시S 프로요 업그레이드  (0) 2010.09.17
HTTP 연결 테스트 모듈 만들기  (0) 2010.09.16
애플 에어 프린트 ^^ 와우~~~  (0) 2010.09.16
SQLite3  (0) 2010.09.16
XML 파싱 Parsing Parser 파서  (0) 2010.09.16

애플의 무선 프린터 ( 아이패드 , 아이폰 & 아아팟 터치  11월 )

http://www.apple.com/pr/library/2010/09/15airprint.html

Apple’s AirPrint Wireless Printing for iPad, iPhone & iPod touch Coming to Users in November

Available First on HP ePrint Printers

CUPERTINO, California—September 15, 2010—Apple® today announced that it is releasing a beta version of its AirPrint wireless printing for iPad™, iPhone® and iPod touch® to members of Apple’s iOS developer program today, and that AirPrint will be included in the free iOS 4.2 software update in November. AirPrint automatically finds printers on local networks and can print text, photos and graphics to them wirelessly over Wi-Fi without the need to install drivers or download software. HP’s existing and upcoming ePrint enabled printers will be the first to support printing direct from iOS devices.

“AirPrint is Apple’s powerful new printing architecture that matches the simplicity of iOS—no set up, no configuration, no printer drivers and no software to download,” said Philip Schiller, Apple’s senior vice president of Worldwide Product Marketing. “iPad, iPhone and iPod touch users can simply tap to print their documents or photos wirelessly to an HP ePrint printer or to a printer shared on a Mac or PC.”

'0.일반개발' 카테고리의 다른 글

HTTP 연결 테스트 모듈 만들기  (0) 2010.09.16
안드로이드 HTTP 접근 여러방법들...  (0) 2010.09.16
SQLite3  (0) 2010.09.16
XML 파싱 Parsing Parser 파서  (0) 2010.09.16
이클립스 멤버 변수 / 멤버 함수 생성기  (0) 2010.09.16
Insert 360  개의 실행 속도

43737 ms
 
43.737초

Ok, i contacted with Croccy22 and sent me a snippet which worked for me, so i send my code:

This class is called ParsingXML
======================================================================
// 자바 소스
import java.io.InputStream; 
import java.net.URI; 
import java.net.URL; 

import javax.xml.parsers.SAXParser; 
import javax.xml.parsers.SAXParserFactory; 

import org.apache.http.HttpResponse; 
import org.apache.http.auth.AuthScope; 
import org.apache.http.auth.UsernamePasswordCredentials; 
import org.apache.http.client.methods.HttpGet; 
import org.apache.http.impl.client.BasicCredentialsProvider; 
import org.apache.http.impl.client.DefaultHttpClient; 
import org.xml.sax.InputSource; 
import org.xml.sax.XMLReader; 

import android.app.Activity; 
import android.os.Bundle; 
import android.util.Log; 
import android.widget.TextView; 


public class ParsingXML extends Activity { 
      
     private static final String Username = "yourusername"; 
     private static final String Password = "yourpassword"; 
     private final String MY_DEBUG_TAG = "Enter"; 

     /** Called when the activity is first created. */ 
     @Override 
     public void onCreate(Bundle icicle) { 
          super.onCreate(icicle); 

          /* Create a new TextView to display the parsingresult later. */ 
          TextView tv = new TextView(this); 
          
          //Start the XML Parsing 
                    try { 
                         //First create defaulthttpclient 
                         DefaultHttpClient http = new DefaultHttpClient(); 
                         //Create credentials for basic auth 
                         UsernamePasswordCredentials c = new UsernamePasswordCredentials(Username,Password); 
                         //create a basic credentials provider and pass the credentials 
                         BasicCredentialsProvider cP = new BasicCredentialsProvider(); 
                         cP.setCredentials(AuthScope.ANY, c ); 
                         //Set credentials provider for our default http client so it will use those credentials 
                         http.setCredentialsProvider(cP); 
                         //get what we want from the target site 
                         HttpResponse res = http.execute(new HttpGet("http://your_target_site.com/1.xml")); 
                         InputStream is =res.getEntity().getContent(); 
                         //Create a SAXParser to parse the XML file 
                         SAXParserFactory spf =SAXParserFactory.newInstance(); 
                         SAXParser sp = spf.newSAXParser(); 
                         XMLReader xr = sp.getXMLReader(); 
                         //Set a handler to parse the XML 
                         ExampleHandler myExampleHandler = new ExampleHandler(); 
                         xr.setContentHandler(myExampleHandler); 
                         xr.parse(new InputSource(is)); 
                         //Retrieve result from the parser 
                         ParsedExampleDataSet parsedExampleDataSet = myExampleHandler.getParsedData(); 
                          
                         // Set the result to be displayed in our GUI. */ 
                         tv.setText(parsedExampleDataSet.toString()); 
                
          } 
                    catch (Exception e) { 
               /* Display any Error to the GUI. */ 
               tv.setText("Error: " + e.getMessage()); 
               Log.e(MY_DEBUG_TAG, "WeatherQueryError", e); 
          } 
          /* Display the TextView. */ 
          this.setContentView(tv); 
     } 
}

======================================================================
Here's another class called ExampleHandler
import org.xml.sax.Attributes; 
import org.xml.sax.SAXException; 
import org.xml.sax.helpers.DefaultHandler; 


public class ExampleHandler extends DefaultHandler{ 

     // =========================================================== 
     // Fields 
     // =========================================================== 
      
     private boolean in_outertag = false; 
     private boolean in_innertag = false; 
     private boolean in_first_name = false; 
     private boolean in_last_name = false; 
     private boolean in_bio = false; 

      
     private ParsedExampleDataSet myParsedExampleDataSet = new ParsedExampleDataSet(); 

     // =========================================================== 
     // Getter & Setter 
     // =========================================================== 

     public ParsedExampleDataSet getParsedData() { 
          return this.myParsedExampleDataSet; 
     } 
      

     // =========================================================== 
     // Methods 
     // =========================================================== 
     @Override 
     public void startDocument() throws SAXException { 
          this.myParsedExampleDataSet = new ParsedExampleDataSet(); 
     } 

     @Override 
     public void endDocument() throws SAXException { 
          // Nothing to do 
     } 

     /** Gets be called on opening tags like: 
      *  
      * Can provide attribute(s), when xml was like: 
      * */ 
     @Override 
     public void startElement(String namespaceURI, String localName, 
               String qName, Attributes atts) throws SAXException { 
          if (localName.equals("users")) { 
               this.in_outertag = true; 
          }else  if (localName.equals("user")) { 
               this.in_innertag = true; 
          }else if (localName.equals("first-name")) { 
               this.in_first_name = true; 
          }else if (localName.equals("last-name")) { 
                   this.in_last_name = true; 
          }else if (localName.equals("bio")) { 
                       this.in_bio = true;   
  
          } 
     } 
      
     /** Gets be called on closing tags like: 
      *  */ 
     @Override 
     public void endElement(String namespaceURI, String localName, String qName) 
               throws SAXException { 
         if (localName.equals("users")) { 
               this.in_outertag = false; 
          }else if (localName.equals("user")) { 
               this.in_innertag = false; 
          }else if (localName.equals("first-name")) { 
               this.in_first_name = false; 
          }else if (localName.equals("last-name")) { 
              this.in_last_name = false; 
          }else if (localName.equals("bio")) { 
              this.in_bio = false; 
                
          }   
     } 
      
     /** Gets be called on the following structure: 
      * characters */ 
     @Override 
    public void characters(char ch[], int start, int length) { 
          if(this.in_first_name){ 
            myParsedExampleDataSet.setExtractedString(new String(ch, start, length));           } 
    
     if(this.in_last_name){ 
       myParsedExampleDataSet.setExtractedString1(new String(ch, start, length));           } 

     if(this.in_bio){ 
       myParsedExampleDataSet.setExtractedString2(new String(ch, start, length));           } 
} 
      
}


======================================================================
And finally the class ParsedExampleDataSet
public class ParsedExampleDataSet { 
     private String extractedString = null; 
     private String extractedString1 = null; 
     private String extractedString2 = null; 

     private int extractedInt = 0; 

     public void setExtractedString(String extractedString) { 
         this.extractedString = extractedString; 
    } 
     public String getExtractedString() { 
          return extractedString; 
     } 
      
     public void setExtractedString1(String extractedString1) { 
         this.extractedString1 = extractedString1; 
    } 
      
     public String getExtractedString1() { 
         return extractedString1; 
    } 
      
     public void setExtractedString2(String extractedString2) { 
         this.extractedString2 = extractedString2; 
    } 

     public String getExtractedString2() { 
         return extractedString2; 
    } 
      
     public void setExtractedInt(int extractedInt) { 
         this.extractedInt = extractedInt; 
    } 
     public int getExtractedInt() { 
          return extractedInt; 
     } 
    
      
     public String toString(){ 
          //return "ExtractedString = " + this.extractedString 
                //    + "\nExtractedInt = " + this.extractedInt; 
          
          return "Nombre : " + this.extractedString + "\n" + "Apellido : " + this.extractedString1 + "\n" + "Biografia : " + this.extractedString2; 
          
     } 
} 


Also i would like to thank you to padde, and plusminus, because they are so attentive with the community, that's why Anddev.org is the most important Android Community of the World.
private 변수 설정후에

메뉴에서 Source - > Generate Getters and Setters

또는 Alt + S - > Generate Getters and Setters


다음같은 화면이 뜬다..


디폴트 public의 멤버 함수들이 코드가 생성된다.

항상 즐거운...코딩 되세요..

'0.일반개발' 카테고리의 다른 글

SQLite3  (0) 2010.09.16
XML 파싱 Parsing Parser 파서  (0) 2010.09.16
Asynchronously fetching images from Internet in Android  (0) 2010.09.16
안드로이드 ( 내부 layout 모듈 xml )  (0) 2010.09.16
EditText  (0) 2010.09.15

+ Recent posts