Back to QuickRef
Android Development
Essential Android development links and quick references
Overview
Essential Android development resources, APIs, and tools for quick reference during development.
Quick Links
Documentation
- Android Developer Docs: Official Documentation
- API Reference: Android API
- Material Design: Design Guidelines
- Jetpack Compose: Modern UI Toolkit
Phone Number Hinting API
- Phone Hint API: Auto-fill phone numbers
- SMS Retriever: Automatic SMS verification
// Phone Number Hint API example
private fun requestHint() {
val hintRequest = HintRequest.Builder()
.setPhoneNumberIdentifierSupported(true)
.build()
val intent = Credentials.getClient(this).getHintPickerIntent(hintRequest)
startIntentSenderForResult(intent.intentSender, RESOLVE_HINT, null, 0, 0, 0)
}
Essential APIs & Services
- Firebase: Backend services
- Google Play Services: Core APIs
- Biometric API: Fingerprint/Face auth
- Camera2 API: Camera controls
Code Snippets
// Biometric Authentication
private fun showBiometricPrompt() {
val biometricPrompt = BiometricPrompt(this, ContextCompat.getMainExecutor(this),
object : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
super.onAuthenticationSucceeded(result)
// Authentication succeeded
}
})
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle("Biometric Authentication")
.setSubtitle("Log in using your biometric credential")
.setNegativeButtonText("Cancel")
.build()
biometricPrompt.authenticate(promptInfo)
}
// Permission Request (Modern approach)
private val requestPermissionLauncher = registerForActivityResult(
ActivityResultContracts.RequestPermission()
) { isGranted: Boolean ->
if (isGranted) {
// Permission granted
} else {
// Permission denied
}
}
// Usage
requestPermissionLauncher.launch(Manifest.permission.CAMERA)
Tools & Resources
- Android Studio: IDE Download
- ADB Commands: Debug Bridge
- Gradle Plugin: Build system
- ProGuard/R8: Code shrinking
Key Points
- Use Jetpack Compose for modern UI development
- Implement proper permission handling for API 23+
- Follow Material Design guidelines
- Use ViewBinding/DataBinding for view references
- Implement proper lifecycle management
See Also
Categories:
linksLast updated: January 1, 2024