How can different android apps work together? - android

In games like Oblivion there is a thriving 3rd party mod/plugin world. You can get mods for practically every aspect of the game.
How could I write an android game so that I could support additional content written by 3rd parties (which they could charge for in the app store)?
Basically there'd have to be someplace that mods registered their existence and the game would have to check it and then somehow either load data from them (for purely data based add-ons) or execute them (for behavior changing add-ons).
To start with I think I'd mostly be interested in having add-ons which are data (it'd be safest), but I'd like to keep an eye toward executable add-ons.

In a sense you could have all your addons be data addons.
Consider if you wanted to add a new area in Oblivion. You could define a terrain dataset, some static objects as a dataset (trees, rocks, etc), connections as a dataset (doors to houses).
The easiest way is to make your engine just an engine, and the 'game' itself just an addon that you distribute with your engine. Your game is nothing more than a well tested, well thought out dataset.
It gets more difficult when you want to simulate something like a trading card game. Any special mechanics on cards would be limited by what calls you have available in your API. But, depending on how much you open up, the community at large will come up with excellent things!

Related

What type of service to use for video hosting in an android app?

I am currently working on an android application for a start-up business.
Part of my android app provides viewing and download of video files similar to a podcast app, having both by-network viewing as well local storage capabilities for offline viewing.
However, I need to acquire a service/server that provides the hosting and public sharing capabilities that this process requires.
The usage type is pretty simple. I need to host the videos (of which there are not a considerably large amount) somehow, and somehow access them through direct link in my app.
What kinds of business solution would best serve this type of arrangement?
I've looked into Amazon S3, Microsoft Azure, Rackspace and B2 and these seem like the ideal solutions, but I'm not clear as to whether these are commonly used for such purposes. In addition, Backend as a Service platforms like Kinvey and Parse exist, as well as Vzaar, a video hosting business solution.
With so many different systems and unclear use cases it's hard to tell what would be most cost-effective.
What type of system is common practice to use for this type of arrangement?
Do I need a BaaS, a PaaS, or a CDN? Or would something like Amazon S3 work for this arrangement? Or would it be better of trying to find a way to host these videos through the company Wix website?
I'm not necessarily looking for a "use this" type answer, but more I need the right direction to compare and contrast services.
Note: This isn't a strictly programming question, rather an implementation one. I wasn't sure where on SO to place this, given that many similar questions exist concerning implementation and use of these types of services on the main SO.
Hosting and serving videos is quite a specialist domain - the files are large typically, and most decent video streaming servers will include mechanisms to adjust to quality level depending on the bandwidth available to the client.
The technique used to do this is called adaptive bit rate streaming - essentially multiple different quality levels copies of the video are created and broken into, for example, 10 second chunks. The client requests the video one chunk at a time and can switch between quality levels, and hence size, depending on the current network conditions. Hopefully, this give some feel for the complexity levels.
Because of this, you are often best using a dedicated streaming server - you can either set one up yourself or use a hosted service.
Examples, free and commercial, of streaming servers you can host yourself:
https://www.wowza.com
https://gstreamer.freedesktop.org
And examples of hosted video servers (there are many more...):
https://vimeo.com/
http://wistia.com/
First of all let's be clear: I work at vzaar, so I have both personal experience and bias. Make of that what you will.
Above all else I'd encourage trying the various SaaS options out - almost all of them have a free trial and there should be people on hand to answer any questions then and there.
In the application you're describing, we'd effectively fill the role of both a storage and CDN provider, giving you file hosting space and CDN backed global delivery without the need to set up and manage those aspects yourself.
Another function that's often not considered is video encoding. If your videos are already small, efficient, widely compatible files then that's great. If not, a SaaS platform will generally encode them for you. In the long run this can save huge amounts on both storage and bandwidth costs as well as ensuring the best possible device compatibility.
Most vzaar users are using our built in player embedded into their web page via an iFrame. This works fine in many cases, but for apps like you're describing we mostly see people use the video asset links we provide: simple URLs for the video file as well as thumbnails and the like. Backed by a REST API this provides quite a bit of flexibility.
All in all, a SaaS platform is a pretty common approach for the type of thing you're talking about and I'd strongly recommend giving those that interest you a spin. Of course, if you have any questions about vzaar specifically we're more than happy to answer them over at https://vzaar.com/contact/.

Adding new frames to a mobile app

I am planning to create a mobile app (android). It has several pages/frames for different cases. Now the number of frames/pages that I would like the app to have would grow over time, so new frames/pages would keep on adding.
Now, I have two options the way I see it. One being keep on adding new version of the app with new pages/frames once every few months. Other being I decide upfront all the possible templates for those frames. Once the templates are fixed, the response (from REST API containing data to display) would also contain the information of which template to use. I could embed the logic on how to interpret the template type available in response in the app code, so the app knows how to display a template of type "table" and what constitutes the table headers, etc.
The caveat for former approach (upgrade) is that once in while, app needs to be upgraded, something which not all users would like to do. A way around it is to enforce an upgrade, which renders app unusable. The problem with the latter approach (template) is that a lot more code needs to be written to make it work right.
I would like to know what approach is mostly used, and whether there are popular apps out there which use the latter (template) approach.
I definitely recommend using the first approach (that is, you submit updates when you actually provide new versions of the app...).
Here are a few reasons which seem to be enough to choose the regular option:
If you use the templates, you are "forcing" updates to the user. One day he has a UI, and the next he has another one (new element in the menu, or new display of a known activity/fragment). And that's worse, because he didn't receive a notification that there was a new version of the app. So he might actually get confused.
You are relying on a web connection to perform this check. So you don't even get the guarantee that this will work (depending on the permissions and business of your app, this argument may be invalid for your particular case. I wanted to answer to the general question though).
You will add a ton of complexity to your application's code (meaning no offense, I doubt you can think up-front about ALL the designs/renderings you will need in the coming months/years). And a higher complexity = more bugs, statistically.
Do you realize that the second approach you are talking about is more or less the principle of a website? Maybe what you are looking for is a simple app which has a webview to your mobile website?

Image recognition for Android augmented reality app

First, sorry abour my poor english.
I'm planning to build an augmented reality app for android mobile platform and the main feature is the ability of the user to take a shoot of a shop and the application recognize the shop that he is photographing. I Do not know if the best option would be to use an image recognition api as many existing, but I think it would be something more specific. Maybe own a bank of images would help.
My plan was to have a database of stores with their locations and use one of many tools for image recognition and search in my database to the same location. But I found that all search engines images (kooba, iqengines, etc.) are not free and not a little cheaper. So would a tool that could use a limited catalog, like shops images in a shopping mall for example and send photos of smartphones (both android or iphone).
Can someone help me get started?
I've been doing something similar for my dissertation at University. I developed an application which detected signposts, read the content on them, then personalised / prioritised it depending on the user's preferences (with mixed success).
As part of this I had to look into Image Recognition.
Two things you may want to look at are:
The Qualcomm QCAR SDK. This was a little bit too image specific for what I was after, but if you were to do it on a small range of shops it may work. This would require a collection of shop images to match against - I don't know how successful it would be.
What I implemented used JavaCV (a conversion of OpenCV), which also has an Android conversion. It seems to allow for image recognition a bit more generally than the previous option which is why I used it. It would require you to run your own training to create a classifier though (unless there is another way of doing image recognition within it). But there are a number of guides which can help with that.
I used it for recognising signposts with reasonable success off just some basic training, though did tend to recognise a number of false positives.
Within my application I then used location to match up with previous detections etc.
Hopefully these may get you started.

How does sharing application components happen in android?

it's been some time now, since I started reading about android.
I've already made a few basic applications, but I still miss something: How is actually sharing application component being done?
This is what the Android Dev Guide says:
A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Your application doesn't incorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises.
I think I came across some question like this, but I think I'm still confused.
Is the only way of getting such a 'private application' information to contact the developers of that application?
Is information about the data that the application operates with private, too?
If it is described in the AndroidManifest.xml file is it available for the other applications, or it is available only to Android?
When I started satisfying my interest in Android - one of the things that grabbed me was the impression of immense interoperability...
:)
Have I been wrong or I still haven't found the way?
Thanks!
How is actually sharing application component being done?
That depends entirely on what you consider an "application component" to be, and what you consider "sharing" to be.
This is what the Android Dev Guide says
That is a fairly bad piece of the documentation. Here is how I would write it:
A central feature of Android is that one application can make use of components (e.g., activities, services) of other applications (provided those applications permit it). For example, if your application needs to display a list of contacts and another application has developed an activity that does just that and made it available to others, you can call upon that activity to do the work, rather than develop your own. Your application doesn't incorporate the code of the other application. Rather, it simply starts up that piece of the other application when the need arises.
Is the only way of getting such a 'private application' information to contact the developers of that application?
Either developers are intending for you to integrate with them, or they are not. If they are, they should be documenting how to do that (e.g., Intent formats to be used with startActivity() to trigger their code). If they do not document such integration points, you can certainly ask the developers to add some. However, randomly shooting Intents at them in hopes of getting a response, even if it temporarily works, is little better than script kiddie tactics -- those developers are not obligated to ensure you code works when they upgrade their app.
Is information about the data that the application operates with private, too?
I do not know what "information about the data that the application operates with" means. Data managed by an application is private by default. Again, application developers can offer integration points for data (e.g., content provider, remote service API) -- some do, some do not.
one of the things that grabbed me was the impression of immense interoperability
Android offers greater interoperability potential than some other mobile platforms. However, using that potential requires consent among the interoper-ees. You cannot unilaterally decide to hack into another app's database, or invoke private activities, just because you feel like it.
Should more Android developers offer more integration points? In the abstract, sure. However, bear in mind that this adds support costs (e.g., answering integration questions) and limits coding flexibility (e.g., need to maintain a stable API for those doing the integrating). Developers cannot be blamed if they do not wish to incur all that.

allow users to create forms within android survey/data collection app

I'm trying to develop an Android app that could be used by advocacy groups or campaigners such that they would be able to create their own forms (surveys) for which they can go out canvassing and collect opinion data from people who don't have Internet connections and thus can't take surveys/polls online. Could also be used at events or anything else that requires data collection "in the field"
The benefit is allowing data collection on the spot without having to transfer data from paper to the office computer by hand.
I've been looking over this tutorial by Frank Abelson: http://www.ibm.com/developerworks/xml/tutorials/x-andddyntut/section6.html
And have also been pouring through the Open Data Kit, but the ODK is a little more intense than I am prepared for and the Abelson tutorial doesn't discuss much how users could create their own forms.
I suppose users could just create their own XML files for custom forms in the office and store them on the server, but I was wondering if there was a way for them to do this on the Android app?
Just a hint about possible architecture or simple resources would be helpful, I am having a hard time picturing the solution at the moment.
i'm one of the developers of open data kit. odk has been successfully deployed by organizations all around the world for exactly what you describe.
we have a graphical form designer (and good alternatives in purcforms and xls2xforms), a server to host the forms, and an android mobile client (and good alternatives in javarosa). all the pieces are free, open source, and are driven by an active community.
if you could list what specifically about odk doesn't fit your needs (say, a need form design on the phone), i'd be could recommend alternatives...
ODK is a fantastic open source solution. A potential commercial alternative you can also try is Canvas at http://www.gocanvas.com which allows you to replace paper based forms with your mobile device.
It currently runs on Android, Windows Mobile and BlackBerry with iPhone and iPad support coming soon.
To get a quick overview of how to use Canvas:
Build a standard data collection app in 5 minutes and see it running on BlackBerry
Build a signature capture app in 5 minutes and see it running on Android
Hope that helps some,
-Chris
You should look into Fulcrum. I believe there is a 30 day trial period see if this software works for you. This is a one stop shop for mobile data collection teams. You can easily build your data collection forms right from your web account to include photo fields, text entry fields, choice fields, form sections, and repeatable sections. Repeatable, meaning parent-child relationships within a single data point.
They even have an App Gallery with a exemplary apps (forms) that allow you to use as a sort of "cheat-sheet" to get started. Here is the political canvassing survey they posted.
-P.Reyes
Check my project here: https://github.com/AndreiD/surveylib
PROS: Simple solution, open source, without any overkill, you don't have to display any logos, it doesn't cost a thing, it's easy to be extended, material design etc.
CONS: You must have the server part, for the transmission of the answers data.

Categories

Resources