Google Play. Publish status: Rejected - android

My app rejected by Google Play 3 times.
This is mail that they sent me:
In previous versions of the app, there were some permissions that I didn't request, I thought that was a problem and deleted those permissions and resubmitted the app and again I got rejected
My app asked to set the app as the Default Phone after signing up and if the user didn't set the app as the Default Phone, the app asked for some permissions.
This is my manifest file:
<?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.xxxxxx.xxxxxx">
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:name=".MyApplication"
android:allowBackup="false"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.XXXX.Light"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".AuthActivity"
android:exported="true"
android:hardwareAccelerated="true"
android:theme="#style/Theme.App.Starting"
android:windowSoftInputMode="stateVisible|adjustResize">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="fontScale|density"
android:exported="false"
android:hardwareAccelerated="true"
android:windowSoftInputMode="stateVisible|adjustResize">
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
</activity>
<!-- <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />-->
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="#string/facebook_client_token" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/primary" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/ic_launcher_foreground" />
<service
android:name=".core.service.AppFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver
android:name=".core.service.CallReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
</application>
</manifest>
In main they wrote that app "Requested permissions do not match core functionality of the app"
but the app needs all permissions.
- this permission need to connect with the backend
- this one is for reading contacts and showing to user
- this one is for adding new contacts this is also app functionality
- this one is for reading calls and showing to the user
- this one is for get images from gallery and setting to avatar
- and this one for call from app
What is a problem, can someone help me?

You can re request the review with explaining all the use cases for all the permissions. Also check that you have selected that correct category in the Google play console in the app description(Maybe select something similar to Phone dialier)
I also found one issus in the manifest file is that it uses usesCleartextTraffic which transports says that app uses http API which is not encrypted in transit. Since you are dealing with lots of sensitive data yoi should also remove that flag

Related

URI scheme in your app's manifest is not set up correctly

I am trying to connect my Dropbox, i do not know where this problem comes from but I have edited the manifest file well! what am I doing wrong can anyone help me please...
this is my manifest file :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.JurnalCloudApp">
<activity
android:name=".DropboxActivity"
android:exported="true" />
<activity
android:name=".SyncActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask">
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-is9rikcfjhforcl" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"/>
</application>
And the Error is:
Caused by: java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.core.android.AuthActivity with the scheme: db-db-is9rstkcfjhlorcl
Your data android:scheme looks correct. Based on the error message, it looks like you're passing in "db-YOURAPPKEY" to the startOAuth2PKCE method to start the app authorization flow, when you should just specify the app key only, that is, "YOURAPPKEY" (no "db-").
If you include that "db-" in your app key in your code, the SDK will expect "db-db-is9rstkcfjhlorcl" (with an extra "db-") in your Manifest, which would be incorrect.
Hmm i deleted the code of that line (db-), this time I encountered this error:
same error without two -db
URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.core.android.AuthActivity with the scheme: db-is9rikcfjhforcl
manifest file:
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask">
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="is9rikcfjhforcl" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Auth.startOAuth2Authentication(this, this.getString(R.string.app_key));
and string resource:
<string name="app_key">is9rikcfjhforcl</string>

Comcast XfinityStream Android App APK Fire TV Stick

I have a Amazon Fire TV Stick (Gen 2) and I have been trying to sideload my Comcast XfinityStream APK to the device so I can watch live TV from the service I pay for. It is successfully installed on the device, but when I open it, it just shows a black screen and goes back to the main menu on the Fire Stick. I used a couple of the older versions, which up until recently worked fine, but they have since retired them and now none of them work. I am trying to get their newest play store app release to work correctly.
My main question is this: what causes an Android app to open, show a black screen, and within no time, goes back to the main menu screen on an Android device, with no errors or messages displayed? Does the Fire TV stick, being that is Android-based, have a directory where I check for logs of some sort when this type of app behavior happens?
Since the Fire TV stick is Android-based architecture on 5.x Lollipop, it should load up the same way as it does on my phone, in theory, but it doesn't. I have downloaded the APK file and looked into the manifests file, but haven't seen anything in there or a few other places I've looked that could show some type of restriction or 'blacklisting', if you will, the Fire TV stick from being able to use it. The API levels look correct as well as the hardware requirements. Does anyone have an idea what this could be? Here is the manifests file when it was decompiled:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:"http://schemas.android.com/apk/res/android" android:versionCode="40201001" android:versionName="4.2.1.001" android:installLocation="auto" package="com.xfinity.cloudtvr" platformBuildVersionCode="24" platformBuildVersionName="7.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="24" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.xfinity.cloudtvr.permission.C2D_MESSAGE" android:protectionLevel="signature|signatureOrSystem" />
<uses-permission android:name="com.xfinity.cloudtvr.permission.C2D_MESSAGE" />
<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_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:theme="0x7f0c010c" android:label="#string/app_name" android:icon="0x7f0200da" android:name="com.xfinity.cloudtvr.XtvApplication" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:resizeableActivity="false" android:networkSecurityConfig="0x7f060001">
<activity android:theme="0x7f0c010d" android:label="" android:name="com.xfinity.cloudtvr.view.BrowseActivity" android:launchMode="singleTop" android:windowSoftInputMode="20">
<intent-filter>
<data android:scheme="#string/localytics_push_key" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity android:name="com.xfinity.cloudtvr.view.authentication.WebAuthCallbackHelperActivity" android:exported="true">
<intent-filter>
<data android:scheme="#string/partner_continue_url_scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.comcast.cim.android.view.launch.IntentForwardingActivity" android:launchMode="singleTask">
<intent-filter>
<data android:scheme="#string/deep_linking_scheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data android:scheme="#string/universal_deep_linking_scheme_1" />
<data android:host="#string/universal_deep_linking_host_1" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data android:scheme="#string/universal_deep_linking_scheme_2" />
<data android:host="#string/universal_deep_linking_host_1" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data android:name="LOCALYTICS_APP_KEY" android:value="#string/localytics_app_key" />
<receiver android:name="com.localytics.android.ReferralReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<activity android:name="com.localytics.android.PushTrackingActivity" />
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:permission="com.google.android.c2dm.permission.SEND" android:exported="true">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.xfinity.cloudtvr" />
</intent-filter>
</receiver>
<service android:name="com.localytics.android.GcmListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service android:name="com.localytics.android.InstanceIDListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service android:name="com.xfinity.common.analytics.LocalyticsCrashReportingIntentService" android:exported="false" />
<activity android:name="com.xfinity.common.view.LaunchActivity" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:theme="0x7f0c0200" android:label="" android:name="com.xfinity.cloudtvr.view.authentication.EligibilityCheckActivity" android:launchMode="singleTop" android:windowSoftInputMode="10" />
<activity android:name="com.comcast.cim.android.view.settings.SignoutActivity" android:noHistory="true" />
<activity android:theme="0x7f0c010e" android:label="" android:name="com.xfinity.cloudtvr.view.PlayerActivity" android:launchMode="singleTop" android:configChanges="orientation|screenSize" android:windowSoftInputMode="20" android:parentActivityName="com.xfinity.cloudtvr.view.BrowseActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".view.BrowseActivity" />
</activity>
<activity android:theme="0x7f0c0203" android:label="#string/settings" android:name="com.xfinity.cloudtvr.view.settings.XtvSettingsActivity" />
<receiver android:name="com.xfinity.cloudtvr.inhome.ConnectionChangedBroadcastReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<service android:name="com.xfinity.cloudtvr.downloads.XtvDownloadService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.XtvDownloadsNotificationReceiver$XtvNotificationBuilderService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.model.resumepoint.ResumePointSyncIntentService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.model.user.parentalcontrols.ParentalControlsSyncIntentService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.DownloadUpdateService" android:exported="false" />
<service android:name="com.xfinity.cloudtvr.downloads.DownloadPermCacheReloadService" android:exported="false" />
<activity android:name="com.xfinity.cloudtvr.view.settings.SettingsWebViewActivity" />
<service android:name="com.xfinity.common.user.FavoritesSyncIntentService" />
<activity android:theme="#*android:style/Theme.Translucent" android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity android:theme="#style/Theme_IAPTheme" android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" />
<activity android:theme="#*android:style/Theme.Translucent.NoTitleBar" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
</application>
</manifest>
I have been looking at this in notepad, so don't have the best view to look at all of the code and I am sort of new to Android coding and app development so I am just trying to see if anyone else who develops apps more in depth would know where to look and how to possibly fix the issue. I have tried installing Android System Webview and Google Chrome on the Fire TV stick without issues and that is what made the app work in its previous versions that have now since been retired.
Does anyone know where or what I could look for in the decompiled code or files that may impact/restrict the app when it is trying to start on the Fire TV Stick?
Here is the APK file version I am using: http://www.apkmirror.com/apk/comcast/xfinity-stream/xfinity-stream-4-2-1-001-release/xfinity-stream-4-2-1-001-android-apk-download/
I am sure this thread will be of much needed help for others as well because there are a bunch of people who have sideloaded this app and who are now experiencing this issue trying to get a new APK file up and running on the Fire TV Stick.

Android App incompatible with all devices

Android Developer Console says my app is incompatible with all devices. However it is tight lipped as to why. Near as I can tell the reason is, according to an article I read, most likely from my android manifest being messed up. But I can't seem to figure out why. I have another app in the app store which is compatible with everything. So what's the issue?
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="Writing Analyzer"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme">
<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=".ResultsActivity"/>
</application>
Edit: Some more info
-Minimum SDK is 15
-I am only using one external library, OpenNLP
-As part of OpenNLP I have a model in the assets folder
-I have a class that extends BaseListAdapter
Edit: Here is the full merged manifest. Sorry didn't realize at first that would be needed.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="3"
android:versionName="2.0"
package="textsnoop.rddigi.com.textstats"
platformBuildVersionCode="25"
platformBuildVersionName="7.1.1">
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="25" />
<meta-data
android:name="android.support.VERSION"
android:value="25.3.0" />
<uses-permission
android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.WAKE_LOCK" />
<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="textsnoop.rddigi.com.textstats.permission.C2D_MESSAGE"
android:protectionLevel="0x2" />
<uses-permission
android:name="textsnoop.rddigi.com.textstats.permission.C2D_MESSAGE" />
<application
android:theme="#ref/0x7f0800a3"
android:label="Writing Analyzer"
android:icon="#ref/0x7f030000"
android:allowBackup="true"
android:supportsRtl="true"
android:roundIcon="#ref/0x7f030001">
<activity
android:name="textsnoop.rddigi.com.textstats.MainActivity">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="textsnoop.rddigi.com.textstats.ResultsActivity" />
<activity
android:theme="#ref/0x0103000f"
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="0xfb0" />
<activity
android:theme="#ref/0x7f080111"
android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" />
<activity
android:theme="#ref/0x01030010"
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
android:permission="android.permission.INSTALL_PACKAGES"
android:enabled="true">
<intent-filter>
<action
android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">
<intent-filter>
<action
android:name="com.google.android.c2dm.intent.RECEIVE" />
<action
android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category
android:name="textsnoop.rddigi.com.textstats" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">
<intent-filter
android:priority="-500">
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:authorities="textsnoop.rddigi.com.textstats.firebaseinitprovider"
android:initOrder="100" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#ref/0x7f0c0003" />
</application>
Please check your permissions and features in manifest file. Especially if you're mentioning any feature/permission that has required attribute e.g: <
uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="true"/>
Remove the "android:required=true " part then it should work fine in Play Store.
I don't know exactly what caused the change, but I went through and cleaned the project with lint. I also removed a call to the apache commons io from the app. I suspect that is most likely the issue.
A possible reason for this is that your minimum API level is high, leading to your app being incompatible with many devices. Checkout:
Changing API level Android Studio if you want to change your minimum API level.
Try setting all the uses-feature"-tags to false
Try removing all permissions (I know the app won't work without them, but just for the sake of figuring out why Google Play says that the app supports 0 devices)

Google Play rejects APK based on package name

Been building an app within MIT's App Inventor (herecy on this site I know.) I uploaded the first version to Google Play yesterday and all went smoothly. Tried to push a new APK to production this morning but got this error;
http://i.stack.imgur.com/GzBD9.png
(sorry not enough rep to post images)
Confused, I went ahead and decompiled the APK and got this;
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2" android:versionName="1.0.1" package="appinventor.ai_benjamdavidstocker.IGSoundboard"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:label="IGSoundboard" android:icon="#drawable/ya" android:debuggable="false">
<activity android:name=".Screen1" android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="appinventor.ai_benjamdavidstocker.IGSoundboard.Board" android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:name="com.google.appinventor.components.runtime.ListPickerActivity" android:screenOrientation="behind" android:configChanges="keyboardHidden|orientation" />
<activity android:name="com.google.appinventor.components.runtime.WebViewActivity" android:screenOrientation="behind" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
As you can see, package="appinventor.ai_benjamdavidstocker.IGSoundboard"
which matches the one Google Play is requesting. So what's the problem?
The Capitalization in SoundBoard is different on the word Board
instead of
appinventor.ai_benjamdavidstocker.IGSoundboard
it should be
appinventor.ai_benjamdavidstocker.IGSoundBoard
IGSoundBoard with a capital 'B'

What entitles an apk to be like a 'widget'?

In android developer website, app widget is implemented as a combination of:
AppWidgetProviderInfo object
AppWidgetProvider class
Initial view layout
A typical example of app widget shown in AndroidManifest.xml is:
<receiver android:name="ExampleAppWidgetProvider" > // item '2'
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/example_appwidget_info" /> // item '1'
</receiver>
And item '1' often describe where item '3' is:
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="294dp"
android:minHeight="72dp"
android:updatePeriodMillis="86400000"
android:previewImage="#drawable/preview"
android:initialLayout="#layout/example_appwidget" // item '3'
android:configure="com.example.android.ExampleAppWidgetConfigure"
android:resizeMode="horizontal|vertical">
</appwidget-provider>
I've seen many app widget examples like this.
However i still don't understand what signature 'AppWidget framework' use to find all app widgets on the phone and put them under 'Widgets' tab in main menu.
To enable app to be shown under 'All apps' tab in main menu, you can add below to one of its activity's intent filter.
<category android:name="android.intent.category.LAUNCHER" />
however, what are the corresponding magic keywords for app widget? How does launcher recognize an app widget and put it under 'Widgets' tab?
I know it's probably NOT because of the item 1,2,3 signature, 'cause i came across an old app widget that someone else developed, and i can not see the 1,2,3 pattern. And i have no idea how 'AppWidget framework' can figure out it's a app widget.
I list the old app widget's manifest file below, if you can point out where should i look for clues, i'll really appreciate it.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.weather">
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<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_MOCK_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:process="com.example.weather.sinaweather"
android:label="#string/app_name"
android:icon="#drawable/widget_weather_icon">
<provider
android:name=".provider.WeatherProvider"
android:authorities="com.example.weather" />
<activity
android:name=".WeatherDetail"
android:excludeFromRecents="true">
</activity>
<activity
android:name=".WeatherDetailActivity"
android:launchMode="singleTop"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize|keyboardHidden|navigation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".AlertActivity"
android:excludeFromRecents="true"
android:theme="#android:style/Theme.Dialog">
<intent-filter>
<!--action android:name="android.intent.action.MAIN" /-->
<!--category android:name="android.intent.category.LAUNCHER" /-->
</intent-filter>
<intent-filter>
<action android:name="com.example.weather.action.START_WEATHER_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.example.weather.action.START_WEATHER_APPLICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".WeatherDisplayCurrentDialog"
android:excludeFromRecents="true"
android:theme="#android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.example.weather.DISPLAY_CURRENT_CONFIGURE" />
</intent-filter>
</activity>
<activity
android:name=".AddCityActivity"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize|keyboardHidden|navigation|locale">
<intent-filter>
<action android:name="com.example.weather.action.START_WEATHER_SETTINGS_INTELNAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".SearchCityActivity"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize|keyboardHidden|navigation">
</activity>
<service android:name=".WeatherService">
<intent-filter>
<action android:name="com.example.weather.INIT_APP" />
<action android:name="com.example.weather.WEATHER_RETRY" />
<action android:name="com.example.weather.RESET_AUTO_UPDATE_ALARM" />
<action android:name="com.example.weather.WEATHER_AUTOUPDATE" />
<action android:name="com.example.weather.action.NEED_WEATHER_INFO" />
<action android:name="com.example.weather.action.TOP_CITY_CHANGED" />
<action android:name="com.example.weather.LOCATION_UPDATE" />
</intent-filter>
</service>
<receiver
android:name=".WeatherReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="com.example.weather.RESTART_SERVICE" />
</intent-filter>
</receiver>
</application>
</manifest>
Read this article for detailed instructions on creating and declaring a widget. What you call the '1-2-3' pattern is required in manifest.

Categories

Resources