0% found this document useful (0 votes)
60 views11 pages

03 Chapitre 2

The document discusses exploring Android documentation and templates in Android Studio. It describes tasks like exploring the official Android developer documentation on guides, references, samples and design quality. It also discusses exploring Stack Overflow to search for Android related questions and answers. Finally, it discusses templates available in Android Studio for adding new project components like activities quickly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views11 pages

03 Chapitre 2

The document discusses exploring Android documentation and templates in Android Studio. It describes tasks like exploring the official Android developer documentation on guides, references, samples and design quality. It also discusses exploring Stack Overflow to search for Android related questions and answers. Finally, it discusses templates available in Android Studio for adding new project components like activities quickly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

M35 : Programmation Mobile

TP 2 : Exploration de la documentation Android

Master STRI
(Systèmes de Télécommunication et Réseaux informatiques)
2022/2023

Réalisé par : Mohamed Amine Errabi


Charaf Faouzi

M35 : PROGRAMMATION MOBILE 2022/2023


Introduction
The richness of documentation is one of the strengths of programming Android-
based mobile applications. In this lab we will learn about the most important
resources available to Android developers.

Tâche 1 : Explorer la documentation officielle des développeurs Android


1) We go to https://developer.android.com/docs/

2) At the top of the documentation page menu, we look for the GUIDES, RERERENCE,
SAMPLES, and DESIGN & QUALITY links. We follow each of the links and familiarize with the
navigation structure.

 Guides: These documents teach you how to build Android apps using APIs in the Android
framework and other libraries.
 Reference: These documents contain the Android API reference and additional libraries that
make it easy to add additional functionality and features to your app.
 Samples: A selection of code samples and templates for you to use to accelerate your app
development.
 Design & Quality: The following link provide everything you need to design a high quality
Android app including Material design guidelines, Material design components and App
quality guidelines.
We use search or navigate the documentation to complete the following tasks:
3) See the “API Guide to Launcher Icons” to learn more about how to design effective launcher
icons.
An adaptive icon, or AdaptiveIconDrawable, can display differently depending on individual
device capabilities and user theming. Adaptive icons are primarily used by the launcher on the
homescreen, but can also be used in shortcuts, the Settings app, sharing dialogs, and the
overview screen.

M35 : PROGRAMMATION MOBILE 2022/2023


4) Learn how to monitor your app's resource usage in Android Studio.

The Android Profiler tools provide real-time data to help you to understand how your app uses
CPU, memory, network, and battery resources.

5) Read and summarize android quality best practices.

A quality application is an application that is secure and easy to use, can change the size of its
window while using the application on a larger device such as a Tablet, also that targets all
segments of society. Listed down are few best practices that you can take on to have better
outcomes in your development.

 Choose Suitable Development Method


 Maintain High Code Quality
 Always keep a consistent coding style and accurate Architecture
 Avoid Deep Level in Layouts
 Keep Design in Mind

M35 : PROGRAMMATION MOBILE 2022/2023


6) The main differences between Material Design 2 & Material Design 3 is that Dynamic color
experiences are built with M3 color schemes, starting with Android 12, users can generate
individualized patterns via wallpaper selection and other customization settings.

Tâche 2 : Explorer StackOverflow


Stack Overflow is a community of millions of programmers helping each other. If you run into a
problem, chances are someone else has already posted an answer on this forum. On
StackOverflow, you can even ask, "How do I set up and use ADB over Wi-Fi?", or "What are the
most common memory leaks in Android development?"
In this task, we will explore the basic functionality of this great platform.

1) We go to Stack Overflow website: https://stackoverflow.com/

M35 : PROGRAMMATION MOBILE 2022/2023


2) We join the Stack Overflow community by signing up to its online platform

3) In Stack Overflow search box, we type [android]. And explore an android related question that
received more than 20 answers.

4) We can combine tags and search terms to make the search more specific. Like: [android] and
[layout]. And then explore an android related question that received more than 1000 votes.

M35 : PROGRAMMATION MOBILE 2022/2023


5) We summarize the many ways in which we can search on StackOverflow.

The link bellow shows how to search in the website: https://stackoverflow.com/help/searching

6) Explain in detail the mechanism used by Stack Overflow to reward users who regularly provide
useful content.
StackOverflow members can vote for questions and answers posted, the purpose of these votes
is to highlight quality answers while rewarding their actors, giving them access to privileges when
certain reputation thresholds are reached, for example: being able to vote see fewer ads, being
able to close questions
7) How Stack Overflow accepts a response as valid response?

When a user receives a good answer to their question, that user has the option to "accept" an
answer. Acceptance is indicated by a colored checkmark next to the answer that has been
accepted by the original author of the question.

M35 : PROGRAMMATION MOBILE 2022/2023


Tâche 3 : Explorer les templates d’Android Studio
Android Studio provides templates for common and recommended app and activity designs.
Using built-in templates saves time, and helps you follow design best practices. Each template
incorporates a skeleton activity and user interface.
One of the most common uses of templates is adding new activities to an existing app module.
For example, to create a login screen for your app’s users, add an activity with the Login Activity
template.
The list of templates provided in Android Studio is constantly growing. Android Studio groups
templates by the type of component that they add, such as an Activity or an XML file.
1) What are the current integrated template in the latest Android Studio version?
When you use Android Studio latest version to develop your app with Jetpack Compose, you
can take advantage of smart editor features, such as new project templates and the ability to
immediately preview your Compose UI.

M35 : PROGRAMMATION MOBILE 2022/2023


2) How can we add an Android project component using a template?

To add an Android project component using a template, use the Project window. Right-click the
folder where you want to add the new component, and then select New. Depending on the
components that can be added to the folder you clicked, you then see a list of template types.
3) Choose and explore the architecture of one of the common activity templates for Android
smartphone and tablet apps.
Taking into account the common architectural principles mentioned in the previous section,
each application should have at least two layers:

 The UI layer that displays application data on the screen.


 The data layer that contains your application's business logic and exposes your
application's data. the application.
4) After installed successfully Android Studio in our computer:
a) We create a new project with the previous question chosen template.

M35 : PROGRAMMATION MOBILE 2022/2023


b) We inspect the corresponding template Java code and XML configuration files.

After we check the Accessing Resources for details on the XML syntax for accessing resources.

M35 : PROGRAMMATION MOBILE 2022/2023


c) We build and run the application.

M35 : PROGRAMMATION MOBILE 2022/2023


M35 : PROGRAMMATION MOBILE 2022/2023

You might also like