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" />
Related
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 just imported a project that was being compiled and run normally from Eclipse to AS. I have a Wakefulbroadcast receiver and intentservice nested in the mapactivity. The app compiles but I have red squiggle lines under mapactivity in my manifest that displays "cannot resolve symbol mapactivity". What is causing that?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mypackage"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="22" />
<library />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.BATTERY_STATS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.WRITE_SMS" />
<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="mypackage.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="mypackage.permission.C2D_MESSAGE" />
<uses-permission android:name="myotherpackage.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<permission
android:name="mypackage.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<permission
android:name="com.google.android.c2dm.permission.RECEIVE"></permission>
<permission
android:name="mypackage.permission.C2D_MESSAGE"
android:protectionLevel="signature"></permission>
<application
android:allowBackup="true"
android:icon="#drawable/taximdpi"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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="myapikey"/>
<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=".MapActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAPACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<receiver
android:name=".MapActivity.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!--Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!--Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="mypackage" />
<category android:name="myotherpackage" />
</intent-filter>
</receiver>
<service android:name=".MapActivity.GCMIntentService" />
</application>
</manifest>
onRegister is being called but onMessage is never called. I am getting proper responce from my php server but this methos is never called.
You can find the detail project code from here
http://pastie.org/9168596
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.chatuidemo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
android:name="com.example.chatuidemo.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.example.chatuidemo.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".MessageActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.chatuidemo" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" />
</application>
</manifest>
I just trying to publish my android app, I signed my application from my keystore, but Google Play console displaying me supported devices is zero. I am using Android SDK only for my app. Any reason why this so ??
Android Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.info.android"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />
<uses-feature
android:name="android.harware.telephony"
android:required="true" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!-- Activities -->
<activity
android:name="com.info.SplashActivity"
android:clearTaskOnLaunch="true"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.info.Terms"
android:label="#string/terms_title"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.info.SetPin"
android:label="#string/set_pin_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.AddEditBuddy"
android:label="#string/manage_friends_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.Login"
android:finishOnTaskLaunch="true"
android:label="#string/login_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.Backup"
android:label="#string/backup_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.RestoreActivity"
android:label="#string/restore_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.ClearData"
android:label="#string/clear_data_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.Settings"
android:label="#string/setting_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.StolenMode"
android:label="#string/stolen_setting_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.AppPin"
android:label="#string/apppin_setting_title"
android:screenOrientation="portrait" />
<activity
android:name="com.info.Lock"
android:excludeFromRecents="true"
android:label="#string/lock_title"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.info.Home"
android:label="#string/home_title"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.info.SMSCommands"
android:label="#string/title_activity_smscommands" >
</activity>
<activity
android:name="com.info.FileExplore"
android:label="#string/restore_title" >
</activity>
<!-- Receivers -->
<receiver android:name="com.info.BasicFuzz" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<receiver android:name="com.info.IncomingSMSReceiver" >
<intent-filter android:priority="2147483647" >
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<!-- Services -->
<service android:name="com.info.ResetService" />
<service android:name="com.info.SmartFuzzService" />
<service android:name="com.info.GPSLocationService" />
</application>
</manifest>
Missing a char 'd' in uses-feature android:name="android.harware.telephony"
I am unable to load the live wallpaper preferences from 'Wallpaper>Configure...'.
The preferences load fine when i click the settings button from within the Livewallpaper menu.
Here are some screen shots to better explain the error:
Error Log
The manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.RrD"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<uses-permission android:name="android.permission.INTERNET" />
<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_NETWORK_STATE" />
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:permission="android.permission.BIND_WALLPAPER">
<service android:name=".LiveWallpaper"
android:label="#string/app_name"
android:icon="#drawable/icon">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="#xml/livewallpaper" />
</service>
<activity android:label="PAM_Prefs" android:name=".PAM_Prefs" android:theme="#android:style/Theme.Light.WallpaperSettings" android:exported="true" android:icon="#drawable/icon">
<uses-permission android:name="android.permission.BIND_WALLPAPER" />
</activity>
</application>
</manifest>
figured it out after tinkering around with the manifest file. Added an intent filter 'category.PREFERENCE' & moved BIND_WALLPAPER permission inside the service tag.
here is the new manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.RrD"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BIND_WALLPAPER" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
>
<service android:name=".LiveWallpaper"
android:label="#string/app_name"
android:icon="#drawable/icon"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="#xml/livewallpaper" />
</service>
<activity android:label="PAM_Prefs"
android:name=".PAM_Prefs"
android:exported="true" android:icon="#drawable/icon">
<intent-filter>
<category android:name="android.intent.category.PREFERENCE" />
</intent-filter>
</activity>
</application>
</manifest>