My application was working until I had this idea of changing the package name, and now the location doesn't work. the map is displayed and I am able to add markers on it.
But the location is not working. HELP
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ustolicence.guide_oran"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<permission
android:name="com.ustolicence.guide_oran.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.ustolicence.guide_oran.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.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Base.Rbt"
>
<activity
android:name="com.ustolicence.guide_oran.SplashActivity"
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.ustolicence.guide_oran.Rech"
/>
<activity
android:name="com.ustolicence.guide_oran.Parcour"
/>
<activity
android:name="com.ustolicence.guide_oran.Item"
/>
<activity
android:name="com.ustolicence.guide_oran.CustomGridView"
/>
<activity
android:name="com.ustolicence.guide_oran.ListFromSQLite"
/>
<activity
android:name="com.ustolicence.guide_oran.Restaurant"
/>
<activity
android:name="com.ustolicence.guide_oran.Dictionnary"
/>
<activity
android:name="com.ustolicence.guide_oran.DetailsFromTheList"
/>
<activity
android:name="com.ustolicence.guide_oran.Activity_map"
/>
<activity
android:name="com.ustolicence.guide_oran.Display_dict_on_list"
/>
<activity
android:name="com.ustolicence.guide_oran.MainActivity"
/>
<activity
android:name="com.ustolicence.guide_oran.Annuaire_call"
/>
<activity
android:name="com.ustolicence.guide_oran.A_visiter"
/>
<activity
android:name="com.ustolicence.guide_oran.Fill_tourist"
/>
<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="AIzaSyDzpyv7q9cExF63uAnkqCz9gKTXL9Oekww"/>
</application>
</manifest>
When you are generating your application key for the Google Maps API V2, you need to specify the SHA1 key and the package name of the application for example xx:xx:xx...xx:xx;'yourPackageName'. So each key is for one package name.
You need the generate new key. You can generate new key for you application with the same SHA1 and the new package name.
I hope that this will help you.
Related
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.
Hello and sorry for this question but it is my first app uploaded on Google Play :)
I have uploaded an apk in alpha testing, added a group of testers, and the app can be downloaded on phones, but not on tablets. Any tips will be great.
Many thanks
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="zz.zz.zz"
android:versionCode="25"
android:versionName="1.0.26" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera.flash" />
<uses-permission
android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal" />
<uses-permission android:name="com.android.vending.BILLING" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"/>
<application
android:name="zz.zz.zz.TraLaLaApplication"
android:allowBackup="true"
android:icon="#drawable/splash_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:largeHeap="true"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="zz.zz.zz.NavigationActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="landscape" />
<activity
android:name="zz.zz.zz.SeeYouSoonActivity"
android:screenOrientation="landscape" />
<activity
android:name="zz.zz.zz.social.FacebookActivity"
android:screenOrientation="portrait" />
<activity android:name="com.facebook.LoginActivity" />
<activity
android:name="zz.zz.zz.facebookShare.ShareMainActivity"
android:screenOrientation="landscape" />
<activity
android:name="zz.zz.zz.settings.fragments.RecordVoiceActivity"
android:screenOrientation="landscape" />
<activity
android:name="zz.zz.zz.settings.fragments.EyeDistanceActivity"
android:screenOrientation="landscape" />
<activity
android:name="zz.zz.zz.settings.fragments.EyeDistance"
android:screenOrientation="landscape" />
<service
android:name="zz.zz.zz.utils.PhotoTakingService"
android:enabled="true" />
<service
android:name="zz.zz.zz.utils.FaceDetectService"
android:enabled="true" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
</application>
</manifest>
I am making an application, when I run that application I am getting following error during running.
[2015-06-19 17:11:06 - Ecommerce] Installation error:
[2015-06-19 17:11:06 - Ecommerce] Please check logcat output for more details.
[2015-06-19 17:11:06 - Ecommerce] Launch canceled!
I don't know where I am doing wrong, I saw so many solutions but that does not match to my problem. Here is my Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ecommerce.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
/>
<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.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="com.ecommerce.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission
android:name="com.ecommerce.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.ecommerce.app" />
</intent-filter>
</receiver>
<service android:name="com.ecommerce.app.utils.GCMIntentService" />
<activity
android:name="com.ecommerce.app.SplashscreenActivity"
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.ecommerce.app.MainActivity" />
<activity android:name="com.ecommerce.app.ShoppingCartActivity" />
<activity android:name="com.ecommerce.app.AuthenticateActivity" />
<activity android:name="com.ecommerce.app.BranchLocationActivity" />
<activity android:name="com.ecommerce.app.ProfileActivity" />
<activity android:name="com.ecommerce.app.VoucherActivity" />
<activity android:name="com.ecommerce.app.EShopFragmentActivity" />
<activity android:name="com.ecommerce.app.EShopDetailActivity" />
<activity android:name="com.ecommerce.app.PaypalActivity" />
<activity android:name="com.ecommerce.app.FeedbackActivity" />
<activity android:name="com.ecommerce.app.LoyaltyActivity" />
<activity android:name="com.ecommerce.app.VoucherDisplayActivity" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:process=":remote" >
</receiver>
<meta-data android:name="com.google.android.gms.version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/map_key" />
</application>
</manifest>
Try specifying google play services version in meta-data
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
From google maps doc-https://developers.google.com/maps/documentation/android/start
Edit your application's AndroidManifest.xml file, and add the
following declaration within the element. This embeds
the version of Google Play services that the app was compiled with.
I cannot run the sample google map app from google's website. I followed the instruction as it said and added my own API key. but still not working. help plz
this is the manifest I just changed the API key
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mapdemo"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" />
<!-- Copied from Google Maps Library/AndroidManifest.xml. -->
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<!-- End of copy. -->
<application
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/demo_title" >
<!-- You must insert your own Google Maps for Android API v2 key in here. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="Here I put my API key" />
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".BasicMapActivity"
android:label="#string/basic_map" />
<activity
android:name=".CameraDemoActivity"
android:label="#string/camera_demo" />
<activity
android:name=".EventsDemoActivity"
android:label="#string/events_demo" />
<activity
android:name=".GroundOverlayDemoActivity"
android:label="#string/groundoverlay_demo" />
<activity
android:name=".LayersDemoActivity"
android:label="#string/layers_demo" />
<activity
android:name=".LocationSourceDemoActivity"
android:label="#string/locationsource_demo" />
<activity
android:name=".MarkerDemoActivity"
android:label="#string/marker_demo" />
<activity
android:name=".OptionsDemoActivity"
android:label="#string/options_demo" />
<activity
android:name=".PolygonDemoActivity"
android:label="#string/polygon_demo" />
<activity
android:name=".PolylineDemoActivity"
android:label="#string/polyline_demo" />
<activity
android:name=".ProgrammaticDemoActivity"
android:label="#string/programmatic_demo" />
<activity
android:name=".TileOverlayDemoActivity"
android:label="#string/tile_overlay_demo" />
<activity
android:name=".UiSettingsDemoActivity"
android:label="#string/uisettings_demo" />
<activity
android:name=".RawMapViewDemoActivity"
android:label="#string/raw_mapview_demo" />
<activity
android:name=".RetainMapActivity"
android:label="#string/retain_map" />
<activity
android:name=".MultiMapDemoActivity"
android:label="#string/multi_map_demo" />
</application>
</manifest>
Include the library for android google maps inside the application on manifest file
<uses-library android:required="true" android:name="com.google.android.maps" />
I am trying to setup SyncAdapter with google account. I did everything like in tutorials, but still my adapter is not visible in settings menu.
So here is my android manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pl.example.tasks"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:name=".TasksApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<service
android:name="TasksSyncAdapterService"
android:description="#string/tasks_sync_descr"
android:exported="true"
android:icon="#drawable/ic_launcher"
android:label="#string/tasks_sync_label"
android:process="#string/tasks_sync_process" >
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="#xml/taskssync" />
</service>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name=".TasksContentProvider"
android:authorities="pl.example.tasks" />
</application>
and here is my taskssync.xml:
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="com.google"
android:contentAuthority="pl.example.tasks"
android:supportsUploading="false"
android:userVisible="true" />
Please give me some guides what might be wrong here.
I think you need the android:syncable="true" attribute in the provider node. So:
<provider
android:name=".TasksContentProvider"
android:authorities="pl.example.tasks"
android:syncable="true" />