지금 제가 예를 들어 A 액티비티가 있는데 여기서 값을 받아 B 액티비티로 넘길려고 합니다

 

예제 소스입니다.

A 액티비티

-----------------------------------------------------

Button show_btn3 = (Button) findViewById(R.id.show_btn3);
  show_btn3.setOnClickListener(new OnClickListener() {
   public void onClick(View v) {
      
       Intent intent = new Intent(SampleLocationGeocodingActivity.this, SampleNavigationActivity.class);
          intent.putExtra("latitude",  35.5389051);
          intent.putExtra("longitude", 129.3116784);
          startActivity(intent);


   }
  });
  

------------------------------------------------------------

 

B 액티비티

 

-----------------------------------------------------------

 Intent intent = this.getIntent();
 
 // #2. Destination Info
 String destName = "울산";
 double destLatitude = intent.getDoubleExtra("latitude", -1);
 double destLongitude = intent.getDoubleExtra("longitude", -1);
 
 ---------------------------------------------------------------

위에서 A를 보시면 좌표값을 임의로 저장해서 버튼을 누르게되면 intent로 B로 값을 넘겨오는 것인데..

액티비티 화면 넘오 오면서 오류창 뜨면서 어플이 꺼지네요..

답변 부탁드립니다.