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.
Related
I want to make a simple messaging application for android and ios that uses RMI/TCP Connection. I've created such a thing before using Java RMI but I'm aware android os doesn't come with the native rmi library but I can use lipe. That said, even if I am able to create a local network based app for android it would be useless for my purposes if ios isn't able to join this network. I've looked through several threads but I have not been able to find a recent solution that would work for both. I'm doing this for a very niche use case I understand that otherwise such an endeavor would seem fruitless.
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
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 new to Android programming. I have a website with sql 2008 db, and now i would like to give the users the ability to use their smart phones to enter data to this db.
I was wondering what is the best way to establish it. Since I'm new to it I don't want to build something that's not so professional.
Thanks for your help.
If I were you I would consider two following options:
Have a web application optimised for mobile use;
Pros:
Updates are delivered immediately, as there's no client application, everything is done on the server;
Web application can be used on many devices with a browser and not just Android: iPhone, Blackberry, PC, Mac, etc.;
Cons:
Users need to be online to work with the application;
You can not leverage from the native UI components available to native device applications;
Write Android application that will work with the database via a number of REST endpoints exposed through a web application (again);
The pros and cons are a full reverse of what you had in the first option.
The right answer for me was to use KSoap library. I'ts very easy and works very well.
Here is a tutorial that will show you how to do it step by step.
http://java.dzone.com/articles/invoke-webservices-android
I have a legacy tomcat Java application (Spring, Hibernate, MySQL) running on Linux (Ubuntu). I want (need) to build an Android application utilizing the backend database of existing application. Actually it will be just apilot project to test the things. It will do like display a list of information read from database.
I am .Net developer and totally new here.
What will be the best approach to go?
Web app or native Android app?
some service for database access (which, how) or direct connection to DB?
Also, please point out to good resource/books to get me started.
Android application is more like desktop, and you application is spitting out HTML pages. Your options are:
- provide mobile web interface to your existing appliaction
- develop new android frontend, and wrap your existing application with a REST-Service
- develop android frontend and reuse your persistence and business logic layer.
Big question is, what exactly you are developing? DO you need your business logic on the mobile device, otr it can stay where it is ( on server )