Git Product home page Git Product logo

whatsapp_accessibility_service's Introduction

whatsapp_accessibility_service

WhatsappAccessibilityService is a plugin for interacting with Whatsapp Accessibility Service in Android which activates auto click of send button.

Accessibility services are intended to assist users with disabilities in using Android devices and apps, or I can say to get android os events like keyboard key press events or notification received events etc. for more info check Accessibility Service

Getting Started

To use this package, add whatsapp_accessibility_service as a dependency in your pubspec.yaml file.

Add dependency

dependencies:
  whatsapp_accessibility_service: ^0.0.1

Inside AndroidManifest add this to bind your accessibility service with your application

    .
    .
    <service
        android:name="com.jagrit.whatsapp_accessibility_service.WhatsappAccessibilityService"
        android:exported="false"
        android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
        <intent-filter>
            <action android:name="android.accessibilityservice.AccessibilityService" />
        </intent-filter>
        <meta-data
            android:name="android.accessibilityservice"
            android:resource="@xml/accessibilityservice" />
    </service>
    .
    .
</application>

Create Accesiblity config file named accessibilityservice.xml inside res/xml and add the following code inside it:

<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeWindowsChanged|typeWindowStateChanged|typeWindowContentChanged"
    android:accessibilityFeedbackType="feedbackVisual"
    android:notificationTimeout="300"
    android:accessibilityFlags="flagDefault|flagIncludeNotImportantViews|flagRequestTouchExplorationMode|flagRequestEnhancedWebAccessibility|flagReportViewIds|flagRetrieveInteractiveWindows"
    android:canRetrieveWindowContent="true"
>
</accessibility-service>

Import

import 'package:whatsapp_accessibility_service/whatsapp_accessibility_service.dart'

Usage

to request permission

bool status = await WhatsappAccessibilityService.requestAccessibilityPermission();

to check if accessibility permission is enabled

bool status = await WhatsappAccessibilityService.isAccessibilityPermissionEnabled();

to enable/disable service

await WhatsappAccessibilityService.setServiceEnabled(true);
await WhatsappAccessibilityService.setServiceEnabled(false);

to set custom suffix (on which auto click will work)

await WhatsappAccessibilityService.setCustomSuffix("by Jagrit");
await WhatsappAccessibilityService.setCustomSuffix("     ");

whatsapp_accessibility_service's People

Contributors

jagritjkh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.