At first my AccessibilityService works well, but when I reboot my Galaxy S10, the service is closed , then I open it manually. I think the service will work same as before , but it doesn't respond anything , even the "onServiceConnected()" is not called.
I tried my code on Galaxy S10 , Android 9 , One UI 1.1 .
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:packageNames="com.android.settings"
android:description="#string/xxx"
android:accessibilityEventTypes="typeWindowContentChanged|typeWindowStateChanged"
android:accessibilityFlags="flagDefault|flagReportViewIds"
android:accessibilityFeedbackType="feedbackAllMask"
android:canRetrieveWindowContent="true"
/>
I tried my code in an Android 9 phone as well, even my service not shown in settings->accessibility...
<?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.example.reviewassistant">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/reviewassistant"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".AssistantService"
android:enabled = "true"
android:exported = "true"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="anroid.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
android:resource="#xml/config_accessibility"/>
</service>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="#string/app_name"
android:accessibilityEventTypes="typeAllMask"
android:accessibilityFeedbackType="feedbackAllMask"
android:canRetrieveWindowContent="true"
android:notificationTimeout="100"
android:accessibilityFlags="flagReportViewIds"
android:packageNames="com.example.reviewassistant"
android:settingsActivity="com.example.reviewassistant.MainActivity"
/>
Related
I have been trying to connect my app to drive using this tutorial:. This tutorial redirects to this website: . I got stuck at point 4 where it asks to edit manifest and redirects here. It seems to me that instructions' aren't clear for the same. Could you please help me out on editing manifest.xml. Thanks.
My manifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bignerdranch.android.drive_app" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
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>
</application>
</manifest>
Based on the tutorial that you are following, these are the changes you should make to your Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bignerdranch.android.drive_app" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity android:name=".MainActivity" >
<meta-data android:name="com.google.android.apps.drive.APP_ID" android:value="id=put-yourID-here" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.apps.drive.DRIVE_OPEN" />
<data android:mimeType="application/vnd.google-apps.drive-sdk.1234567890" />
<data android:mimeType="image/png" />
<data android:mimeType="image/jpeg" />
<data android:mimeType="image/jpg" />
</intent-filter>
</activity>
</application>
</manifest>
By the way, the data android:mimeType elements are optional - but perhaps you will need these for the rest of the tutorial.
I have the next error when I am trying to install my android application to a virtual device (I couldn't test in a real phone).
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="developer.negabur.chistes" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="Business.Categorias"
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>
</manifest>
Your activity name needs to be prefixed with a period, like the following
android:name=".BusinessCategorias"
I have been trying to launch the main activity of my app by voice searching it using google now...Can anyone help me with the code
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="My Voice Activated App" >
</searchable>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.authorwjf.myvoiceactivatedapp" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.authorwjf.myvoiceactivatedapp.MainActivity"
android:label="#string/app_name" >
<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.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I wrote this code to search my app using command -"Okay Google..... Open My Voice Activated App" but this is not working
Say your app name stored in #string/app_name . Your app will reflect in search result (phone)
There is an Activity with data pulled from the remote API. The Manifest file looks like this
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp.glass"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:enabled="true"
android:label="#string/title_activity_main">
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_start" />
</activity>
</application>
</manifest>
The filevoice_trigger_start works and the command from it is properly detected.
<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />
The app does not crash, it works Ok, but it does not appear in the Glass Launcher. Look at the images.
All other apps I instal via the Market are here.
Why?
PS. I install my demo app via the console. It's not live app.
LISTEN_TO is one of the existing commands. The expected behavior is you'll see "listen to" menu and when you tap, you'll see your app under that menu.
<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />
If you want a custom command, try keyword.
voice_trigger_start.xml
<trigger keyword="#string/your_custom_command" />
Edit
Based on your comments, try adding this in your activity tag in your manifest.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You might need to reboot your Glass.
I'm making an android widget, but I got this warning from console when running my application on emulator
No Launcher activity found!
The launch will only sync the application package on the device!
Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.analogclock.android"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="3" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<receiver
android:name=".AnalogClockWidget"
android:label="#string/app_name" />
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/appwidget" />
</application>
</manifest>
What's the reason? Please give me a solution
This is normal as your widget does indeed not have any activity!
I am guessing you are using the Run or Debug button on Eclipse.
In this case the Run button cannot add your widget to the home screen for you, so it only install the package and give you this warning.
Check that your widget appears in the chooser, when you try to add a widget on the home screen. If it does, then it is working as expected :)
EDIT: try with this manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.analogclock.android"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="3" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<receiver
android:name=".AnalogClockWidget"
android:label="#string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/appwidget" />
</receiver>
</application>
</manifest>