안드로이드 앱에서 Google Custom Search 사용하기

API key 구하기

access https://console.developers.google.com/iam-admin/projects

create new project

add API Custom Search and enable it

go to credentials – select from android

click What credential do I need

create API key – name it – write it down, example of such key:

 

— Create Custom Search Engine

access https://cse.google.com/cse/all

create new search engine.

add search sites, name it

under edit engine – Setup – get Search Engine ID, write it down, example of such id: 22222

—–Download and modify code

String key – replace it with your API key

String cx – replace it with you Custom Search Engine ID

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다