본문 바로가기

전체 글

(101)
안드로이드 카카오스토리 연동 //안드로이드 카카오스토리 연동 예제입니다 private void go_story() {String new_url = "이미지링크 URL을 적어주심됩니다"; Map urlInfoAndroid = new Hashtable(1);urlInfoAndroid.put("title", "제목");urlInfoAndroid.put("desc", "설명");urlInfoAndroid.put("imageurl", new String[] { new_url });urlInfoAndroid.put("type", "article"); StoryLink storyLink = StoryLink.getLink(getApplicationContext()); if (!storyLink.isAvailableIntent()) {return..
안드로이드 네이버 밴드 연동 //안드로이드 네이버 밴드 연동 예제입니다. 밴드는 따로 API를 제공하지 않아서 Intent 로 해줘야 되네요~ protected void go_band() {Intent intent = new Intent(Intent.ACTION_SEND);intent.setType("text/plain");intent.putExtra(Intent.EXTRA_SUBJECT, "공유할내용");intent.putExtra(Intent.EXTRA_TEXT, "공유할내용");intent.setPackage("com.nhn.android.band");startActivity(intent); }
안드로이드 페이스북 연동 //페이스북 아이디 설정 및 라이브러리 가져오는 방법은 아래 링크에 잘 설명되어있습니다 http://jeehun.egloos.com/3998429//페이스북 로그인 후에 바로 글을 남기는 예제입니다. private void facebookLogin(){ Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(Session session, SessionState state, Exception exception) { if (session.isOpened()) { // make request to the /me API Requ..
Naver Map API를 이용한 현재위치 찾기 - 네이버 맵 API를 이용해서 현재 위도 경도를 얻어오고, 위도경도를 주소로 변환하는 방법에 대해서 포스팅합니다.- 네이버 맵 소스안에 다 있는 내용을 그대로 가져온거라서 필요없는 내용도 있습니다.- 네이버 개발자센터에서 지도 API키를 발급받습니다.(구글맵은 키받기가 엄청 복잡한데..네이버는 간편하네요)- public static final String API_KEY 에 발급받은 API키를 넣어주심됩니다.- 네이버 지도 라이브러리 nmaps.jar를 iibs 폴더에 넣어줍니다.- 주소는 동까지만 나오는데요.. 상세한 주소얻는 방법은 없나보네요? ----------------------------------------------------------------------------------------..
AlertDialog.Builder 안에 텍스트 사이즈 조절하기 AlertDialog.Builder 안에 텍스트 사이즈 조절하는 방법입니다. styles.xml ContextThemeWrapper cw = new ContextThemeWrapper( this, R.style.AlertDialogTheme );AlertDialog.Builder b = new AlertDialog.Builder(cw); http://stackoverflow.com/questions/14888832/reducing-font-size-of-alertdialog-builders-components 퍼옴~
R.array 를 스트링 배열로 변환 String mTestArray[] = getResources().getStringArray(R.array.cate_code);
안드로이드에서 강제로 터치 이벤트 발생시키기 long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); MotionEvent down_event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, 0,0, 0); MotionEvent up_event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, 0, 0, 0); yourWidget.dispatchTouchEvent(down_event); yourWidget.dispatchTouchEvent(up_event); http://bestksw.blogspot.kr/201..
Spinner 안에 텍스트 색상지정/정렬방법 - 스피너에 노출되는 텍스트 색상지정 , 텍스트 정렬방법입니다. -------------------------------------------------------------------------------------------------private void setSpinner() {setContentView(R.layout.spinner); Spinner select_distance = (Spinner) findViewById(R.id.select_item);spinnerdapter = ArrayAdapter.createFromResource(AroundMeActivity.this, R.array.distance_array,R.layout.spinner_item);spinnerdapter.setDro..