0

My project has features to export and import csv file into my application

I have successfully completed export csv file into gmail. I can see the attached file in my gmail inbox.

-Now I want to import the file to my app . On click I need to launch my app and in my second activity I need to perform read from the csv file and add the contents to db.

I wish to ask 2 ways of achieving it.

  1. Is it possible to long press the attachment csv file in my gmail inbox and show my app in the launch list. ( like in IOS ).

  2. If its not possible, then i will download the csv file to my storage. Then from the File Manager folder, I want to use long press -> share via feature.

I want to show my app in the share via feature list.

Upon click , it will launch my app and in my second activity I need to add the implementation of reading the csv file contents row by row and adding to DB.

Let me know how to achieve either 1 or 2 options.

I tried settings action send and category default with mimetype text/csv. But i cannot see my app in the launcher list.

Community
  • 1
  • 1
Sunil
  • 521
  • 1
  • 7
  • 24

1 Answers1

1

There is your answer: https://stackoverflow.com/a/5097734/3703819

use pathPattern: ".*\\.csv"

Community
  • 1
  • 1
dey
  • 3,022
  • 1
  • 15
  • 25