I am looking to create a digital business card application on Android Studio.How do I create a shareable link for the final layout file that lets the user view the card on a browser or on the app itself?
Asked
Active
Viewed 36 times
0
-
Why not share it as an image? – Lalit Fauzdar Jul 07 '20 at 18:17
-
Because the layout will have hyperlinks to the user's social media – chhabraRhea Jul 07 '20 at 18:21
-
You can create some code snippet to create an embedded post like Facebook or Twitter but that needs access to webpage editor. Or, you can share it as a PDF as PDF does contain clickable links. – Lalit Fauzdar Jul 07 '20 at 18:26
-
I did find the PDF idea interesting but the tools I found online for converting the XML to PDF convert the file first into an image only. – chhabraRhea Jul 08 '20 at 06:42
-
You can't convert XML to PDF because you can access the layout but not the code. You can surely take a screenshot of the layout and then add this image and hyperlinks in the PDF, check [this answer](https://stackoverflow.com/questions/17232687/create-hyperlink-in-dynamic-pdf-using-itext-in-android). But this way, you have to design the PDF structure by yourself, your layout screenshot won't be clickable, clickable will be the text other than the image.. – Lalit Fauzdar Jul 08 '20 at 07:01
-
Will using XSLT to convert xml to html file and uploading the file to firebase work? – chhabraRhea Jul 08 '20 at 08:47
-
That's what I meant by code snippet to create an embedded post because you can't access your layout's code but you can either create a raw XML layout/ XSL asset beforehand or can create a string resource as a code snippet in Java. Problem with XSLT is you can't parse an actual layout in which user enters data and the one it parses (the raw one) can't be edited to put values AFAIK. Check [this](https://stackoverflow.com/questions/16318998/how-to-transform-xml-with-xslt-and-display-it-in-android-webview) for example. – Lalit Fauzdar Jul 08 '20 at 09:27
-
I still stand with what I said, either create a code snippet or a design a PDF with layout's screenshot. See, [this](https://www.youtube.com/watch?v=KU8q7ZS86WA) as an example and put the links as Facebook : Link, Twitter : Link anywhere in the layout. – Lalit Fauzdar Jul 08 '20 at 09:30
-
1I'll look into it.Thanks for all your help! – chhabraRhea Jul 08 '20 at 10:30