Short:
Is it possible to write a mobile application where you can download some kind of extensions/add-ons (like in desktop programs) that are not previously shipped in the app archive?
Long:
I am developing a mobile app with a shared base functionality but different modules for different clients. As the app is growing rapidly and the modules are quite different, it would make sense, not to pack every module into the apk from the beginning but to ship only the base code to all clients and they can select and download the modules they would like to use. Regarding apk size and speed this would offer definately advantages. Splitting the app into several smaller apps with different package names on the other hand would be very hard to maintain. Currently I'm using Ionic but the question would be equally interesting for native apps.
Searching the web returned nothing of value, so I'm wondering whether there is a way to acchieve this...
Well, i'm not sure if you can have a class loader as you have in Java for doing such things. But the res folder probably will not work.
Another approach is to launch every plugin as a different application, and design those activities to work with startForResult so you can communicate and open all other apps while looking like you are within the same application.
Related
So when you create mobile apps, you usually intend to distribute your app to multiple platforms and architectures. However, since object code usually is dependent on factors like the architecture, you would have to compile the app for all the different mobile phones out there. So is you application really compiled for all the different phones that the app will be made available for? Is this specifically targeted compilation then done whenever a user runs the app on his/her device? Like on the device itself or is the compilation done before the app is actually installed on the phone?
So is you application really compiled for all the different phones
that the app will be made available for?
Short answer: yes.
Is this specifically targeted compilation then done whenever a user
runs the app on his/her device?
No; this is done when the package is created (else you'd be sending all your source code in the app!) This means a package may contain multiple libraries required for it to run on multiple architectures.
Like on the device itself or is the compilation done before the app is actually installed on the phone?
For the shared object to be put into the package, compilation is done before the package is created. The required shared objects are copied onto the phone during installation of the package (and I suspect that the non-required ones are discarded, but it's possible they're not!).
There are however only a relatively small number of architectures that android supports; and while supporting them all does increase the size of the package, the size is rarely an issue.
Alternative:
If you don't want to put the shared object in the package, an alternative is to host them and download the appropriate one during runtime.
The problem with this is that this does impact user experience (I personally hate when I download an app, and then it states that it wants to download more; it feels like it's a mechanism of bypassing any security checks google want to do)
in my company we plan to develop an app with different modules. We develop Apps for Apple, Android and Windows. We have some default modules like inventory and relocation, but for some customers, we need to develop custom modules. The question is, what is the best way to provide this app to our customers and how we can use update functions?
If we build one app with every module, and just unlock the modules based on the customers licence, it will be massive inflated, at the time. We have up to 20 customers and each of it needs 2 or 3 custom modules.
To build 20+ apps and distribute it over the store, it will be really difficult to manage each app. And if we update some core functions, every single app must be updated. Not a good way.
So what is the best way to develop custom apps for our customers and ditribute and update it?
sorry for my english, it's not the best..
So you don't want to include all modules in every app installation, and you don't want to distribute many different versions of the app, each one with a different combination of modules.
It seems to me that the only solution you have is to download your modules after the user has installed the app and chosen their license.
The easiest way to implement this is with a web app as opposed to a native app. However if you want to write a native app you are able to download and execute binaries at runtime.
This thread contains a few different approaches to achieve that:
Is it possible to dynamically load a library at runtime from an Android application?
Good luck!
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 am getting started with mobile apps development, but there are so many tools available to develop cross-platform apps, so I am really curious as to what was used to build certain apps.
Basically I would like to know if there is something like PEiD, but for mobile apps, or if there is an easy way to find out what was used to create a certain app I've downloaded from Google's/Apple's App Store (i.e. some sort of file or information inside the apk file).
EDIT
After searching a bit more I found this, which may work in a few cases: decompiling DEX into Java sourcecode
For instance, I decompiled one game that I had on my Android smartphone (and on my iPad) and found Cocos2d framework inside it.
Some cross platform tools let the programmer use web technologies (HTML, CSS and JavaScript) so then they can load these files into a WebView. If you were to dump the View hierarchy using DDMS you will see a WebView on it.
Having said that, the point of these frameworks is to generate the same end result as a native app, so I doubt there will be metadata somewhere in the .apk.
I read that using Flash Builder 4.5.1 you can create one application and run it on a mobile device, in Internet browser and in Desktop AIR. However, I created a mobile application and the only option to run it is 'Run as mobile application'. Is it really possible to run the same Flex application in browser and on mobile?
Thanks,
Michal
Is it really possible to run the same Flex application in browser and on mobile?
You probably misunderstood what you read. I think the Adobe marketing is purposely ambiguous on this point.
What people would normally do is encapsulate the shared functionality into a library project and share it between multiple different projects, each with a different publishing target. It is unlikely you'll want the applications to be the same.
Your layout on a phone will most likely need to be different than a layout on a tablet, which will most likely be different than the layout on the larger screen of a desktop / laptop.
That said, I do believe what you want is possible, but not a workflow supported via Flash Builder. You can easily use the command line compiler to compile the same code for different purposes. There are some classes available in Mobile projects which are not available in web based applications; so you have to add those SWCs back into the classpath; most likely the mobile theme and the mobile component set. These files should both be SWCS in your SDK directory somewhere.
You could also create different ANT scripts or something to do the different builds for you.