how to use Gmail attachment in our Application? - android

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.

Related

Can I open file for edit in default app and get signal/result after editing?

Can I open file for edit in default app and get signal/result after editing?
I know about intents but how I get signal about that edit canceled from another program?
Can I open file for edit in default app and get signal/result after editing?
Not generally. You are welcome to contact the developers of editor apps and see if they have some API that would allow third-party apps, like yours, to request that app allow the user to edit some content, then let you know when the editing is complete.

Code an app to detect a specific location through input of zipcode?

I am trying to develop a component of an app in Android Studio where it allows the user to input their zip code and the app will automatically determine the city and state, instead of having the user type it all in. With this information the app will help connect other users of the app in the same location. I don't want a map to show like a gps. Just have the app be able to recognize the zip codes and specify where the user lives.
Ex: If user typed 90210 and the app would convert it and identify it as Beverly Hills, CA.
If someone could help on how to code this I would greatly appreciate it!
You can use google maps API to get the information you want.
For Example: http://maps.googleapis.com/maps/api/geocode/json?address=94087
Please refer to this page for more documentation: https://developers.google.com/maps/documentation/geocoding/intro

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.

Email attachment open in application?

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.

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

Categories

Resources