package hb.com.adt0312;

import android.app.Activity;
import android.content.Intent;
import android.media.audiofx.BassBoost;
import android.net.Uri;
import android.provider.Settings;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }//end

    public void move(View v){
     int id=v.getId();
     if(id==R.id.btn1){//text
        Intent it1=new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:01091676063"));
        it1.putExtra("sms_body", "tamtam Android");

        startActivity(it1);
     }else if(id==R.id.btn2){//email
         Intent it2=new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:posasi2000@naver.com"));
         it2.putExtra(Intent.EXTRA_SUBJECT, "MailTest Young");

         it2.putExtra(Intent.EXTRA_TEXT, "Double Coffee Soju");
         startActivity(it2);
     }else if(id==R.id.btn3){//setting
         Intent it3=new Intent(Settings.ACTION_SETTINGS);
         startActivity(it3);
     }else if(id==R.id.btn4){//web브라우저
         Intent it4=new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.naver.com" ));
         startActivity(it4);
     }else{ }
    }//end
}//class END

'앱프로그래밍 > android' 카테고리의 다른 글

android UI 오픈소스  (0) 2019.06.04
안드로이드 앱 아이콘 변경하기  (0) 2019.04.16
android thread  (0) 2016.03.07
android 채팅  (0) 2016.03.07
android 3/3수업  (0) 2016.03.03
by 메렁키키 2016. 3. 10. 20:32