Im making an app that will have articles, an article can have text, image, youtube, soundcloud etc.
I want to be able to do that easy and without a lot of code like having to copy and paste the url.
Im thinking this approach:
Having the app to use a Parse.com Server
set the App database to something like this: article id, title,
category, text, image-1, image-2, youtube-1, youtube-2, soundcloud-1 etc
and display the article in this way:
upload the image youtube url etx to the server and then in the text field use placeholder to display my rich media.
For example this text:
[image-1]Hello world [youtube-1]
Will be converted on the fly to a relative layout that will have first an Imageview, below the imageview a Textview, below the textview, a youtube video.
Is this the best way to do what i want? is another better way to do something like this?
WebView and Wordpress is the way to go after a research.
Now that Wordpress has REST API you have a superb writer and a blog for your sites and you can fetch them. I really think is the best and simpler solution.
Related
Good day.I want to create an share field like facebook.In the facebook if you insert an link it will automatically get the lets say 'short preview' of your link with an title and image.I dont think that facebook got in touch with whole wordls website databses so it gather them from databases but rather parsing the url somehow.Anyway lets imagine i have an edittext with user letting input some ulr.How can i achieve this kind of technique?By googling i did not find anything closer to what i want.
Facebook downloads the url and displays the title in the header and a few lines of text. A prominent image on the page if it finds one. You'd have to do something similar- download the url, parse the html, and grab enough info to make your preview.
Most of the websites have og(Open Graph) tags in them. Check out the Facebook Open Graphs Website to understand more about these tags. You can fetch data corresponding to these tags and that is what most social media sites and WhatsApp do to provide a preview.
I'm developing a gallery app and I want it to be compatible with the Chromecast.
I searched and tried for days but I can't get it to work. I learned that I need to create a webserver (NanoHTTPD) and send the url of the image. Can someone show me a simple tutorial?
If I have the path of the image, how can I display it in the simplest way possible?
Thank you!
There is plenty of examples and resources that show you how to cast a video, so familiarize yourself with that. Then, for sending an image, you need to follow the same steps but your MediaInfo object that represents your item (image in this case) needs to have its URL set to the url of the image, served by your embedded server (for example, if you put that url in your web browser on your laptop on the same network, you should be able to see the image). Then load that media item the same way you would load a video. For the simplest solution, you can use the default receiver; it supports images.
I have been searching for a way to create a share function that share an image and text in the same time and the answers i found is that WhatsApp can only share a single text or single image or single audio .. but in another hand i found that YouTube application is able to share text and image in the same time and in one message box as shown below:
So is anyone have an idea of how to do this?!.
And thank you in advance.
WhatsApp actually recognize this link as a youtube link and gets the preview image of the video from youtube.
WhatsApp and youtube probably made an arrangement between them, when WhatsApp recognize
a youtube link it request the image from youtube servers and gets it.
You can see that if you take only the link and send it, the image will be added by WhatsApp.
unfortunately there is no way (that i know off) to share both an image and a text in WhatsApp.
Regards,
Gili
Checking the answer from Gili, what I found out is the link that YouTube share has the follow format in the Extra Text:
https://youtu.be/prkQ6QFv-_Y
So, it is quite easy to parse it and by using the YouTube API for Java, it is possible to retrieve almost all the possible information about that video and build your own layout.
Link one: How to register your app for YouTube to share the text and
capture it:
http://developer.android.com/training/sharing/receive.html
Link two: YouTube Data API for Java
https://developers.google.com/api-client-library/java/apis/youtube/v3
What I am not sure if all the version of YouTube shared text has the same format or not.
I have a ebook single HTML page having text, video and audios, which I want to display as book pages able to slide left & right to view the previous page and next page respectively.
How do I slice the data to show for a particular page for both
orientations ?
I am trying to use WebView for it. Any other possible options?
Is HTML is a best way to store the content? Other options?
Well if you want to make an ebook reader you have to consider that the user may not be connected always to internet, so a web view implementation might cause frustration.
My advice is to go for a native version that download the text/images and act like a real text book reader. Maybe with android animation you can create effects and a nice look :)
Good luck,
Arkde
I am retrying to retreive just the text and the image from this wiki page.
http://en.wikipedia.org/wiki/Where_the_Red_Fern_Grows
I will have a news feed, and when i item is clicked the url will be fetched. Intead of going to a the webpage through the browser, i would like to get the text and images and feed them into a textview and imageviews.
You have a couple of options.
Host a intermediary site that parses the link and passes back the data you want.
Get all of the page, and parse on the device.
Obviously parsing a huge page on the device will be far slower than parsing it on a webserver and serving just what you need.
Of course, if you are really in need of just the text and image, there is some help by using the mobile version of Wikipedia:
http://mobile.wikipedia.org
OR
http://en.m.wikipedia.org
The "mobile" version splits pages up and contains no graphics, but the "m" version is probably more along the lines of what you are looking for.
Here is the formatted page for "Where The Red Fern Grows":
http://en.m.wikipedia.org/wiki/Where_the_Red_Fern_Grows