Today we're announcing a guide to Android app architecture along with a
preview of Architecture Components. Rather than reinventing the wheel,
we're also recognizing the work done by popular Android libraries.
Showing posts with label CS-Android Flutter. Show all posts
Showing posts with label CS-Android Flutter. Show all posts
Wednesday, February 22, 2017
Wednesday, February 22, 2017
Android and Architecture
Tuesday, February 21, 2017
Tuesday, February 21, 2017
Consuming a RESTful Web Service with Spring for Android
This Getting Started guide walks you through the process of building an application that uses Spring for Android's
RestTemplate to consume a Spring MVC-based RESTful web service.Compile và chạy ứng dụng rest server
You will build an Android client that consumes a Spring-based RESTful web service. Specifically, the client will consume the service created in Building a RESTful Web Servce.
Chạy spring boot rest: java -jar gs-rest-service-0.1.0.jar
The Android client will be accessed through an Android emulator, and will consume the service accepting requests at:
http://192.168.1.3:8080/greeting
The service will respond with a JSON representation of a greeting:
{"id":1,"content":"Hello, World!"}
The Android client will render the ID and content into a view.
Monday, February 20, 2017
Monday, February 20, 2017
Spring for Android Showcase
Introduction
This showcase includes an Android client and a Spring MVC server. Together these illustrate the interaction of the client and server when using Spring for Android. This Android project requires set up of the Android SDK. See the main README at the root of this repository for more information about configuring your environment.
Saturday, April 16, 2016
Saturday, April 16, 2016
Introduction to Selendroid
Have you ever developed an Android application and publish it to Google Play? What will you do if you get a user review like -
Saturday, April 16, 2016
Install Android Studio & Java8
Install Java JDK 1.8
- Download jdk-8uversion-linux-x64.tar.gz file from http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Unpack the tarball and install the JDK.
% tar zxvf jdk-8uversion-linux-x64.tar.gz - Set up the JAVA_HOME and ANDROID_HOME
For example, ANDROID_HOME=/home/demo/java/exo-dependencies/Android/AndroidStudio_Latest/SDK
JAVA_HOME=/home/demo/java/jdk1.8.0_77
PATH=/usr/local/bin:$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$GRADLE_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
Setting up Android Studio takes just a few clicks.
While the Android Studio download completes, verify which version of the JDK you have: open a command line and type
javac -version. If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.
To install Android Studio on Linux, proceed as follows:
- Unpack the
.zipfile you downloaded to an appropriate location for your applications, such as within/usr/local/for your user profile, or/opt/for shared users. - To launch Android Studio, open a terminal, navigate to the
android-studio/bin/directory, and executestudio.sh.Tip: Addandroid-studio/bin/to yourPATHenvironment variable so you can start Android Studio from any directory. - Select whether you want to import previous Android Studio settings or not, then click OK.
- The Android Studio Setup Wizard guides you though the rest of the setup, which includes downloading Android SDK components that are required for development.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
That's it! The following video shows each step of the recommended setup procedure.
Thursday, April 14, 2016
Thursday, April 14, 2016
Selendroid's Architecture
Overview about the selendroid
Selendroid is based on the Android instrumentation framework, and therefore only testing one app is supported. Selendroid contains four major components:
- Selendroid-Client - the java client library (based on the selenium java client).
- Selendroid-Server - that is running beside your app on the Android device.
- AndroidDriver-App - a built in Android driver webview app to test the mobile web.
- Selendroid-Standalone - manages different Android devices by installing the selendroid-server and the app under test.
Sunday, April 3, 2016
Sunday, April 03, 2016
Unit and UI Testing in Android Studio
1. Overview
In this codelab, you'll learn how to set up your project in Android Studio for testing, write a Unit Test and run it locally on your development machine and also how to do functional UI testing on the device.
What you’ll learn
- Updating the Gradle build files to include JUnit and the Android Testing Support Library
- Writing Unit Tests which run on the Java VM on your local machine
- Writing Espresso tests which run on the device or emulator
Saturday, April 2, 2016
Saturday, April 02, 2016
Unit tests with Mockito - Starter
1. Unit Testing & test doubles
1.1. Target & challenge of unit testing
A unit test is a test related to a single responsibility of a
single class, often referred to as the System Under Test (SUT). A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. The achievement of this desired goal is typical complicated by the fact that Java classes usually depend on other classes. Test doubles will solve this.
Thursday, March 24, 2016
Thursday, March 24, 2016
Android Testing Concepts and Types
Test Structure
Android testing is based on JUnit. In general, a JUnit test is a method whose statements test a part of the application. You organize test methods into classes called test cases. You can further organize these classes into test suites.
In JUnit, you build one or more test classes and use a test runner to execute them. In Android, you use Android Studio (or the Android Plugin for Gradle) to build one or more test source files into an Android test app.
From your testing environment, you can run your test in one of the following ways:
- On your local machine: Compile the test classes and execute them locally on the Java Virtual Machine (JVM) using the JUnit test runner.
- On a device or emulator: Install the test app and the app under test to a physical device or emulator, and then execute your tests using an Android-specific test runner (such as
AndroidJUnitRunner).
Wednesday, March 23, 2016
Wednesday, March 23, 2016
Android Testing Framework
Overview
Google provides an Android Testing framework that is part of the Android SDK and is built on top of standard JUnit testing extended with a instrumentation framework and Android-specific testing classes.
Note: You must be running at least version 1.1.0 of the Android plug-in for Gradle, since unit testing with Android Studio was only recently supported. More information can be found here.
Wednesday, March 23, 2016
Using an ArrayAdapter with ListView
Android ListView:
ListView in Android is an UI control that display a list of items and can be scrolled through them by user. The items can be image list,text list, or any other type.
To use it > Select the ListView container from Palette into a main.xml file.
Android Adapters
are the link between a set of data and the AdapterView that displays the data.
ListView which has data populated using an Adapter. The simplest adapter to use is called anArrayAdapter because the adapter converts an ArrayList of objects into View items loaded into the ListView container.Wednesday, March 23, 2016
Android Directory Structure
Overview
Within an Android project structure, the most frequently edited folders are:
src- Java source files associated with your project. This includes the Activity "controller" files as well as your models and helpers.res- Resource files associated with your project. All graphics, strings, layouts, and other resource files are stored in the resource file hierarchy under the res directory.res/layout- XML layout files that describe the views and layouts for each activity and for partial views such as list items.res/values- XML files which store various attribute values. These include strings.xml, dimens.xml, styles.xml, colors.xml, themes.xml, and so on.res/drawable- Here we store the various density-independent graphic assets used in our application.res/drawable-hdpi- Series of folders for density specific images to use for various resolutions.
Wednesday, March 23, 2016
Android Studio & ADT Download Links
Thursday, April 5, 2012
Thursday, April 05, 2012
Android vs. Java ME
After starting to study the characteristics of Android, some aspects can be observed that, while not always an advantage over their competitors, they are interesting and can impact positively on his election platform. For example:
-> Although Google avoids using the term too, the fact of using language as popular as Java helps minimally experienced any programmer can begin to schedule their applications without any problems, as well as encourage those who are already very familiar.It also incluvdes the most important API this language as java.util, java.io and java.net.
-> The Apache license allows everyone to study, modify and distribute the Android system, while giving private development option by issuing commercial applications. Every developer can decide how best to distribute their own work.
-> As is known, Android divides all applications into components or building blocks that, combined, constitute the final program. Thus, we have blocks visible to the user via interfaces (Activity), blocks that run in the background out of his knowledge (Service), blocks listen for certain events (Broadcast Receiver) and blocks providing content to other applications (Content Providers .) This philosophy is original and functionally helps modularize applications.
-> The delegation of actions in other applications Intents is another of the most innovative aspects offered by Android. By an Intent, the application simply states what to make and is the system in charge of finding the most appropriate application (to call, send an email, open a web page, etc.).. Likewise, applications can announce to the others who are prepared to address certain types of Intents.
-> The construction of user interfaces has been a very careful, not only by the extensive collection of features and designs incorporated, but for the possibility of being defined on both the source and through external XML documents.
-> Access to device resources, such as GPS, Wi-Fi, etc., It becomes easy and simple thanks to the SDK API.
-> The declaration and use of external resources such as images, strings, numeric values, or even different models and user interface design is comfortable and easy to perform.
-> Although Google avoids using the term too, the fact of using language as popular as Java helps minimally experienced any programmer can begin to schedule their applications without any problems, as well as encourage those who are already very familiar.It also incluvdes the most important API this language as java.util, java.io and java.net.
-> The Apache license allows everyone to study, modify and distribute the Android system, while giving private development option by issuing commercial applications. Every developer can decide how best to distribute their own work.
-> As is known, Android divides all applications into components or building blocks that, combined, constitute the final program. Thus, we have blocks visible to the user via interfaces (Activity), blocks that run in the background out of his knowledge (Service), blocks listen for certain events (Broadcast Receiver) and blocks providing content to other applications (Content Providers .) This philosophy is original and functionally helps modularize applications.
-> The delegation of actions in other applications Intents is another of the most innovative aspects offered by Android. By an Intent, the application simply states what to make and is the system in charge of finding the most appropriate application (to call, send an email, open a web page, etc.).. Likewise, applications can announce to the others who are prepared to address certain types of Intents.
-> The construction of user interfaces has been a very careful, not only by the extensive collection of features and designs incorporated, but for the possibility of being defined on both the source and through external XML documents.
-> Access to device resources, such as GPS, Wi-Fi, etc., It becomes easy and simple thanks to the SDK API.
-> The declaration and use of external resources such as images, strings, numeric values, or even different models and user interface design is comfortable and easy to perform.


