마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

푸시 메시지 클릭후 특정 페이지로 이동시키는 방법질문드립니다... [closed]

0 추천

안녕하세요.

웹뷰로 개발되어있구요.

현재는 푸시에서 "접수"라는 버튼을 클릭하면 MainActivity.class 를 실행시켜 index.php 를 실행하는데요.

"접수"버튼을 눌렀을땐 예를 들어 test.php 를 실행 시키고 싶을땐 어떤걸 알아야 하는지 궁굼하여 질문드립니다...

 

프로그램은 현재 이렇게 되어있습니다.

 

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
		System.out.println("showmsg");
		// -----------------------------------------------------------------------------
		// 이 부분이 바로 화면을 깨우는 부분 되시겠다.
		// 화면이 잠겨있을 때 보여주기
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
		// 키잠금 해제하기
				| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
				// 화면 켜기
				| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
		// -----------------------------------------------------------------------------

		String title;
		Bundle bun = getIntent().getExtras();
		String msg = getIntent().getExtras().getString("msg"); 
		final String url = getIntent().getExtras().getString("url"); 
		
		title = "pos 메시지";
		System.out.println("push_showmsg==============>"+msg);
		System.out.println("push_showmsg==========url====>"+url);
		Log.d("showmag 실행~~", "");
		AlertDialog.Builder alertDialog = new AlertDialog.Builder(showMsg.this);

		
		alertDialog.setNegativeButton("접수",
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int which) {

						Intent intent = new Intent();
		            	String reg_chk = "Y";
		            	intent.setClass(showMsg.this, MainActivity.class);
		            	startActivity(intent);
		            	
		            	PushWakeLock.releaseCpuLock();
		                showMsg.this.finish();
					}
				});

		
		alertDialog.setPositiveButton("취소",
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int which) {
						PushWakeLock.releaseCpuLock();
						showMsg.this.finish();
					}
				});

		
		alertDialog.setTitle(title);
		alertDialog.setMessage(msg);
		alertDialog.setIcon(R.drawable.ic_launcher);
		alertDialog.show();
 
    }

 

감사합니다.

질문을 종료한 이유: 해결했습니다..
꾸우우 (1,140 포인트) 님이 2015년 10월 7일 질문
꾸우우님이 2015년 10월 7일 closed
...