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>
Related
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 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
This is my android Manifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.halfninja.wallpaper.parallax">
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</service>
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
</activity>
</application>
</manifest>
Still Eclipse showing the result
ParallaxWallpaper] No Launcher activity found!
ParallaxWallpaper] The launch will only sync the application package on the device!
ParallaxWallpaper] Performing sync
ParallaxWallpaper] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
Please let me Know where am i doing the mistake, and what would be the solution...???
Move the intent-filter tag from service to activity
These lines should be in Activity tag
<application
android:label="#string/app_name"
android:icon="#drawable/icon">
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:label="#string/app_name"
android:name=".ParallaxWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
</service>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/wallpaper" />
</application>
make activity as launcher you have made service as launcher. like that
<activity
android:label="#string/wallpaper_settings"
android:name=".ParallaxWallpaperSettings"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have an error in my android code:
case R.id.bSQLOpenView:
Intent i = new Intent("com.fps.say.SQLView");
startActivity(i);
break;
and my logcat says there's no activity found to handle intent..
I already declared my class at AndroidManifest.xml why do i still get this error.
this is my manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fps.say"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Splash"
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=".Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.fps.say.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".SayActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.fps.say.SAYACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TextPlay"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.fps.say.TEXTPLAY" />
</intent-filter>
</activity>
<activity
android:name=".Email"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.fps.say.EMAIL" />
</intent-filter>
</activity>
<activity
android:name=".Camera"
android:label="Camera Application"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="com.fps.say.CAMERA" />
</intent-filter>
</activity>
<activity
android:name=".AboutUs"
android:label="#string/app_name"
android:theme="#android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.fps.say.ABOUTUS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Prefs"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.PREFS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Data"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.DATA" />
</intent-filter>
</activity>
<activity
android:name=".GFX"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.GFX" />
</intent-filter>
</activity>
<activity
android:name=".GFXSurface"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.GFXSURFACE" />
</intent-filter>
</activity>
<activity
android:name=".OpenedClass"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.OPENEDCLASS" />
</intent-filter>
</activity>
<activity
android:name=".SoundStuff"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SOUNDSTUFF" />
</intent-filter>
</activity>
<activity
android:name=".Slider"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SLIDER" />
</intent-filter>
</activity>
<activity
android:name=".Tabs"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.TABS" />
</intent-filter>
</activity>
<activity
android:name=".SimpleBrowser"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SIMPLEBROWSER" />
</intent-filter>
</activity>
<activity
android:name=".SharedPrefs"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SHAREDPREFS" />
</intent-filter>
</activity>
<activity
android:name=".InternalData"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.INTERNALDATA" />
</intent-filter>
</activity>
<activity
android:name=".ExternalData"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.EXTERNALDATA" />
</intent-filter>
</activity>
<activity
android:name=".SQLView"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SQLVIEW" />
</intent-filter>
</activity>
<activity
android:name=".SQLiteExample"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.fps.say.SQLITEEXAMPLE" />
</intent-filter>
</activity>
</application>
</manifest>
There are several possible ways to run an activity.
Here's the method I use:
Intent i = new Intent (this, YourTargetActivity.class);
startActivity(i);
The this corresponds to your current activity.
Using such a call gives you the convenience to have your IDE autocomplete the desired activity name.
Dubble check the name of the class
Dubble check the name which should be mentioned in the manifest file
Perform a clean-build
Intent i = new Intent(this,SQLVIEW.class);
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