Problem
I have a free app in alpha stage at the moment, there is some extra content and functionality that I can imagine my users will want access to.
However as its my first app I do not know the mechanism for including the extra functionality. I see the in-app apk option in the google console but I do not know how I will need to package up my module for it.
My core app will need to pass parameters and call the extra functions in the module, which will display new activities extending my core app. This will only happen if the module is installed.
How do I go about this? Do I just make another app and install it side by side? This would be ok but the other app (my module) really is an extension of my core app and would not make sense on its own.
What is the right method to go about this?
clarification
I wish to have an optional module, which is not part of the core app but can be added by users on demand.
Ideally this module can also function by itself even though it would not make too much sense. Like a dictionary say of medical terms, it could be used by itself but would make more sense when an addon to a medical app.
It is so large in size and applicable to other potential apps that I cannot permanently include it with my app.
You need to integrate the Extra Module with your current Application's code.
After doing so, change the VersionCode / versionNumber in your Manifest.xml file of your project.
Then simply export the fresh .apk with your existing Keystore and upload it to the PlayStore over your existing Alpha apk.
I hope this helps.
Related
I need to temporarily change the package name of an Android app.
The reason I need to do this is because my customer does not yet have a Google Play account, but wants to test the app I've been developing for him. So I want to put it on an internal testing channel using my Play account, but I want to do so under a different package name.
When I develop iOS apps, there is a mechanism in Xcode by which any app can have multiple targets, and each target can have a separate bundle ID, and other properties, creating a unique app from the same source code. Then I can switch between targets at will to produce either version of the app.
What is the correct way to do this in Android?
The answers I've found online suggest that a wholesale refactoring of all the package names in the actual source code files is necessary -- I don't think this is the right answer in my case. I just want to toggle between two package names the same way you would toggle between build variants.
Thanks,
Frank
Use applicationIdSuffix ".demo" to extend the given name (the namespace does not really matter, the package name only has to be unique). One probably cannot completly override the applicationId; the merge output of AndroidManifest.xml would show what is broken.
Better publish to Firebase App Distribution first (can be linked to Play Store).
There the obstacles are generally lower - and one can also see remote crashes.
There are some Android applications which allow user to clone existed application on the phone.
eg: http://fixoptimize.com/app-cloner
Can you explain how these cloners work?
Thank you.
Change the package name in AndroidManifest.xml and re-sign the app. Notice that the xml is binary instead of text in an apk package. Android identify different apps with package name and with package name changed an app would be considered a "new one".
While the simple approach may or may not work (e.g. the app assumes its package name to be constant, or checks its signature) in many cases various other changes should be applied, including also chage the java package name, disable signature check, change string literals which are assumed path names containing a package name. All these would (likely) require decompiling and deassambling dex and even native codes, which is not only hard but illegal as well.
The modern way: Sandboxify the app. A sandbox environment would be created, within which the app being "cloned" is not actually cloned and remains unchanged. The sandbox would intercept all communication between the cloned app and the system, the user and other apps so it's transparent and stable. Neither the app nor the user would notice that the app's being sandboxed. And this most likely keeps legal concerns away unless a emulator is also outlawed. There are open source sandbox apps on github that you could examine and, well, copy.
Parallel space application creates a sandbox within their own app to host cloned apps.
For example Parallel Space app "Dual Apps" will create sandbox for our CloneAppChecker app as /data/user/0/com.dual.space.parallel.app.clone.multiple/virtual/data/user/0/com.example.cloneappchecker/files
We need to check Sandbox within our application to verify whether app has own sandbox (/data/user/0/com.example.cloneappchecker/files) or created by Parallel Space application.
Hence we can restrict parallel app and original app will work as it is.
5.I have checked almost 15 to 16 parallel space apps and behavior is same for all.
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 project for Android. In this project my client asked me following scenario but I'm not sure that it is possible.
They want to create an app-store for android. In this store after developer uploads his application we should wrap this APK file with our APK file (therefore we will have one APK file). This wrapper adds some activities to developer's application in order to able users to check their credits and add credits if they have not enough credit to their account (we don't want to manipulate the developer's code, we just want to add our code into their code). Therefore, when user download and install this application, each time he/she launches the application, our wrapper should be run first and check his/her financial account through Internet, if s/he has enough credit in his account, therefore s/he is free to use the application. If s/he didn't have enough credit we should guide him/her to buy more credit.
The things that I did, I created two sample project to see if I add APK of one to second, may I run that application from second application.
In the first application I just show some text in its activity and in second project (wrapper) I created a button that when I click on it, first project should be run. The result was not satisfactory and I couldn't run it.
I think if I export JAR file from first project and repeat above procedure I'll have better results but because in future we can't ask developers to put JAR file of your application instead of APK, it is not a good idea.
Now, for around a week I was thinking about this story and I couldn't find a way to know how can I consolidate and merge developer's application with our wrapper application.
If you have any suggestion please guide me.
The best way to get something along those lines is going to be as follows.
Setup a few permissions for accessing data from your "store" application. using these same permissions you can detect if any of these apps are installed on their phone.
Your going to want to make a ContentProvider that access the users account info and retrieves that information in your "store" application. Using this content provider you setup an api for accessing user information in the third party apps.
At this point you should have access to all users info (also use credit) and know if they have those applications installed.
Now for the third party apps
My suggestion make a jar file that uses the content provider. Also activities that do some basic stuff like making sure your store is installed and stuff. Bundle that app and have your 3rd party developers use it when making apps.
setup a sample application for using your jar and proper documentation. Very important always so hard when there isn't proper documentation on a jar file. But basically you should have static and helper classes for every aspect of interacting with the users account. And the application should only be asking for permission on using this information.
Here's a few content provider tutorials also a link for manifest settings to get the provider to work with permissions.
http://developer.android.com/guide/topics/providers/content-providers.html
http://thinkandroid.wordpress.com/2010/01/13/writing-your-own-contentprovider/
http://www.devx.com/wireless/Article/41133/1763/page/2
http://about-android.blogspot.com/2010/04/content-provider-example-1.html
http://developer.android.com/guide/topics/manifest/provider-element.html#prmsn
One last thing if you don't want third party application appearing on a user normal launcher for some reason you can request that developers also not add CATEGORY_LAUNCHER to their main activity. In which case you will have to query for the main activity in your store application.
I want to upload the same application twice to the Android Market. One version will have AdMob messages and the other version of the same app will cost a pair of bucks.
Should I make two applications with differents packages names in order to upload them or is there any trick to do it with the same project.
Thanks in advance.
Every application at Android Market must have unique package name, so you have to place your apps into different packages (one be a subpackage of another though, i.e. com.app and com.app.ads). You can share common code in a library project.
You will need two different package names. You might also consider to exclude certain parts of your code in your free version, because Android Market is known for not being the most secure distribution channel. But if the only difference is the additional ads in your free version, it is not worth the effort.
There is another possibility, which unfortunately, I don't know how to do, but I'd like to find out. You can put all the functionality into one app and then create a second app which acts as a "key". Users download your first app for free, but it has limited functionality unless the "key" app is also present. You would charge users to download the "key" app.
This solution has the advantage of not having to maintain two code bases for every app, which is what I do and it drives me nuts.