I'm trying to create multiple versions of my app for different clients, and have done these steps:
-Duplicate all the folders with a simple copy and paste in the finder,
-Open the project i have just created,
-Changed the package name in the AndroidManifest.xml,
-Refactor all the classes and files that where failing (with the refactor option),
-Clear project and run.
I have been able to instal the 2 apps in the device, but every time I try to run any app the os shows me this:
As you can see I have the 2 app installed and running:
And every time i press a button ask me again:
This is the first AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="epinom.jm.smarthotel"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="16" />
<permission android:name="epinom.jm.smarthotel.maps.googlev2.permission.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="epinom.jm.smarthotel.maps.googlev2.permission.MAPS_RECEIVE"/>
<uses-feature android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBjg8TtFgJTMuLFyiGlScVuEDNPjJnLxyM"/>
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
This is the second AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="goSmart.guestperience.MoncloaDeSanLazaro"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="16" />
<permission android:name="goSmart.guestperience.MoncloaDeSanLazaro.maps.googlev2.permission.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="goSmart.guestperience.MoncloaDeSanLazaro.maps.googlev2.permission.MAPS_RECEIVE"/>
<uses-feature android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDNqe1PO7pvZLtba_Vu3m5BvmOdJtqhU0M"/>
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
I'm starting with Android development so please tell me what I'm doing wrong, is there something that I'm missing to configure.
I'm using Eclipse on a Mac.
TO ANWSER THE QUESTION OF #David, this is the code i use to call every new screen:
String IntentName = Util.getController(buttons
.getJSONObject(arg2)
.getString("ViewController"));
Intent intento = new Intent(IntentName);
intento.putExtra(
"jsonConfig",
buttons.getJSONObject(arg2).getString(
"JsonConfigFile"));
intento.putExtra("title", buttons.getJSONObject(arg2)
.getString("Label"));
intento.putExtra("icon", buttons.getJSONObject(arg2)
.getString("ImageIconTitle"));
startActivity(intento);
You have 2 activities with the same name.... in differents AppĀ“s.
Change the name of 1 activity.
Thanks to the comment of Nimish Choudhary and more Google the answer to my problem was that I have to make unique all Activity names for to the 2 Apps.
So in the AndroidManifest.xml I have change all the names of all the Activities, i.e.:
<activity
android:name="app1.vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="app1.vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
And I change the return of the switch when I was calling the function:
Util.getController(buttons
.getJSONObject(arg2)
.getString("ViewController")
Now the return is:
switch (Integer.parseInt(num)) {
case 0:
return "app1.vcMainScreen";
default:
return null;
}
I hope this help someone one day.
Thanks to all.
Related
I have an application that may or may not work with NFC. I have added these lines to manifest:
<manifest ...>
<uses-feature android:name="android.hardware.nfc" android:required="false"/>
<uses-permission android:name="android.permission.NFC" />
</manifest>
When I search for the application in google play, the message continues: "Your device is not compatible with this version"
I have verified that the NFCAdapter is not null, I have requested the pertinent permissions directly in execution ... but that message continues to come out.
APORTACION:
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.app.app">
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.nfc" android:required="false"/>
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<service
android:name=".timer.UploadService"
android:enabled="true"
android:exported="true">
</service>
<service
android:name=".services.uploaddata.ui.UploadDataService"
android:enabled="true"
android:exported="true">
</service>
<activity android:name=".main.ui.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:launchMode="singleTask"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".p1.ui.class1"
android:label="#string/title_activity_class1"
android:screenOrientation="portrait"
android:launchMode="singleTask">
</activity>
<activity
android:name=".p2.ui.class2"
android:label="#string/title_activity_class2"
android:screenOrientation="portrait"
android:theme="#style/class2ActivityTheme"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name=".p3.ui.class3"
android:theme="#style/AppTheme.ActionBar"
android:label="#string/title_activity_class3"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".p4.ui.class4"
android:label="#string/title_activity_class4"
android:theme="#style/AppTheme.ActionBar"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".p5.ui.class5"
android:label="#string/title_activity_class5"
android:screenOrientation="portrait">
</activity>
</application>
</manifest>
my problem is not a bad code. I waited for one to two days and the problem was solved. It is possible that google servers did not resolve the request well and took a little longer to update. I really do not know what the reason was but my app is already working :)
I know that this question has been asked many times, but the old answers don't resolve my issue, maybe something has changed.
Why there is no launcher icon after installing the apk?
This is the manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xxx.xxx.xxxx"
android:versionCode="1" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="21" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="xx.xx.xx.xx.MyActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="xx.xx.xx.xx.Configuration"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:label="#string/title_activity_configuration"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="xx.xx.xx.xx.xx"
android:label="#string/title_activity_login" >
</activity>
</application>
</manifest>
What is the problem? Please Guide.
App icon should be in minmap like this
minmap-mdpi/ic_launcher
minmap-hdpi/ic_launcher
minmap-xhdpi/ic_launcher
minmap-xxhdpi/ic_launcher
minmap-xxxdpi/ic_launcher
not in Drawable, so please change it. and also check icon size.
try this link to make app icon
https://makeappicon.com/
I made an android app and I want to deploy it on a device i.e my phone which is a Sony xperia S. The miniSdkVersion of the app is 15. The app is installed on the device but I can't see the icon on the apps menu of my phone.
Here is the manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.toshiba.ticketing"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<application
android:debuggable="true"
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat" >
<uses-library android:name="com.google.android.maps" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<activity
android:name=".Choose"
android:exported="true"
android:label="#string/title_activity_main_activity2" >
</activity>
<activity
android:name=".TaskChoose"
android:label="#string/title_activity_task_choose" >
</activity>
<activity
android:name=".TicketChoose"
android:exported="true"
android:label="#string/title_activity_ticket_choose" >
</activity>
<activity
android:name=".login"
android:configChanges="keyboard|orientation|screenSize"
android:exported="true"
android:label="#string/title_activity_login" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data
android:host="redirecturi"
android:scheme="your" />
</intent-filter>
</activity>
<activity
android:name=".ListAll"
android:exported="true"
android:label="#string/title_activity_list_all" >
</activity>
<activity
android:name=".ListInProgress"
android:label="#string/title_activity_list_in_progress" >
</activity>
<activity
android:name=".ListPending"
android:label="#string/title_activity_list_pending" >
</activity>
<activity
android:name=".TicketOverview"
android:exported="true"
android:label="#string/title_activity_ticket_overview" >
</activity>
<activity
android:name=".Map"
android:exported="true"
android:label="#string/title_activity_map" >
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".TicketList2"
android:label="#string/title_activity_ticket_list2" >
</activity>
</application>
</manifest>
Does anyone know how to fix this?
Thanks
Check your device API level. If you have updated to KitKat (19) or higher, then the problem is the android:maxSdkVersion="18" entry in your manifest, and you should remove it.
From Android Developer:
If the application's maxSdkVersion attribute is lower than the API Level
used by the system itself, then the system will not allow the application
to be installed.
Also it says:
Warning: Declaring this attribute is not recommended.
I'm trying to increase my apps compatibility as it currently only supports 21 devices. I've read that permissions and features in the manifest file determine how compatible your app is. Is there a way I can check how compatible each feature or permission is?
What is stopping my app from having more supported devices?
Heres my manifest file.
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light" >
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.example.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<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>
</activity>
<activity
android:name=".SplashScreen"
android:label="#string/app_name" android:theme="#style/Theme.AppCompat.Light.NoActionBar">
</activity>
<activity
android:name=".PostDetailActivity"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light"
android:windowSoftInputMode="stateHidden">
</activity>
<activity
android:name=".NotificationsActivity"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light"
android:windowSoftInputMode="adjustPan">
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="example"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE" />
<uses-feature android:name="com.google.android.maps" android:required="true" />
<permission
android:name="com.arshad.map.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="22" />
<uses-feature android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
I never used it, just heard about it:
https://source.android.com/compatibility/cts/index.html
I know there are some features in Google Play as well (never used, just heard about it):
https://support.google.com/googleplay/android-developer/answer/1286017?hl=en
<uses-feature android:name="com.google.android.maps" android:required="true" />
This line needed to be deleted, after I removed it, I increased my supported devices by about 8050
have a problem with the already published application on Google Play. The application in store, but no one can download, because I getting "Supported devices 0". I did refactor the project, removed all unnecessary with the manifest. Compiled a new apk, and again "Supported devices 0". I have already a few days trying to solve this problem, but until the "Supported devices 0". I spread the current manifest, project structure, and screenshots from Google Play page publication. Application Activated. Really need your help.
(Sorry for my english)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.application"
android:versionCode="2"
android:versionName="1.1">
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="17"/>
<permission android:name="my.application.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="my.application.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:icon="#drawable/ic_launcher"
android:name="my.application.activity.delegateApplication"
android:allowBackup="true"
android:launchMode="singleInstance"
android:largeHeap="true"
android:label="#string/app_name" >
<activity
android:name=".activity.SomeActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SomeClass"
android:theme="#style/CustomTheme"
android:screenOrientation="portrait"
>
</activity>
<activity android:name=".SomeClass1"
android:theme="#android:style/Theme.NoTitleBar"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".SomeClass3"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" />
...
<activity android:name=".SomeClassN"
android:theme="#android:style/Theme.Dialog"
android:screenOrientation="portrait"
>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my_code"
/>
</application>
</manifest>
pictures
unfortunately I can not post it pictures, just links to them
http://leahov.com/pic/1.png
http://leahov.com/pic/2.png