title: Intent Fail Android Java
body: <p>Greeting everyone, i am an amateur android developer and I want to open an excel file with a button in my app but it just open the excel app but not the file I want to open, I've tried everything but there is something wrong that I did not notice maybe in the manifest or somewhere else.</p>
  
  <p>Here is my code of the mainActivity please help me finding the error.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private Button intentButton;
      private TextView tvContainer;
      private TextView linked;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          intentButton = findViewById(R.id.intentButton);
          tvContainer = findViewById(R.id.tvContainer);
          linked = findViewById(R.id.linked);
  
          intentButton.setOnClickListener(abrirArchvo);
  
      }
  
  
      private View.OnClickListener abrirArchvo = new View.OnClickListener() {
          @Override
          public void onClick(View v)
          {
              Intent sendIntent = new Intent();
              sendIntent.setAction(Intent.ACTION_VIEW);
              String directorioRaiz = Environment.getExternalStorageDirectory().getPath()+"/Excels/2-6.xlsx";
              System.out.println(directorioRaiz);
              Uri uri = Uri.parse(directorioRaiz);
              System.out.println(uri.getPath());
              sendIntent.setDataAndType(uri,"application/vnd.ms-excel");
              String title = getResources().getString(R.string.app_name);
  
              Intent chooser = Intent.createChooser(sendIntent, title);
  
              if (sendIntent.resolveActivity(getPackageManager()) != null) {
                  startActivity(chooser);
  
              }
          }
      };
  
  }
  </code></pre>
  
  <p>This is what debbug console shows as error:</p>
  
  <p><strong>Waiting for application to start debug server</strong></p>
  
  <p><strong>E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@8eec5a3
  E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@cf400a0</strong></p>
  
  <p><strong>E/: APS:IFLoad:importExternalFunctions, search function createNewHwApsUtils failed, dlsym err:undefined symbol: createNewHwApsUtils</strong></p>