I am trying create app widget according the tutorial on this website http://www.developer.com/ws/android/programming/Creating-a-Home-Screen-App-Widget-on-Android-3833306.htm
but I am confused why there are two almost the same receiver tags in the manifest. Could somebody explain the reason please?
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mamlambo.imageswidget"
android:versionCode="1"
android:versionName="1.0">
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true">
<activity
android:name=".ImagesWidgetConfiguration"
android:label="#string/app_name">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<receiver
android:name="ImagesWidgetProvider">
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
<receiver
android:name="ImagesWidgetProvider">
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<data android:scheme="images_widget" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
</application>
<uses-sdk
android:minSdkVersion="3" />
</manifest>
May be your correct codes :
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mamlambo.imageswidget"
android:versionCode="1"
android:versionName="1.0">
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true">
<activity
android:name=".ImagesWidgetConfiguration"
android:label="#string/app_name">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<receiver
android:name="ImagesWidgetProvider">
<intent-filter>
<action
android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<data android:scheme="images_widget" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
</application>
<uses-sdk
android:minSdkVersion="3" />
</manifest>
It will be worked. hopefully
Related
My AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.amedya.amedyaeu">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="eu.amedya.amedyaeu.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>
</application>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</manifest>
Firebase Cloud Messaging and Android WebView project.
Error:(14) Error: The element must be a direct child of the element [WrongManifestParent]
Thank you in advance for your help.
Thank you for your reply.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.amedya.amedyaeu">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="eu.amedya.amedyaeu.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>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
Checkout official doc https://developer.android.com/guide/topics/manifest/manifest-intro.html
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.amedya.amedyaeu">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="eu.amedya.amedyaeu.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>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
Replace your mentifest file with these :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.amedya.amedyaeu">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="eu.amedya.amedyaeu.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>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
Put this lines inside your application tag
Happy Coding!!
Put these tag insid your application tag as follows
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.amedya.amedyaeu">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="eu.amedya.amedyaeu.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>
<service
android:name=".MesajServisi" >
<intent-filter>
<action
android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".IDServisi" >
<intent-filter>
<action
android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
I have an android app running happily on my Samsung S4, and a link to it in a web page. The link is successfully interpreted because the fallback page opens, but my app is not launched. Can someone spot the problem. Link and manifest below...
intent://#Intent;package=fr.notilus.DematAEAT_Android;action=AcquireSignedImage;S.browser_fallback_url=http%3A%2F%2Fwww.lemonde.fr;end
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="fr.notilus.DematAEAT_Android" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<!--suppress UsesMinSdkAttributes-->
<uses-sdk android:minSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:label="DematAEAT_Android" android:icon="#drawable/icon" android:name="mono.android.app.Application" android:allowBackup="true" android:debuggable="true">
<activity android:icon="#drawable/icon" android:label="DematAEAT_Android" android:name="md5abda05033ab0415fc7a776c5d9734c74.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="AcquireSignedImage" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="fr.notilus.DematAEAT_Android.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.fr.notilus.DematAEAT_Android" />
</intent-filter>
</receiver>
</application>
</manifest>
I have been trying to read the Android Developers http://developer.android.com/training/wearables/apps/voice.html#AppProvided but not got anywhere... How can I choose my app to pass the speech input from Google Now to my app?!
My Manifest:
<?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.saltais.todo"
android:versionCode="1"
android:versionName="1.0">
<!-- Dropbox -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:name="com.saltais.todo.NotesApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:allowBackup="true">
<activity
android:name="com.saltais.todo.gui.main.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<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.SEND" />
<category android:name="com.google.android.voicesearch.SELF_NOTE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name="com.saltais.todo.gui.settings.SettingsActivity"
android:label="#string/action_settings"
android:parentActivityName="com.saltais.todo.gui.main.MainActivity"
tools:ignore="UnusedAttribute">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.saltais.todo.gui.main.MainActivity" />
</activity>
<!-- Dropbox -->
<activity android:name="com.dropbox.sync.android.DbxAuthActivity" />
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:launchMode="singleTask" >
<intent-filter>
<data android:scheme="db-XXXXXXXXXXX" /><!--APP_KEY-->
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service
android:name="com.dropbox.sync.android.DbxSyncService"
android:enabled="true"
android:exported="false"
android:label="Dropbox Sync" />
</application>
</manifest>
I am trying to run a widget and i have seen this problem has been discussed in many questions here and every one suggest that a activity should be started so then the app can be shown. I have even started a activity but when i finish the activity , still the widget is not shown.
Here is my manifest . Any help would be appreciated.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mamlambo.imageswidget"
android:installLocation="internalOnly"
android:versionCode="2"
android:versionName="1.0.2" >
<application
android:debuggable="true"
android:icon="#drawable/icon"
android:label="#string/app_name" >
<receiver android:name=".ImagesWidgetProvider" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
<activity
android:name=".ImagesWidgetConfiguration"
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=".Recycle" >
</activity>
<activity android:name=".Search" >
</activity>
<activity android:name=".TabingActivity" >
<intent-filter>
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<data android:scheme="file" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" >
</activity>
<receiver android:name=".ImagesWidgetProvider" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<data android:scheme="images_widget" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
<receiver android:name=".ImagesWidgetProvider" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</receiver>
<receiver
android:name=".CustomReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.DELETE" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
I want to develop a application with widget. Now i only can find the applicaion in widget but cannot find the application in "all programs"
Thank you
my AndroidMainfest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.testing_v1_0" android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".MyActivity" 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=".testing123" android:label="#string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:resource="#xml/widget_provider_full"
android:name="android.appwidget.provider">
</meta-data>
</receiver>
<service android:name=".testing123$UpdateService" />
<activity android:name=".MyActivity">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
<meta-data android:resource="#xml/widget_provider_full" android:name="android.appwidget.provider">
</meta-data>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
</manifest>
Ok you must have inside your Manifest.xml
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".GrupoReformaNews"
android:label="#string/app_name"
android:screenOrientation="portrait">
this in intent filter for your application
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
this in intent filter for your Widget
<receiver android:name="GR_Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/imageswidget_info" />
</receiver>
...
...
...
</application>
if you still having problems, post your manifest.xml