This project is a sample Android app that showcases best practices when optimizing for different form factors, such as phones, tablets, and desktop devices. It demonstrates how to create adaptive layouts and handle various input methods to provide a seamless user experience across different screen sizes and device capabilities. ππ¨
The app retrieves the first 20 videos from the Amazon Appstore Developers YouTube Channel using the open-source library YoutubeParser by @prof18. π
Key features include:
- Implementing adaptive layouts using Jetpack Compose for responsive UI and window resizing π
- Handling mouse events such as hover and right click π±οΈ
- Handling special keyboard events such as
(CTRL-<Key>)
β¨οΈ - Launching Android notifications on different devices π
- Checking availability of hardware features and capabilities π
To run this project, you will need the following:
- Android Studio π οΈ
- An Android device or emulator running Android 5.0 (API level 21) or higher π±
-
Clone the repository:
git clone https://github.com/AmazonAppDev/android-multi-form-factor-demo.git
-
Create a Google Cloud API key for the YoutubeParser feed retrieval. π
-
Add your Browser API Key to the
local.properties
file in the root of your project:google_cloud_api_key="Your Google Cloud API Key"
-
Open the project in Android Studio. π
-
Run the app on your Android device or emulator.
βΆοΈ
Resize the app window on devices with larger screens to see how the layout adapts to different dimensions. In the Notifications section, you can launch a test notification to see how it integrates with the device's notification system. πͺπ
If you encounter a bug or want to suggest a new feature, please file an issue. ππ‘
If you have questions, comments, or need help with the code, we're here to assist you:
- Tweet at us on Twitter @AmazonAppDev π¦
- Ask questions on Stack Overflow using the
amazon-appstore
tag π
Don't forget to sign up for the developer newsletter to stay updated with the latest news and resources! π§
This project is licensed under the MIT-0 License.
We hope this sample app helps you create amazing adaptive Android experiences! πβ¨