Is it possible to bundle several mobile apps into a single download? So a person can install the bundled apps, then have several new apps available on their phone.
For example, a bundle of iOS apps, or a bundle of Android apps?
For iOS you can't do it. I tried to place multiple application in one ipa (which is just zip), but it will recognized just one of them.
Downloading additional content is also prohibited on iOS.
However, if you distribute application over the air, you can create a file (I don't remember exactly how it's called) which will have multiple asset's in it (multiple ipa's).
For Android, pablisco and user2115660 pretty much covered it.
You can't do that as it is. What wou can do is add an extra Activity with a CATEGORY_HOME in the intent filter and it will appear as a separate app on Android's launcher:
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
You would have to change the icon and label properties of the activity for it to have a different icon and name as well :)
UPDATE:
The format I was using for the intent filter wasn't correct. This is how the activities would have to be declared inside the application tag in the manifest:
<activity android:name=".MainActivity"
android:icon="#drawable/main_icon"
android:label="#string/main_app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SecondaryActivity"
android:icon="#drawable/secondary_icon"
android:label="#string/secondary_app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
If you want to include an Activity inside a library project you will have include the full path to that given Activity.
One interesting approach would be to create both apps like library projects and then compound them into one. Bear in mind that you can't package library projects into apk so you would have to do separate projects if you want to create individual products.
Here is some info about library projects: http://www.vogella.com/articles/AndroidLibraryProjects/article.html
I saw one app that after instillation started downloading apk's and installing them.
For iOS, outside of the jailbreak world, of which I am not overly familiar with, no.
Related
I have a very basic Android app generated from https://appmaker.xyz/pwa-to-apk/. That app was actually modeled very closely off an example published by Google which I cannot find anymore.
The problem is that if you set the default browser on the device to one that does not support TWA, the app opens but shows the URL bar. If you want all the technical fun, here's a bug report that explains everything: https://bugs.chromium.org/p/chromium/issues/detail?id=942930
My Android development skills are limited to compiling the app in Android Studio and I have no clue what modification I can make to force my app to prefer a browser that supports TWA. Is there some modification I can make to that will do this?
Here's my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.placeholder">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="${launcherName}"
android:supportsRtl="true"
android:theme="#style/Theme.TwaSplash">
<meta-data
android:name="asset_statements"
android:value="${assetStatements}" />
<activity android:name="android.support.customtabs.trusted.LauncherActivity"
android:label="${launcherName}">
<meta-data android:name="android.support.customtabs.trusted.DEFAULT_URL"
android:value="${defaultUrl}" />
<meta-data
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
android:resource="#color/colorPrimary" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"
android:host="${hostName}"/>
</intent-filter>
</activity>
</application>
</manifest>
Browser support for Trusted Web Activity is improving - Chrome, Edge, and a couple of others support it, with Firefox coming soon (Firefox Nightly already supports it).
The example was svgomg-twa, which is now deprecated.
The best way to generate a an app that uses Trusted Web Activity is using something like Bubblewrap - It's a Node.js CLI application.
It defaults to the Custom Tabs fallback behaviour (the URL bar) but has the option to enable a WebView fallback.
Initialize the project with bubblewrap init --manifest=https://example.com/manifest.json
This will generate the Android project and a filed called twa-manifest.json. Edit this file and change the fallbackType field from customtabs to webview.
Update the project with bubblewrap update
Lastly, build the APK with bubblewrap build
Alternative approach:
PWABuilder uses Bubblewrap as a library and can be used for the same goal:
Navigate to https://www.pwabuilder.com/
Enter the add address to the PWA on the input
Click on Build my PWA
Click on the arrow pointing down on the Android card
Click on Options
Change the Fallback type radio from "Custom Tabs" to "Web View"
Click Done
Click on Download
When I build a single apk and I try to install it on the device two apps are shown instead of one, but neither app opens. What is the cause of this? I just want one only.
No, there's still just one app but you need to tweak your Manifest file as apparently you have two activities with
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Remove this filter from activity you do not want to be your entry point.
So I'm learning android programming and everything is going well, until I came to this problem.
I'm using android studio and transfer my app to my phone, this has worked well until now. The app start automatically and works fine, but when I go back to the home screen on my phone the app is not there, it's not saved on my phone. The problems is the same when using the emulator.
anyone know this problem?
Most probably you need a line in the android manifest that tells us that the app will appear in the launcher.
Check this link out :
https://groups.google.com/forum/m/#!topic/android-developers/csokbhepUG0
In your manifest, add this to your main activity:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You probably already have the MAIN action on the activity, you just need to add the category <category android:name="android.intent.category.LAUNCHER" /> so that it shows up on the launcher.
This is a question concerning android applications with two different .apks (or two apps contained in the one .apk file)
I have two apps which do completely different things but are related, say one is a standard user app and one is an admin app. But a user can be both a user and an admin. I am wondering is it possible for me to create one .apk file that installs two applications to the phone? And how would I got about this?
Thanks,
Matt
You can have two activity elements in the same manifest file, which have both the intent filter with action=MAIN and category=LAUNCHER. Further, you have also to use the attribute "android:taskAffinity" for both activity elements (see also here):
<application android:allowBackup="true"
android:icon="#drawable/main_icon"
android:label="#string/main_name"
android:theme="#style/AppTheme" >
<activity android:name="com.foobar.MyActivity2"
android:taskAffinity="com.foobar.MyActivity2"
android:icon="#drawable/icon1"
android:label="#string/name1" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.foobar.MyActivity2"
android:taskAffinity="com.foobar.MyActivity2"
android:icon="#drawable/icon1"
android:label="#string/name2" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
When the APK file with this manifest is installed on a device, then it will create two icons on the homescreen. The titles of these icons will be taken from the attributes android:label, and the icons will be taken from the attributes android:icon. In the list of apps under "Settings | Apps" you will see the name & icon defined by the attributes of the application tag. When you choose "uninstall" for this entry in the list of apps, then both "apps" will be removed from the device.
It depends on your definition of "application". You cannot install 2 applications if you use the more official definition, as you can have only 1 <application> in your manifest.xml
You can define several activities in your manifest.xml, and they can do seperate things, so in that way YOU CAN have 2 things a person might describe as "application" in one APK
Just define multiple activities and use those could be defined as an option, but it depends on your definition of 'application', but in this case I'd say it would work
Yes, you can install multiple apps by just installing one app.
In Manifest.xml
Project Structure:
You should either build 2 APKs are use APK Expansion Files.
Btw, this is a security measure.
No.
what you can do is to check if the second app is already installed, and if the answer is no, you can prompt the request to install the second app using this post.
Is it possible to bundle an app and the app settings into one apk file? so I can change the app settings from the "App settings"
Thanks
If these two apps have no overlaps, you only need to merge the AndroidManifest.xml, res and src folders.
Keep two activities with the following intent filter:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
will make you have two launch entrances in Launcher.
In fact, it's one app with one apk. But since have two launchable activities, user will feel like they have installed two apps with one apk.
Found answer on another question