android sharing a text file facebook, twitter, email - android

I need to share a text file (created in my app and stored on the sd card) by using facebook, twitter, email at least.
My question is what would be the easiest way to do this? I need to know where to focus. I have installed the facebook sdk, but still cannot get how to use it to send a txt file.
I will be grateful for any general guidance.
Thank you!

You can add a file to an email as an attachment: Trying to attach a file from SD Card to email
AFAIK Facebook does not allow you to share files. You can post text and images, but not files in general.
Twitter same as 2. above. You can post tweets - text up to 140 chars long. You can also post pictures via TwitPic. But you cant share files in general.
You could upload a file to some file sharing site (you'd need account for that) and then share url via Facebook or Twitter.

Related

Insert digital signature on PDF Android

I am getting the pdf link from serve. I want to get the users digital signature like shown below,
This signature I can capture and save the bitmap.
Now I want to insert this signature to the pdf which is fetched from the server as shown below.
Once user clicks on done, I shold generate updated pdf file with the signature captured from the user.
I did google search on this and found that with PDFBox it can be achieved.
Can anyone let me know how to achieve this with Pdf box or is there any other alternative solution.

Android Online PDF Load - Preview Not available error via Google Doc

The core part of my application is load PDF online and user have access to download it as per their given rights.
The problem I am facing is that I want to load pdf online. After many research I have found that,
There are likely two ways to show pdf online in android:
1) In Web view by loading simple hosted URL
2) By google doc.
But in our case, if we use way (1), the mobile web view does not redirect hosted url of PDF.
And if we use way (2), then there are certain limitations of the google docs regarding the file sizes. (Small pdf it will load like 5 to 10 with size of 1MB)
But after loading PDF with the size of 2 or 3 MB it's also giving me error as "No PREVIEW AVAILABLE" and its continuously giving me this error opening different urls.
So it seems there is still no easy solution for viewing a pdf from url (online without downloading pdf).
The other way to open pdf online is that we can open it in any other third party applications like browser, adobe pdf reader or any kind of pdf viewer application available in the device.
Cons: If we open pdf in browser then it will get downloaded automatically and if we open it in any third party application then they have options to download the pdf.
Please give me some solution to read the PDF online.
And if there are any paid pdf SDK availble which gives functionality of loading pdf online from URL, then please provide information of that too.
Please also suggest me some pdf viewer library for displaying pdf online.
I have used many of the library, but it increases my application's size to 8 to 10 MB.
Thanks in advance.
The suggested primary solution,
Download the file, store it in the app specific folder so users don't have access. For viewers who don't have access rights to download it, you will delete the file as they leave the view. For viewers who have access rights to download it, they will be given an option to copy the file to their SD card (an accessible location) and then you will delete the original file as they leave the view.
For storing in app specific directory to restrict user access,
http://www.grokkingandroid.com/how-to-correctly-store-app-specific-files-in-android/
Also use a library to view the pdf(MUCH SIMPLER), choose an appropriate one from here
https://android-arsenal.com/search?q=pdf
Alternate solution,
If security is a major concern, you can encrypt the pdf file and store it on the server. And decrypt the file when you download it to the device.
For added security, don't store the file as pdf, just store it as a file. Download it as a file. Set type as pdf when you want to access it.
Conclusion,
Data wise, Even if you load it online, the device will consume almost same data as downloading the pdf. (Infact for viewing something online, your device downloads the data and stores it in the cache and you can view it)
Security wise, only a rooted phone will be able to access the file but that too for as long as you have decided to store it.
I suggest you check out PDF.js, a Javascript library from Mozilla to render PDF's in a browser. You can adapt this into a WebView easily, and display PDF's without downloading them.
Here is an open source app which does something similar to what you're looking for

Get live PayPal application_id for android application

I tested my android appication via PayPal Mobile Payment Librarie. I used APP-80W284485P519543T Sandbox AppId.
And now I try get live AppId and create Classic API app. As I understand I must upload my .apk for review. How can I do it? I may upload only
Files must be less than 2 MB. Allowed file types: png pdf jpeg doc jpg
docx.
in create application form.
If it's something they're asking for but their upload form won't accept the file size then you could zip it up and place it on your web server, then provide them with a download link.

Protect the downloaded content from Android

Am developing an offline pdf reader, which will download pdf files from remote and store inside the directory(say Android->data->com.example.test) and it will be shown in my app and i can read both in online and offline.
My issue is, If I open any PDFViewers like Adobe,Radaee viewers I can see my PDF's.
How can i avoid this. I dont want to show them in other apps.
This is not intended behaviour. we can control. Am looking for solution.
Example : Whatsapp's media like albums,profilepictures will be stored in device. We can view it. If you open any external Imageviewers we cant see the Profile Pictures. We can see the Media files. But Profile pics will be hidden. I need the exact solution.
Any help will be much appreciated.
Thanks in advance.
Imran.
Store the PDF on internal storage. You are presently storing the PDF on external storage.

Image share to facebook from android application

In my android application I am able to share text to facebook wall via facebook SDK for android. Can I use this to share images too directly from my application. I wanted the images to be shared from a url given through my application that changes dynamically.Any help please
Visit this link.
The code you have to write will be something like this
bundle.putString("name", "name you want to give");
And similarly you can add another parameters to the image.

Categories

Resources