Is there any way to make my app "aware" of where it is downloaded from?
To clarify, they will not be going through the app store, they will be downloading the actual apk or plist (I think .plist is the extension for iOS?) file directly from my website.
Background
My situation is: You go to my company website, you get involved with one of our contractors, and you download our app from our website. However, depending on which contractor you have a relationship with, the app is branded with different UI elements specific to that contractor. I want there to only be a single app, but when you download it, the app is "aware" of which contractor you downloaded it from, and then uses some logic, (likely calls to a webservice, but the implementation of that is not important here) to display branding specific to that contractor.
I am trying to do this for both android and iOS, so solutions for both or either one would be appreciated. I want there to just be a single app (1 for iOS, 1 for android) because it is not desirable to create a new app everytime we get a new contractor, and because we would only want to have to register 1 app for push notifications.
Asked before
I realize my question is a duplicate:
It is essentially the same as this question: (One iPhone app with different template based on the URL it was downloaded from)
I want to give my iPhone app to different distributors for
distribution.
When a user will download the app from one of the distributors and
open it the app should connect to our servers and ask for the unique
settings of this distributer.
The question is, how each app can "tell" from which distributer it was
downloaded from?
I don't want to compile a different application for each client.
I am reasking it because the answers were unsatisfactory and did not at all address the issue, and the question is old (over 3 years old)
The first answer:
Do you want an app or iOS WebApp? if you want iOS app, I do not think
you can distribute to other distributors, because Apple is the only
distributor of iOS applications, so all the downloads come from there.
if you want a WebApp, you create a download link redirected to your
webapp to read the link to the server it pulls everything you need,
layout, information, etc ...
They completely missed the point, it has nothing to do with the question. The second part explains how one would get the different UI elements, but does not answer how the app is aware of which UI elements it should be requesting in the first place.
The second answer:
I did some research into this and the only way I found to do it is
just to create different targets for each app then share the source
code across both the apps, but this still means that you would have to
do two submissions still.
This does not answer the question either: AFAIK, multiple build targets help to have a single code base, but you still would be maintaining multiple apps, not a single app.
For Android, for a self-distributed app, you have two main options for creating "branded" editions of that app.
One is to use Gradle product flavors, where you create one flavor per contractor. Each flavor can have what amounts to an "overlay" sourceset, where you can replace stock resources (strings, icons, colors, etc.) with ones for that flavor. When you build the app (Android Studio, CI server, manual command-line builds, etc.) and have it build one or all flavors, you get a per-flavor APK with the per-flavor resources. If, at a later point, you elect to have per-contractor application IDs (so N contractors' apps can be installed at once), making the change will mostly be a matter of adding one line per flavor to your Gradle build file (identifying the application ID for that flavor) and updating your GCM API key for each application ID.
The older approach would be to change files in assets/ of a standard APK to make a branded edition. This approach is aggravating, as you can't take advantage of Android's resource system, and you have to arrange to re-sign the modified APK, but it will work.
In both cases, you have dedicated APK files per contractor, so you arrange for your download link to point to the right one for the contractor for this particular customer.
The com.android.vending.INSTALL_REFERRER solution probably is not a great solution for you. Besides the dependency on the Play Store, your app would have to have branding for every contractor "baked in". Certain elements (application icon, application name) cannot be changed at all and would have to be the same for all contractors. Other elements (launcher icon, launcher name) could be changed, but on some devices will take a reboot to take effect. And if you don't ever get that broadcast, or it is not for a recognizable referring URL (e.g., the user just found your app in the Play Store and installed it), you're in trouble.
I have a bit of situation where I want to use another app features in my main app. I wanted to submit two .apks so user could install both apps at same time. I know how to communicate between two apps. But is it possible to submit two apps so user can get both apps one installation?
Please help.
Yep it's possible, in Developer console you have to first upload your main apk (up to 50MB), and after that you can upload another one, up to 10GB.
http://developer.android.com/google/play/expansion-files.html
I'm new to android development.I want to know something about android app installation.Is it possible to have two application in apk file.I mean if I install one apk file will it create two android app icons in launcher list? and Is there any real app in google market so that I can download and have some experiences with that?Please help me.
Thanks
Jeyanthi
You can only install one "application" with an APK. But you can have multiple activities defined for one Application. In your manifest.xml you can create multiple activities, each activity can do it's own task. An application , if seen as something that performs a set of tasks that the user needs, then an activity can also be considered as an application. In that sense, when you have multiple independent activities in your application, each doing it's own task, your necessity is fulfilled.
Update:
After you re-framed your question: Yes, I think it is allowed. Check out Go Launcher.Ex
Update: Article
Android Launcher spam
The above article talks about whether applications that create more than one launcher icons. They have also given examples of applications. And also there are launcher spam applications that just create a load of icons in your launcher. But basically, it is very much allowed, Google does no check.
For technical details, just google how to have an application create multiple launcher icons, you'll loads of info.
THE SETUP:
Developing API 16 Android app with Eclipse and installing on Tablet when testing.
THE PROBLEM:
Every time I use Eclipse to install the app and run it on the actual tablet, it creates an application icon for every single activity in the application that is visible from the main dashboard, whether it is called or not.
THE QUESTIONS:
Why is this happening?
How do I stop it?
Loosely related question - I've seen many people looking for an easy way to make a simple installable file to put the appplication onto a tablet. I have considered using a signed application package and a third-party app installer from SD card. Are there any other suggested ways to do this.
Why is this happening?
If we have to guess, it's because you have the MAIN/LAUNCHER <intent-filter> on all those activities in your manifest.
How do I stop it?
Only put that <intent-filter> on the activity (or activities) that should appear in the launcher.
I've seen many people looking for an easy way to make a simple installable file to put the appplication onto a tablet.
I have no idea what you consider "a simple installable file" is.
I have considered using a signed application package and a third-party app installer from SD card.
I have no idea what you consider "a third-party app installer" to be.
Preface: I understand most problems and many solutions associated with bundling multiple apps.
My current app relies on a secondary app in order to function correctly. My current method of installing this secondary app is to include its .apk file in the assets of the primary app and prompt the user to install it.
If the user has INSTALL_NON_MARKET_APPS disabled, then the primary app redirects the user to the helper app on the marketplace.
However, this process has a few problems:
Most users are forced to download apps two times from the marketplace, which is cumbersome.
I am forced to have a helper app that does nothing on its own on the market, which is most likely confusing to users who find it by searching the market.
Is there a better method of bundling two apps together and having the user install both at the same time? Alternatively, is there a method to create an unlisted app on the market, so that it can only be installed if the correct market uri is used?
Yes CLay there is one example of option one:
The android phone app is actually several applications bundle together..its accomplished by having each application as one big activity and using tab activity navigation.
However, I do not have access to your code tell you what security implications might occur bundling together that way as both applications bundled together will have the same security sandboxing settings you implement via android manifest an code,etc.