Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Add Android Widget Glance

ASecurity

Add an Android home screen widget using Glance (Compose for widgets). Native Kotlin module via expo-modules-core. Use when the user says 'add widget android', 'glance widget', 'home screen widget android'.

3 stars
0 votes
0 copies
0 views
Added 10/4/2026
developmentgokotlinbashreactbackend

Works with

cli

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned 10/4/2026

$npx -y skills add khadinakbarlabs/expo-mobile-app-builder --skill add-android-widget-glance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Add Android Widget Glance?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Add Android Widget Glance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khadinakbarlabs-add-android-widget-glance/badge)](https://www.skillsdirectory.com/skills/khadinakbarlabs-add-android-widget-glance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: "add-android-widget-glance"
description: "Add an Android home screen widget using Glance (Compose for widgets). Native Kotlin module via expo-modules-core. Use when the user says 'add widget android', 'glance widget', 'home screen widget android'."
---

# Add Android Widget (Glance)

Home screen widgets. Glance = Compose for widgets.

## Reality check
RN/JS cannot run in widget context. Must drop to native Kotlin via Glance.

## Path 1: Expo native config plugin

Create a custom config plugin that injects widget Kotlin code into the prebuild output.

Example structure:
```
my-app/
  plugins/
    withAndroidWidget.js  # Config plugin
  android-templates/
    HabitWidget.kt
    HabitWidgetReceiver.kt
    widget_layout.xml
    widget_info.xml
```

## Path 2: react-native-android-widget

Community library that abstracts most of this:
```bash
pnpm add react-native-android-widget
```

Lets you write widget UI in JSX:
```tsx
<View style={{ padding: 8, flex: 1 }}>
  <Text>Habit streak</Text>
  <Text>{streak} days</Text>
</View>
```

Limitations:
- Updates only every 30 min minimum
- No animations
- Limited components
- Click intent must launch deep link

## Widget update strategies

| Trigger | Cadence | Use |
|---|---|---|
| onAppForeground | Every app open | Daily counters |
| WorkManager | 30 min minimum | Time-based |
| User interaction | On widget tap | Quick toggles |

## Widget size constraints

- Small: 1×1 cell (~110×110 dp)
- Medium: 2×2 or 4×1 (~260×130 dp)
- Large: 4×2 or 4×4 (~260×280 dp)
- Adaptive (Android 12+): single XML, auto-resizes

## Common gotchas
- Background tinting only — Glance, not full bitmap
- Limited intent actions (tap or button only)
- No live data binding without manual update calls
- Pinning programmatically requires Android 8+ and user gesture
- Some launchers don't honor adaptive size

## Pair with
- `add-android-quick-actions` for related shortcuts
- `set-up-cloudflare-workers-backend` if widget shows server data

Attribution

khadinakbarlabskhadinakbarlabs
View sourceSee grades on GitHubMore from khadinakbarlabs →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

286712 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Writing Plans

Use when you have a spec or requirements for a multi-step task, before touching code

2927051 votes
View all in development →