|
|
|
11년 전
|
조회 3,104
|
|
|
|
11년 전
|
조회 2,644
|
|
|
|
11년 전
|
조회 3,295
|
|
|
|
11년 전
|
조회 2,122
|
|
|
|
11년 전
|
조회 3,373
|
|
|
|
11년 전
|
조회 3,779
|
|
|
|
11년 전
|
조회 5,166
|
|
|
|
11년 전
|
조회 6,524
|
|
|
|
11년 전
|
조회 2,862
|
|
|
|
11년 전
|
조회 2,389
|
|
|
|
11년 전
|
조회 2,145
|
|
|
|
11년 전
|
조회 1,827
|
|
|
|
11년 전
|
조회 1,553
|
|
|
|
11년 전
|
조회 1,711
|
|
|
|
11년 전
|
조회 1,653
|
|
|
|
11년 전
|
조회 2,074
|
|
|
|
11년 전
|
조회 2,915
|
|
|
|
11년 전
|
조회 1,549
|
|
|
|
11년 전
|
조회 1,752
|
|
|
관리자
|
11년 전
|
조회 2,398
|
|
|
|
11년 전
|
조회 2,070
|
|
|
|
11년 전
|
조회 2,005
|
|
|
|
11년 전
|
조회 1,911
|
|
|
|
11년 전
|
조회 1,847
|
|
|
|
11년 전
|
조회 4,187
|
|
|
|
11년 전
|
조회 1,798
|
|
|
|
11년 전
|
조회 2,425
|
|
|
|
11년 전
|
조회 2,665
|
|
|
|
11년 전
|
조회 2,001
|
|
|
|
11년 전
|
조회 1,986
|
|
|
|
11년 전
|
조회 1,997
|
|
|
|
11년 전
|
조회 1,456
|
|
|
|
11년 전
|
조회 1,866
|
|
|
|
11년 전
|
조회 2,188
|
|
|
|
11년 전
|
조회 2,129
|
|
|
|
11년 전
|
조회 1,467
|
|
|
|
11년 전
|
조회 1,866
|
|
|
|
11년 전
|
조회 1,654
|
|
|
|
11년 전
|
조회 2,386
|
|
|
|
11년 전
|
조회 2,012
|
|
|
|
11년 전
|
조회 1,400
|
|
|
|
11년 전
|
조회 2,769
|
|
|
|
11년 전
|
조회 7,273
|
|
|
|
11년 전
|
조회 1,908
|
|
|
|
11년 전
|
조회 1,804
|
|
|
|
11년 전
|
조회 1,669
|
|
|
|
11년 전
|
조회 1,576
|
|
|
|
11년 전
|
조회 2,088
|
|
|
|
11년 전
|
조회 1,486
|
|
|
|
11년 전
|
조회 4,061
|
|
|
|
11년 전
|
조회 1,897
|
|
|
|
11년 전
|
조회 2,294
|
|
|
|
11년 전
|
조회 1,672
|
|
|
|
11년 전
|
조회 3,249
|
|
|
|
11년 전
|
조회 1,981
|
|
|
|
11년 전
|
조회 3,239
|
|
|
|
11년 전
|
조회 2,640
|
|
|
|
11년 전
|
조회 3,114
|
|
|
|
11년 전
|
조회 2,100
|
|
|
관리자
|
11년 전
|
조회 3,204
|
|
|
|
11년 전
|
조회 2,037
|
|
|
|
11년 전
|
조회 1,732
|
|
|
|
11년 전
|
조회 1,706
|
|
|
|
11년 전
|
조회 6,071
|
|
|
|
11년 전
|
조회 1,915
|
|
|
|
11년 전
|
조회 1,447
|
|
|
|
11년 전
|
조회 1,387
|
|
|
|
11년 전
|
조회 1,781
|
|
|
|
11년 전
|
조회 2,124
|
|
|
|
11년 전
|
조회 2,560
|
|
|
|
11년 전
|
조회 2,879
|
|
|
관리자
|
11년 전
|
조회 1,759
|
|
|
관리자
|
11년 전
|
조회 2,076
|
|
|
|
11년 전
|
조회 2,005
|
|
|
|
11년 전
|
조회 1,645
|
|
|
|
11년 전
|
조회 1,407
|
|
|
|
11년 전
|
조회 2,831
|
|
|
|
11년 전
|
조회 2,083
|
|
|
|
11년 전
|
조회 3,897
|
|
|
|
11년 전
|
조회 1,841
|
|
|
|
11년 전
|
조회 1,676
|
|
|
|
11년 전
|
조회 2,742
|
|
|
|
11년 전
|
조회 3,404
|
|
|
|
11년 전
|
조회 2,763
|
|
|
|
11년 전
|
조회 3,799
|
|
|
|
11년 전
|
조회 2,211
|
|
|
|
11년 전
|
조회 3,977
|
|
|
|
11년 전
|
조회 1,480
|
|
|
|
11년 전
|
조회 1,767
|
|
|
|
11년 전
|
조회 2,604
|
|
|
|
11년 전
|
조회 2,971
|
|
|
|
11년 전
|
조회 1,599
|
|
|
|
11년 전
|
조회 3,500
|
|
|
|
11년 전
|
조회 3,644
|
|
|
|
11년 전
|
조회 2,226
|
|
|
|
11년 전
|
조회 2,879
|
|
|
|
11년 전
|
조회 1,701
|
|
|
|
11년 전
|
조회 2,060
|
|
|
|
11년 전
|
조회 1,757
|
|
|
|
11년 전
|
조회 2,975
|
댓글 8개
저도 그렇게 생각을 했는데, 앱스토어에서 웹뷰로만 구현된 어플은 통과시켜주지 않는다고 하더라구요.
그래서 불가피하게 폰갭을 이용하려고 합니다.. ㅎ
좋은 예제는 아래서 보실 수 있습니다.
http://catchmayuri.blogspot.com/2012/01/working-with-json-phonegap-application.html
XML 로 연동하는 경우는, 저는 더 어렵게 느껴지네요.
아마 제가 XMLHttpRequest 에 친숙하지 않아서 그렇게 느껴지는 것 같습니다.
아, 폰갭에서 jQuery 로 .load 만 해도 먹힙니다!!!
$('#content').load('http://www.gnuboard.com/index.php');
저는 워드프레스 사용자라서 그냥 워프+폰갭 플러그인을 사용하는 관계로 (앱프레서라고 있습니다.) 어떤 방식이 가장 좋은지 (그러니까 단순히 jQuery 를 이용한 연동이 좋은지, JSON 으로 한번 감싸서 연동해야 하는지) 자세하게는 모르지만, (아마도 단순히 .load 하면 별의별 문제가 다 발생하겠죠? ㅎㅎㅎ 그렇게 쉬울리가 없잖아!!!)
http://apppresser.com/download/
이거 다운받아서 소스코드를 한번 참고삼아 살펴보셔도 좋으실 듯 합니다.
일단 닥즐찾
[code]
package 패키지;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import org.apache.cordova.*;
public class MainActivity extends DroidGap {
final protected static String homeUrl = "file:///android_asset/www/index.html"; // 홈 주소
final protected static String listUrl = "file:///android_asset/www/list.html"; // 리스트 주소
@Override
public void onCreate(Bundle savedInstanceState) {
/*
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
*/
super.onCreate(savedInstanceState);
super.loadUrl(homeUrl);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
// 하드웨어키 제어
public boolean onKeyDown(int keyCode, KeyEvent event) {
// 뒤로가기키로 종료
if( keyCode == KeyEvent.KEYCODE_BACK ) {
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("종료")
.setMessage("종료하시겠습니까?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog, int which ) {
finish();
}
}).setNegativeButton( "No", null ).show();
return true;
}
return super.onKeyDown(keyCode, event);
}
// 하드웨어 메뉴키 메뉴를 설정한다.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, 0, 0, "홈으로");
menu.add(0, 1, 0, "리스트");
menu.add(0, 2, 0, "다음");
menu.add(0, 3, 0, "종료");
return super.onCreateOptionsMenu(menu);
}
// 메뉴에 따른 동작값을 추가한다.
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case 0 :
Toast toast = Toast.makeText(this, "홈으로", Toast.LENGTH_SHORT); // 토스트 띄우기
toast.show(); // 토스트 보여주기
super.loadUrl(homeUrl);
break;
case 1 :
Toast toast_1 = Toast.makeText(this, "리스트", Toast.LENGTH_SHORT); // 토스트 띄우기
toast_1.show(); // 토스트 보여주기
super.loadUrl(listUrl);
break;
case 2 :
Toast toast_2 = Toast.makeText(this, "다음", Toast.LENGTH_SHORT); // 토스트 띄우기
toast_2.show(); // 토스트 보여주기
super.loadUrl("http://m.daum.net");
break;
case 3 :
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("종료")
.setMessage("종료하시겠습니까?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog, int which ) {
finish();
}
}).setNegativeButton( "No", null ).show();
break;
}
return super.onOptionsItemSelected(item);
}
}
[/code]
저같은 경우 외부 홈페이지와 연결이 필요 한경우 homeUrl를 외부 주소로 변경 하여 사용 하곤 한답니다.