I have 4 application namely 'A,B,C,D' and one controller application called 'M' i have only one launcher that will launch the 'M' application .In that 'M' application i have 4 buttons for launch that 'A,B,C,D' apps My problem is i need to Un install all four application when the user un install the 'M' application from the Device
Note : Deleting that four application must not ask for the user confirmation.
I have signed that all application under a same key store.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.demoapp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.demoapp.MainActivitya"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.demoapp.MainActivityb"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.demoapp.MainActivityc"
android:label="#string/app_name" >
</activity>
i hope this is useful for you.
you don't put below code in other a,b,c,d activity.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
I don't think you can do it with a straightforward solution on un-rooted devices.
A proposal, you can hide “A, B, C, D" by not assigning launch to them. Only "M" can start them by intents with special private action.
Related
My ionic app uses:
"#ionic-native/barcode-scanner": "^5.19.1",
"phonegap-plugin-barcodescanner": "^8.1.0",
Android app crashes right away when i call barcode.scan funcion. I am doing everything like on the very basic example: https://ionicframework.com/docs/native/barcode-scanner
Note: I am testing this on android7 version at the moment. The phone is not very new but still not very old neither.
It crashes right after accepting camera permissions.
There is no err message in catch block or anything, app just crashes.
Has anyone experienced this or can help me investigate more logs ?
I have found the issue, basicly it was missing com.google.zxing.client.android.SCAN from AndroidManifest.xml file:
<activity android:configChanges="orientation|keyboardHidden" android:name="com.google.zxing.client.android.CaptureActivity" android:screenOrientation="landscape" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Not sure why the plugin installation did not added anything nor it was described in github, but It was requiring activity for the manifest file.
Hi im new to Unity3d and AR, and i need to setup Arcore to use with vuforia.
i already have the " core-1.7.0.aar " file in Assets/Plugins/Android folder
and i already set the AndroidManifest.XML in the same folder as the .aar file
<application android:theme="#style/UnityThemeSelector" android:icon="#mipmap/app_icon" android:label="#string/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="#string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="53bad2ba-a78a-4c14-9e44-e3d1cbb2f87c" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<!-- The following must be present to facilitate use of ARCore, if available -->
<meta-data android:name="com.google.ar.core" android:value="optional" />
</application>
and according to Vuforia Guide i need to edit the Build.gradle but i dont know How to do that from unity?
and also after i set this up, will the tracking be as good as ARcore or no?
Thank you.
You can export your project from Unity to Android Studio by selecting Export Project in the Build Settings window then press Build. Unity will ask where you want to save the output. This will give you access to all the Gradle files to follow the instructions provided by Vuforia.
I just updated android studio to 2.0 and I can't run my themes anymore. I am getting the following error:
19:59:20 Executing tasks: [:theme:assembleDebug] 19:59:25 Gradle build
finished in 5s 506ms 19:59:28 Can't bind to local 8637 for debugger
19:59:32 Session 'theme': Error Launching activity
Could not identify launch activity: Default Activity not found Error
while Launching activity
What is wrong?
<uses-feature android:required="true" android:name="org.cyanogenmod.theme" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" />
<meta-data android:name="org.cyanogenmod.theme.name" android:value="#string/theme_name"/>
<meta-data android:name="org.cyanogenmod.theme.author" android:value="#string/theme_author" />
<meta-data android:name="org.cyanogenmod.theme.email" android:value="#string/theme_email" />
<application android:hasCode="false"
android:icon="#drawable/ic_launcher"
android:label="#string/theme_name"/>
Disable Instant Run to resolve this problem.
File(Ctrl + Alt + S) > Setting > Build, Execution, Deployment > Instant Run > Uncheck all checkbox option to disable.
Try:
Step 1:
File -> Invalidate Caches / Restart...
Step 2:
This is all code in `AndroidManifest.xml? You should have at least one activity that looks something like this::
<activity
android:name="com.your.package.name.YourActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
This should be between:
<application> </application>
Hi I'm building my first android app, i like to have separate files for each class in my Android projects.
now i have:
src-->com-->quickorder-->activities
(in this folder i want to put all my activity files)
src-->com-->quickorder-->activities-->MainActivity.java
src-->com-->quickorder-->activities-->DbSincroActivity.java
manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.quickorder"
android:versionCode="1"
android:versionName="1.0">
<activity
android:name=".activity.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.DbSincroActivity"></activity>
MainActivity.java
package com.quickorder;
public class MainActivity extends Activity {
....
....
}
is this a correct statement?
No, you have
android:name=".activity.MainActivity"
you need to refer to the activities sub-root such as
android name=".activities.MainActivity"
Manifest takes that dot to mean that it's a subfolder of your package that you declared.
When I run my application code, I could see the following entry in the console:
[2011-03-01 10:29:26 - mireader] Uploading mireader.apk onto device 'emulator-5554'
[2011-03-01 10:29:26 - mireader] Installing mireader.apk...
[2011-03-01 10:29:40 - mireader] Success!
[2011-03-01 10:29:41 - mireader] Starting activity com.mireader.reader on device emulator-5554
[2011-03-01 10:29:44 - mireader] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mireader/.reader }
The application's main GUI automatically runs. Until here, there is no problem. When I get back to the application list, there my app icon is not visible. I checked in settings->application->manage application, there I could see my app and it shows uninstall option too.
What is the problem?
probably missing
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
in your main <activity> in the manifest
I had the same problem in Android Studio, with API 19 and with gradle building system. We spent a couple of hours to figure this out, and we realized, if you have more library (for example you have more test app in the same project) and you have more launcher icon in separated library, than gradle cannot solve this. You don't get any error message, just you don't see the icon.
So use different names for launcher icon or just delete which you don't need.
(I just thought, maybe someone gonna have the same problem...)
There was an other scenario as well, when icon is disappear. When you use <data android:scheme="your-own-uri">
The solution is to split intent-filter.
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<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="your-own-uri" />
</intent-filter>
</activity>
Just for Android noobs like myself, putting this:
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.pdf" />
between the intent filter tags of the main activity also causes an icon disappearing act. The code above is to open a file based on its extension. Remove it and the icon reappears.