I'm making a social media app (currently mobile and soon also web) and it concentrates on videos. I've two problems:
1) from the android app, my current design requests for new feeds from a web service --> the server responds with json data that includes the video url and the other feed data (content, date, ... etc) --> then I set the url for the VideoView which will request the video. Now isn't there a better way so that I fetch a full feed with one request (with one request I return the data and the video/audio/image)?
Also after researching online, some say that you use an IntentService to keep fetching new feeds and cash it locally and some say not. what is the best approach for a social network app in the backend.
2) I read online that http streaming is a very bad idea if you expect multiple concurrent requests for the same video/audio (I don't know if this applies for images too), the limit is almost a dozen of requests. how should the backend store and send videos/audio back to the mobile/web app in an efficient way? how does big social network store their data and send back so that the used can have the best experience (I know my app won't have .01% traffic compared to large social media sites, but I'm expecting thousands of users and hundreds of them might request the same video at the same time)? any link for a server (preferably using Java) to do such thing will be appreciated.
so long story short, if someone can help me find a good resource to design a backend for a soical media app, that would be great. and sorry for the long post.
Your approach seems fine if it works for you - you don't need to use the same server for all your content and a typical 'pattern', which may reassure you is:
static content on simple static web hosting or CDN (e.g. Amazon S3 or simple static web server) - this is content which does not change all that often, like pictures, heading text, info text etc
dynamic content on whatever is your favourite flavour of web server/language technology - this is the content that changes per user or frequently over time.
Video and audio hosted on a separate dedicated streaming server, linked to a CDN mostly likely, or on a web hosting service that specialises in video/audio.
The reason for separating the video is that the technology for streaming videos is quite specialist and if you really want to support many devices then you actually need multiple versions of your video to support all browser/device and network bandwidth combinations. If you want to get started quickly a good cloud video hosting service will do the hard work for you here and allow your videos appear without any 'YouTube' like branding/ads etc.
If you want to run your own video server then there are open source options like VideoLan and GStreamer or paid versions like Woza:
http://www.videolan.org/vlc/streaming.html
http://gstreamer.freedesktop.org
http://www.wowza.com/products/streaming-engine
Related
How can I make an online server to access API's and handle requests? Then how can I have my android app access this online server to make requests?
I have an android app that I am building for a school project. This app will need to use multiple APIs to gather information to display to the user. However I don't want to allow people to decompile to source code and take my API keys. My plan is to build an online application that will do all of this work on the server side. This way the user only submits a query and the server sends information in response to their request. This will speed things up for the user and keep the keys from being accessed by other individuals.
Steps I think I need to take.
Set up server to access the API's
Make app access online server through HTTP requests
3....
4...
I have a very general concept in my head, but I'm not sure where to begin. If I'm wrong on any part of this question please correct me.
I do plan on moving this to the app store in the future.
edit: Do you know of tutorials that show the building of the API and then loading it to Amazon AWS or another server?
There are many options when building restful services for api consumption. You could start with php, which is the easiest to start with. Here is a nice tutorial that takes you through the initial stage all the way to the end of building login system for android using mysql and php as the server language. It contains the barebone details of setting up the infrastructure and logic. I think from there you manipulate and go further.
https://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/
check out java rest easy, it is a nice tool to use to build web API's. You can host it for cheap at red shift or amazon using their pay what you use billing.
The cheapest way for you to host your REST API is to use Amazon's API Gateway. You pay for what you use and pay nothing if it is not being used. API Gateway plays very nicely with Amazon's Lambda service that allows you to run discrete code units - again, you only pay for what you use. Lambda itself plays nicely with Amazon's pay-as-you go NoSQL datastores (SimpleDB and DynamoDB).
I am going to develop uber-like application.Here I have to send latitude and longitude to web and mobile devices continuously with my service,What I have do to get this.
Can anyone please give some idea.
You should start by designing how the application is to be used, seen from all the different users perspectives.
For instance is this a web app, or a native app, or both?
Then from that knowledge, you need to define a communication protocol.
You should be able to determine if the client will be polling for data, or if you need to push it from the server onto the clients.
This also goes for the data that travels the other way.
From here you choose a language for programming, and then start doing some proof of concept tests.
The choice will depend on the chosen underlying technologies
(web / native / os / available libraries)
After some test work you may have something that works, then you need to review or add security to the communication, cause we do not want everyone collecting location data from everyone that has the app installed.
Then run beta trials and eliminate the worst bugs, and then release the app.
You'll want some sort of asynchronous task which can get new data from your server and refresh the mobile and web content to reflect the content of the server. You'll also want to notify the server whenever you make local changes to content and want to reflect those changes. Android provides the SyncAdapter pattern as a way to easily solve this pattern. You'll need to register user accounts, and then Android will perform lots of magic for you, and allow you to automatically sync. Here's a good tutorial: http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/
I'm in the process of developing a java web application using Spring MVC that will (among other things) be capable of recording video from a camera on an Android based tablet and ultimately transfer that video to the server (dbase or filesystem). I see there are a number of tools available that might allow me to do this one of two ways: (1) record that video locally in the browser and potentially upload the final product as a single file to the server (i.e. RecordRTC) or (2) establish a connection to the server that enables me to stream the video direct, leaving it to the server side to manage the actual recording (i.e. Kurento, Jitsi). However, there are a few gotchas in all of this that are making it difficult for me to determine (1) which way makes sense and (2) which way is actually proven to work:
must be capable of running in any browser on an Android based tablet (v 4.2+)
recorded video can be anywhere from 15 sec to 15 min in duration
users will be securely authenticated at login via Spring security; video streams/files need to be handled in that established session (which I don't think is possible with Kurento)
must be open source
I've been developing Java web applications for many years now, but the video capture and processing component is something new to me and I'm hoping those with experience in this arena could guide me in a direction that makes most logical sense.
NOTE: I am open to other ideas that might make more sense than what I've mentioned already. Given the direction of HTML5, I thought WebRTC would be the best route. But given some of the Android based browser limitations, I'm not sure.
Thanks!
I am attempting to build an android app and in that app I have a list view, which I would like to have thumbnail images in. The images are stored on a server, and they are all in the same folder (e.g. http://myserverlocation.com/images/dining/myImage1.jpg,myImage2.jpg, etc). What I want to know, is if there is an easy way to get all the images (approx 25) using ONE http request, or connection. What I want to avoid is making 25 http requests, one for each image, to get all the thumbnails. I'm familiar with AsyncTask, and BitMap, but I haven't seen anything on this site (or the internet) that talks about getting multiple images with one call. I was hoping someone here would have an answer for me, as to whether or not this is possible. I'm open to any suggestions on how I might be able to accomplish this task, without using all the phones resources and/or memory.
Thank you!
If you are controlling the web service, I would highly recommended storing a zip file and retrieving that. I believe that Android likes to play with bzip, but that may be wrong.
Either way, I remember reading on the Android Dev site or watching a Google IO talk and they suggested to zip it before you ship it.
i have a wordpress blog hosted over my personal shared hosting.Now i want to develop an android app for that blog so the users can use the mobile app to see what i am writing on my blog.
Like for example you can take mashable.com android app.
so basically i have experience in programming android aap but i am just asking this so i can code it in a better way.
i have 3 idea to do this now:
1.Use rss feed of my blog and parse it and display the contents but it has a issue that rss only display most latest contents.So whether i need to store the feed contents timely on android device so a user can view the previous most content also.
But i think it's not a good idea because it will unnecessarily increase the size of database and make diff copies on every device.
2.Just simply use complete java code to pull data from my web mysql database as per the user request and just display it over the screen without storing it locally on android device.
3.Develop some sort of API solution on my web server then send the data in json or xml format so i can use it on my android device(via java) without bothering to connecting to mysql server as a core part because that part already done by on web server and my api already sending data in required format.
So these are 3 idea i have now.So please suggest me a better one form these three or you can give any other idea.
I am asking this question because previously i never programmed this sort of mobile aap where i need to pull the data from remote server.
-Thanks
You can simply install WordPress Mobile Pack to display Mobile site of your wordpress blog/site
Or
You can check this link to find out other plugins: 11 Ways to Create a Mobile Friendly WordPress Site
Now, If you want to create an app then you can simply implement it by using WebView.