“No Activity found to handle Intent” while emailing data

前端 未结 5 1033
深忆病人
深忆病人 2020-12-30 23:07

I am trying to mail data using this code:

email = (Button) findViewById(R.id.enail);
    email.setOnClickListener(new View.OnClickListener() {

        publi         


        
5条回答
  •  旧时难觅i
    2020-12-30 23:35

    try to use this for better practice showing a message to the user to setup a mail application.

    try{
    
    // you email code here
    
    } catch (ActivityNotFoundException e) {
    // show message to user
    }
    

提交回复
热议问题