skills/mobile/android/SKILL.md
Android root: SDK, activity/fragment lifecycle, permissions model, Material Design, Play Store
npx skillsauth add alphaonedev/openclaw-graph androidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill equips the AI to handle core Android development tasks, including SDK setup, managing activity and fragment lifecycles, implementing the permissions model, applying Material Design principles, and preparing apps for Google Play Store distribution. It focuses on practical implementation for efficient app building.
Use this skill for Android app development scenarios, such as initializing projects with SDK tools, debugging lifecycle events (e.g., onPause or onDestroy), requesting runtime permissions, designing responsive UIs with Material components, or automating Play Store uploads. Apply it when working on mobile apps in the "mobile" cluster, especially for Google ecosystem integrations.
sdkmanager --list to view packages.To set up a new Android project:
gradle init --type android-library to create a basic project.adb devices to list devices; adb logcat with flags like -s MyApp for filtered logs; sdkmanager --install "build-tools;30.0.3" to install specific SDK components.@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
}
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me" />
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// Initialize views here
}
Integrate Android SDK by setting environment variables: export ANDROID_HOME=/path/to/sdk and add to PATH. For Google services, include Google Play Services in build.gradle: implementation 'com.google.android.gms:play-services-auth:20.1.0' and use $GOOGLE_API_KEY for API calls (e.g., in HTTP requests: Authorization: Bearer $GOOGLE_API_KEY). When combining with other skills, ensure compatibility: For mobile cluster integrations, align with iOS skill for cross-platform configs; use JSON config files like {"apiKey": "$GOOGLE_API_KEY"} for Play Store automation scripts.
Handle permission errors by checking results in onRequestPermissionsResult(): If request is denied, log with Log.e("Permission", "Denied") and prompt user via AlertDialog. For lifecycle issues (e.g., NullPointerException in onDestroy), use try-catch blocks around resource releases. Common SDK errors: If sdkmanager fails, verify internet connectivity or use --verbose flag for details. For Play Store API, catch HttpException for 401 errors by re-authenticating with $GOOGLE_API_KEY. Always wrap API calls in try { ... } catch (Exception e) { Log.d("Error", e.getMessage()); }.
Implementing an activity with permission check: Create an activity to request camera access:
public class CameraActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 100);
}
}
}
Then build and run: ./gradlew assembleDebug && adb install app/build/outputs/apk/debug/app-debug.apk.
Using Material Design for a login screen: Design a fragment with Material components:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:hint="Username" />
</com.google.android.material.textfield.TextInputLayout>
In the fragment: Override onCreateView() to inflate and handle user input, ensuring compatibility with activity lifecycle.
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui