Email attachment open in application? - android

I am not sure whether it is applicable or not in an Android?
I had received an email with an attached .CSV file...Now when I will click on that attachment then It could give me an option to open this attachment in xyz application..I want to implement this only on .csv attached file.
Please give me some hint that Is it possible ??
Thanks..

If it's your app, I believe you just have to associate that file type with the app using the Android manifest. See this question for details:
Android intent filter: associate app with file extension

As the #Ken Fehling suggested, you must approach this way.What actually gonna happen by this is, when you click on the attchment after its downloaded, Android OS will ask you and give a option containing all the apps that can open .csv file.Now as you have mentioned the mime type or android:pathPattern in your app, the option list will contain the name of your app too.

Related

Corona sdk app - can it accept a file from outside the app?

I have an app that reads some CSV data from a file in the DocumentsDirectory but I would like to be able to read similar data into the app via an email attachment or by feeding it to the app on start up. I know I can use iCloud, Box or other sharing schemes but I'd like to select the attachment in an email and open the attachment with my app. I'm not sure my intended users would have iCloud or such access points.
Due to security reason, this may not be possible. Your file should be in Resources or Documents directory.
But, you may be able to update data from csv by loading it from a web server. The user may click on a "Update button" to get the new content.

how to use Gmail attachment in our Application?

May be I am not express what I need but here is my effort. please correct me If I am going in the wrong way
I got an email and there is an attachment. When I long pressed on it and release. I got below pop-up
So, My Query is :
How can access this attachment in my Application through Giving permission.
In iOS there is way that is :
You can give permission of file extension in the application . If the extension name is present in the download file, you app icon will be display and you can use that extension file into your app.
Please give me some direction to do this thing.

Share pdf file via my application on android

Hi I have to develop an application which should enable sharing of pdf files. I have to create a service wich puts my application as default for .PDF file sharing. As you can see on the picture I can share the pdf via bluetooth/Gmail/Drive...etc. I need to put there my application to. How can it be done? thanks :)
http://www.vogella.com/articles/AndroidIntent/article.html
Go here, then check
4.3. Example: Register an activity for the share intent
You need to register it as a reciever for the SEND action. An example is given here. The mime type for pdf is 'application/pdf'.
I think you cannot force that, its totally on android system, thats why it pushes for a chooser with all the apps that has registered themselves as handler for specified data type, following which user can mark it as default or not.

How to write an Android share "plugin"?

I want to add my app into the share dialog in Android.
So that the user can select an image and "share" it with my application,
which would do some modifications before emailing it.
Any ideas how to where to start?
You need to add an intent-filter to your application manifest, that allows it to handle objects of the MIME type image/jpeg.
Your application then receives a Uri to the file, and you can use that Uri to modify the image, as requested.
There's a lot about it on the Android developer site, including code samples:
http://developer.android.com/guide/topics/intents/intents-filters.html

How to list the data types that android application operates with?

In the scenario that I made up a user chooses an application and and I offer him/her the available pieces of data to operate on.
For example:
if the user chooses to open a pdf reader application - I want to offer him the available .pdf files?
or if the user select some music player I want to offer him the music files he/she has stored.
I agree that it is a strange use-case, but I got pretty curious about it.
I know that the possible data type for an application is specified in its manifest file and I suppose that this information is available, but I have some difficulty finding out what the data content type for application is?
I'm not sure exactly what you mean by data content type for an application.
Applications are released as APKs.
When you wish to open up a pdf or other type of file a broadcast is sent to the system.
In this broadcast is an intent and that intent stores the action and the data type of its content (including the content or path to it).
The system then looks through all the IntentFilters for an application that claims it can perform the given action on the given data type. If there are several it than asks you to store the preference.
On the other hand, if you are trying to find all the pdf files, than you don't you scan the storage to all files ending in .pdf
Does this answer your questions?
Nope, :) not at all.
I'm aware of how android handles a requiest for opening a particular file.
What I want is exactly vice-versa!
For example
- the user says I want to open MyPDFReader app.
and I ask him/ her:
- ok - you have one.pdf and two.pdf available - would you like to open some of them with MyPDFReader, or you will start it without pre-selected pdf file?
and that information I'll put in the intent to call MyPDFReader.
But before I offer files for opening to the user - I have to know which (what type of) files to seek for, because it would be inappropriate to ask the user whether he/she would like to start their PDF reader app with an .mp3 file
in fewer words - Is it possible to find what is the content data type that an application can start with and if you, friends, please - can you give me a clue how to sort it (the content data type) out?

Categories

Resources