I am just getting back into Android programming after a while and I know that separate Android applications are allowed to communicate with each other in some capacity, but is it possible for one to build a proprietary application that can modify the features of an already existing application?
I don't mean applications like those 3rd Instagram applications (which were most likely built using their api ). I mean is it possible to create an application that would for example run in the background and possibly add features on already existing applications?
For example making an extension application for that runs in the background when you use the Twitter application that could potentially add features, or disable existing features?
(Sorry if this is not directly relevant I did not know where else to post this question)
In android apps are sandboxed.
It will be a major security issue if one app could influence the operation of other apps.
What can be done is letting apps interact with each other and exchange information, there are couple of ways to do this that relay on android Inter process communication, Android Binder Content providers and Intents.
What you can do is to draw on other apps. this will allow you to add some functionality without really changing anything in the background app
There are some apps that use this technique. LastPass is a good example.
See this article for more information
Related
If I'm making an Android app (such as a messaging app), and I want the app to be opened up so that other developers can make extensions (i.e. connections to other messaging sites/protocols, additional features, custom UI), what options do I have available to me to do this?
The answer to this question makes it seem like if the other developer makes their own app, my app is able to pull data from it? Is this the direction I should be heading in?
I know such extensions are possible, because I've seen it with other apps, such as the file manager FX that has "add-ons" called "FX Plus" and "FX Root Access". So, basically, how can I also get add-ons/extensions for my app?
Options I am aware of:
Intent API can provide some functionality (You can give developers ability to send commands and data to your app). For example you can accept some kind of XML and build your UI according to it. It's slow process, but you can create some hacks to speed it up. documentation
Content provider you can give other developers ability to work with data of your app. Databases, photos, videos. You can share your's and you can accept new ones.
documentation
AIDL Service never used it myself but sounds promising. documentation
I have moved from an iOS background to Android recently. My usecase is following.
I want to build a suite of apps. Each app needs to make server calls or do database operations. I do not want to write the code in each app of mine to do these operations.
So, I want to build a framework of my own which has API's exposed to do server and DB operations. Now, I can just import this framework in my applications and do server/DB operations.
In iOS this could be achieved by building a static library. How can similar thing be achieved in Android?
Initially I was thinking about services but If I am not wrong they are specific to only an application and can not be shared among different applications.
How can similar thing be achieved in Android?
Create and use a library module.
Initially I was thinking about services but If I am not wrong they are specific to only an application and can not be shared among different applications.
Services can be exported from one app and used by other apps.
A library is a compile-time construct. You are saying that you want one copy of the code on your development machine, but each app incorporates that code and uses it independently of other apps.
A service is a run-time construct. Here you are saying that you want one copy of the code running on a given device, and that other apps should talk to that one running copy of the code to perform various operations. This greatly increases the complexity of your apps and the coupling between them, and so using a service is not a simple substitute for using a library.
You're wrong about Services, I have a scenario where I communicate to same web server in each application.
So instead of writing same service in each application, I wrote one standalone service application which will expect my all application to Broadcast a message (depends on scenario). I exposed my database to service through ContentProvider. So my service know my application data. I achieved this successfully. Also you can use library module. You can know more from this link
Hope it give some idea.
I'm a new to android so I don't know a lot of things you can do with a android application.
My main question is: Can you host an android application on a server then call it from another application when requested?
Can anyone recommend tutorial or an article about android application communicating with servers.
Or is there another way to store and use large databases that aren't stored in app itself?
An Android App can use any means available via TCP or UDP to communicate over the internet. HTTP is also built-in. Other/higher layer protocols (SOAP, ...) may need additional libraries to be added to your App, of which there are many readily available to choose from.
The point is: Almost any kind of client/server communcation can be implemented in an Android App; select one that fits your purpose and chances are that there is already a library available for it.
Running an actual Android App (.apk) on a server does not make any sense.
I need ur help..!
I m creating an app in android. The apps use the functions in the other apps which are already present. I want my app to be standalone. I can't use the functions in those app.
To be more clear, If i create an app for making video calls. The app needs to use the functions in the phone apps. can i just create an instance and use the functions or should i redo all the functions which are required?
It will be helpful if i get to know what will happen wen the app is inserted in the code base and compiled.? where ll the R.java file get created?
Could u suggest me some links to get a detail info about it?
developer.android.com is really useful when it comes to explaining the various features of android development, as well as some great code samples.
When you say you are using the functions of other apps, are you using intents or checking if the app is installed?
If there is an app that has the functionality you need, you can always set a home page that tells the user that these apps will be needed or change your application so it uses the features in android and not the third party apps.
Hope that helps!
If the apps don't provide an API or intent-filter for what you want to do, you cannot include/integrate them easily.
Unless you have a license to use components from the other apps and have access to their source code, you are going to have to re-implement the functionality you need from scratch or from a combination of available platform capabilities, libraries, and appropriately licensed example code.
(If you were content to leverage exported capabilities of other apps that had actually been installed on the device, you could do some things via intents. But you seemed to say this was not acceptable, that you needed to take capability from apps that would not be installed.)
I am writing an Android application that uses some functionality that has been published under the Apache 2.0 license. The functionality is available in 2 ways:
As java code
As an intent in an Android application.
Being the typical developer that I am, I don't want to make the user install a separate application so that they can use my own application - because it would definitely put me off using the application if I had to.
On the other hand, doing the work to get the application up and running using the Java code will take much longer.
My questions are thus:
What are most developers doing now? Are they using intents from other apps?
Does it matter to the average consumer that they need to download a separate application to make it work?
In my application EmailAlbum, I first depended on the presence of OpenIntents OIFileManager on the user phone to pick a file on SDCard or chose a destination folder for exporting a generated file.
Later, I integrated my own version of the code of OIFileManager in my app's source code for several reasons:
Depending on another app for basic (but essential) application features is like a suicide. If your app can't really live without the other app and this app is not installed on most devices, your app won't get used. Most people want apps that work on first start.
Another app was on the market which was providing it's own (bad) implementation of the same intent and was making my app crash... users having it installed on their phone thought that was my app's fault.
Providing a consistent UI was not possible.
I think using public Intents is great to allow people to chose from various applications to extend your applications features or to reuse the content generated by your application. BUT your application has to be able to live on its own, depending only on standard apps provided with ALL android devices (ie. not even depending on Google proprietary apps if you want your app to be able to be used on devices which have not been approved by Google, those which come without the Android Market or GMail).
Most developers are going to use a common intent (phone call, web browser, camera, etc.) to call an activity. If your app replaces one of these common intents, then you shouldn't have anything to worry about.
Developers do sometimes include intents to use other (non-common apps). One example that comes to my mind is OpenWatch that provides an API for other developers to build on. Of course, in this case, if you are using a bluetooth watch like this, then you most likely already have OpenWatch installed, therefore it isn't much of a bother to get another app that builds on top of it.
If you think people are going to use it, I'd say provide an API.
Might also want to take a look at here: http://www.openintents.org/en/
I think even google had an app at one time that depended on a third party package. At application startup the user was greeted with a dialogue that asked him to download said package. If he declined, the respective functionality was disabled.
But I'd only use that approach for tech savvy users, the regular joe will much likely be put off by it. If the functionality isn't crucial, just use it as an added bonus and leave it out otherwise.