반응형
반응형

Build amazing iOS and Android apps

with technology you already know


Open source framework for building truly native mobile apps

with Angular, TypeScript or JavaScript.


https://www.nativescript.org/



NativeScript 3.0 - Faster apps, built with JavaScript

 

.


반응형
반응형

ionic project 생성시 이제 default가 version 2로 지정됨


http://ionicframework.com/getting-started/ 들어가보면 기존에는 


버전 2로 하려면 아래와 같이 생성했었는데, 

1
ionic start ExampleProject blank --v2

이제는 버전 1로 만들고 싶을때 아래와 같이 해야 한다. 

1
ionic start ExampleProject blank --v1


단, npm install  한번 더 하고 테스트 해보시길. 

> npm install -g cordova ionic


device에 넣을때에도 ionic run android 가 아니라 

> ionic cordova run android




.

반응형
반응형

Rebound: Spring animations for Android


Rebound is a java library for modeling spring dynamics. Animations in your application that use real-world physics feel more natural, improving UX.














.

반응형
반응형

안드로이드 테스트 툴 - Appium

 

https://github.com/appium/appium


 

Appium을 사용한 안드로이드 기능 테스팅 :

1 : https://www.imaso.co.kr/news/article_view.php?article_idx=20150731141607

2 : https://www.imaso.co.kr/news/article_view.php?article_idx=20150904170524


앱피움은 모바일 앱의 테스트 자동화를 가능하게 해주는 오픈소스 라이브러리다. 네이티브(Native), 하이브리드(Hybrid), 모바일 웹(Mobile web) 등 다양한 타입의 앱에 대한 테스트를 자동화하는 것이 앱피움의 특징이다. 앱피움을 통해 자동화된 테스트는 실제 기기나 에뮬레이터 혹은 시뮬레이터에서 실행된다.


앱피움은 플랫폼 벤더가 제공한 테스트 프레임워크에 Selenium WebDriver API로 랩핑한 클라이언트 라이브러리(Client library)들을 다양한 개발 언어로 제공한다.


Appium architecture
1. 스크립트의 API들은 WebDriver JSON Wire Protocol을 사용해 앱피움 서버와 통신한다.
2. 앱피움 서버는 스크립트가 제공하는 안드로이드 SDK 버전에 맞춰 테스트 프레임워크(UIAutomator 혹은 Selendroid)를 처리할 수 있는 모듈과 TCP 서버를 가지는 bootstrap.jar을 디바이스/에뮬레이터에 설치한다.
3. 앱피움 서버는 스크립트상에 command를 디바이스의 TCP 서버로 전달한다.
4. 기기 상의 UIAutomator 서버는 전달받은 명령어를 안드로이드 버전에 맞는 UIAutomator 혹은 Selendroid 명령어로 바꿔 실행하고, 실행 결과를 앱피움 서버로 보낸다.
5. 앱피움 서버는 콘솔에 처리 결과를 표시한다.

앱피움 실행 환경 구성하기


먼저 Node.js, NPM( nodejs.org/download) 구성이다. 홈브루(homebrew)를 사용하거나 소스를 받아 Node.js를 설치한다. Node.js를 설치하면 NPM이 함께 설치된다.


다음은 앱피움( appium.io) 설치다. NPM을 사용하거나 설치 파일을 다운로드해 앱피움과 앱피움에 종속(dependency)이 있는 모듈들을 한번에 설치하자. 앱피움 설치가 완료되면 앱피움을 실행할 수 있는지 종속성(dependency)을 체크한다.


안드로이드 애플리케이션 자동화 테스트 개발 환경 구성하기


우선 자바 JDK 환경을 구성하자. 오라클 자바 공식 사이트( www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)에서 JDK를 다운로드해 설치한다.


환경 설정 파일에 JAVA_HOME 환경변수를 만들고 JDK 패스를 설정한다. 설정된 값이 적용될 수 있도록 source 명령어를 실행한다. 환경변수 값이 제대로 설정됐는지 확인한다.


자바 IDE(통합개발환경)로 사용할 이클립스(Eclipse)를 설치하자. 이클립스 사이트( eclipse.org/downloads/)에서 소스를 다운로드해 압축을 풀면 eclipse 디렉토리가 보인다. 디렉토리 아래 eclipse App 파일을 더블클릭해 실행한다.


이제 메이븐(Maven)을 구성해 보자. 메이븐 빌드 도구를 아파치 메이븐 프로젝트 공식 사이트( maven.apache.org/source-repository.html)에서 다운로드해 설치한다. 홈브류를 사용하거나 소스를 다운로드해 메이븐을 설치하고 환경 변수를 설정한다. 설정된 값이 적용될 수 있도록 source 명령어를 실행하고 환경변수 값이 제대로 설정됐는지 확인한다.


다음으로 이클립스를 위한 메이븐 플러그인(Maven Plug in) ‘Maven Plugin for Eclipse( download.eclipse.org/technology/m2e/releases)’를 설치한다. 이클립스에서 Eclipse Help → Install New Software… 메뉴를 통해 설치하면 된다.


안드로이드 에뮬레이터 ‘지니모션(Genymotion)’을 설치해 보자. 우선 지니모션 사이트의 다운로드 페이지( www.genymotion.com/#!/download)에 진입하자. 계정을 생성한 후 에뮬레이터(Emulator) 설치 파일을 다운로드하고 지니모션 설치 파일을 더블클릭한다. 지니모션과 지니모션 셀(Shell)을 애플리케이션으로 드러그 엔 드롭해 설치하면 된다.


이제 이클립스를 위한 지니모션 플러그인(Genymotion Plug in)을 설치할 차례다. ‘Genymotion Plugin for Eclipse’는 지니모션 플러그인 페이지( plugins.genymotion.com/eclipse)에서 다운로드할 수 있다. 이클립스에서 Eclipse Help → Install New Software… 서브 메뉴를 통해 설치하면 된다.


설치가 완료되면 가상 디바이스 매니저를 클릭한다. 처음엔 디바이스가 하나도 없을 것이다. New를 클릭해 디바이스를 생성 창을 띄운다. 여기서 Add를 클릭해 디바이스를 추가한다.







반응형
반응형

Android Simulator Setup for Sencha Touch

 

http://www.sencha.com/blog/android-setup-for-sencha-touch/

 

Sencha Touch applications developed for Android devices should be tested in the Android simulator as part of your development process. This blog post discusses how to install and use the Android simulator, for Sencha Touch applications developed with either the command line tools or Sencha Architect.

The number of Android smartphones being sold and used has recently surpassed iOS smartphones. (This Time magazine article from April 2013 breaks down the numbers).

Many Sencha Touch developers are targeting the Android platform. This blog post will show you how to set up an Android development environment from start to finish. The screenshots and directory names are Mac-centric. The process for Linux is almost identical, and the process for Windows is very similar.

1. Install Android SDK Tools

Summary

Install the Android SDK Tools: download the proper file for your operating system.

Discussion

On the download page, click the dropdown for "Download for Other Platforms" and download the "SDK Tools Only" zip file for your operating system. (For Windows, download the zip file, not the installer.exe).

What you're downloading is not the SDK itself, but a zip file that contains the installer for the rest of the SDK. We will use the SDK tools to download the actual emulator in the next section.

Unzip the Android SDK Tools to the "bin" directory in your home directory, which you may have to create.

Mac OS

For Mac OS, save the file to /Users/username/bin (create the "bin" directory if it doesn't exist). The full path to your Android SDK directory on Mac is /Users/username/bin/android-sdk-macosx/.

Linux

For Linux, save the file to /home/username/bin (create the "bin" directory if it doesn't exist). The full path to your Android SDK directory on Linux is /home/username/bin/android-sdk-linux/.

Windows

If you're using Windows 7, Windows puts your personal files in the directory C:\Users\username. If you've already installed Sencha Cmd (see below), the C:\Users\username\bin directory has already been created for you, otherwise you can create it. Unzip the Android SDK under the bin directory. For Windows, the full path to the Android SDK is C:\Users\username\bin\android-sdk-windows.

2. Install the Android emulator

Summary

Using the Android SDK Manager (that you just downloaded), install the Intel-based Android emulator.

Discussion

Android and Sencha Touch

In the Android SDK directory, under the "tools" subdirectory, you'll find an executable file called "android". Double-click on it to launch the Android SDK Manager.

Android and Sencha Touch

Uncheck the box next to "Android 4.2.2 (API 17)". This will uncheck all the boxes in that section. The only box you need to check is "Intel x86 Atom System Image". You can leave the checkboxes next to "Platform tools" and "Build-tools" checked if you want.

Since we are using Sencha Touch to develop our Android apps, we don't need to install any of the other products.

Here are the final steps to finish the install:

  1. Click "Install 4 packages..." to download and install your Android packages.
  2. Click on the package headers, and click "Accept License".
  3. The progress bar at the bottom will show you the progress of the install. Wait until all your packages have been installed.

3. Configure and start up the Android emulator

Summary

To test our emulator download, we'll configure the emulator for its first run, then start it up to see if it's working properly.

Discussion

After all your packages have downloaded in the previous step, select the "Tools → Manage AVDs..." menu item in the Android SDK tools.

Android and Sencha Touch

A dialog will appear showing you all the virtual Android machines that you've defined. Since this is the first time that you've run this command, there are no machines shown. Click the "New..." button to define a new machine.

Android and Sencha Touch

Fill in the name, type of device, and the API level (17 in our case). Also, make sure the "Use Host GPU" checkbox is checked. Click OK to accept these settings, and click OK to accept the summary screen.

Android and Sencha Touch

You've configured your first Android emulator, and you should see a green check in front of your virtual Android device. On the right side of the dialog, click "Start..." to start up the emulator. On the following screen, click "Launch".

Android and Sencha Touch

If you've installed everything correctly, the Android emulator will start up. Depending on the speed of your machine, the startup process may take several minutes. When the emulator starts up, you should see the screen below.

Android and Sencha Touch

Click on the circle to see the applications that are already installed in this emulator. If you're able to see this screen, then you have installed and configured your Android emulator correctly.

Additional steps for Linux 64-bit

The Android emulator file is a 32-bit binary. To run 32-bit binaries on your 64-bit Linux system, you will need to install 32-bit libraries for your version of Linux. On many Linux systems, this is not done by default.

If you get an error message similar to "emulator: file not found" even though you can see the emulator file right there in your "tools" directory, then you have to install 32-bit loaders for your 64-bit Linux system.

Ubuntu/Debian: type "sudo apt-get install ia32-libs"

Red Hat/Fedora: read the docs

Other flavors of Linux: Google "<Linux flavor> 32 bit loader for 64 bit system" or something similar

4. Generate an Android certificate

Summary

Create a certificate to use when downloading programs to the Android emulator or testing on the physical Android device.

Discussion

To generate a certificate usable with your Android emulator, you will be using the "keytool" program that comes with Java, so you must have Java SE 1.6 or higher installed on your machine. This is already installed if you’re using a Mac, and is most likely already installed on your Windows machine.

From the Terminal or a command prompt, type "keytool". If the command is not found, you may need to go to java.com, and download Java SE 1.6 or higher.

For simplicity, we’ll create the keystore in the Android SDK directory, and we’ll set the keystore, alias, and password all to "android1". (For a real certificate you would not set such obvious values for the keystore and password, but we're trying to keep things simple for our demo.)

Here's what the dialog looks like:

$ pwd
/User/username/bin/android-sdk-macosx
$ keytool -genkey -v -keystore android1.keystore -alias android1 -keyalg RSA -keysize 2048 -validity 10000
Enter keystore password: (I entered "android1")
What is your first and last name?
  [Unknown]: Patrick Chu
What is the name of your organizational unit?
  [Unknown]: Training
What is the name of your organization?
  [Unknown]: Sencha
What is the name of your City or Locality?
  [Unknown]: Redwood City
What is the name of your State or Province?
  [Unknown]:  California
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=Patrick Chu, OU=Training, O=Sencha, L=Redwood City, ST=California, C=US correct?
  [no]:  yes

Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days
    for: CN=Patrick Chu, OU=Training, O=Sencha, L=Redwood City, ST=California, C=US
Enter key password for <android1>
    (RETURN if same as keystore password):  
[Storing android1.keystore]
$

At this point, you have a file called "android.keystore" that contains your certificate. You will need this file to package a Sencha Touch app into a "native" Android application.

5. Edit packager.json

Summary

Edit "packager.json" to reflect details about the Android emulator environment and the certificate file that you generated above.

Discussion

In this step, we’re going to generate a demo Sencha Touch app, so we have something to load into the Android simulator. To do this, I'm going to make some assumptions about your Sencha Touch environment:

  • The root of your localhost web server is a folder called "htdocs". This is the default if you installed Apache using XAMPP.
  • Your Sencha Touch files are in the directory "htdocs/touch2"
  • You've already installed Sencha Cmd. To test, type "sencha" from the Terminal or command prompt. If you see a Sencha Cmd help screen, then Sencha Cmd is installed. If the command is not found, install Sencha Cmd

Change directory to "htdocs/touch2", and enter the following command:

  • sencha generate app --name AndroidDemo --path ../demo
  • For Windows, the directory is "..\demo"

It’s OK if the htdocs/demo directory doesn't exist -- Sencha Cmd will create it. When the command completes, you will have a simple but complete Sencha Touch application. If your web server is running, you can see it running at http://localhost/demo.

To tell this application about the details of our Android environment, we have to edit the "htdocs/demo/packager.json" file. Here are the properties that we need to edit, common to all platforms:

  • "applicationId": "com.demo.AndroidDemo", /* (this must contain at least 2 parts separated by periods) */
  • "platform": "AndroidEmulator",
  • "certificateAlias": "android1",
  • "certificatePassword": "android1",
  • "androidAPILevel": "17",

Mac OS

Properties specific to Mac OS:

  • "certificatePath": "/User/username/bin/android-sdk-macosx/android1.keystore",
  • "sdkPath": "/User/username/bin/android-sdk-macosx",
  • Substitute "username" with your username

Linux

Properties specific to Linux:

  • "certificatePath": "/home/username/bin/android-sdk-linux/android1.keystore",
  • "sdkPath": "/home/username/bin/android-sdk-linux",
  • Substitute "username" with your username

Windows

Properties specific to Windows:

  • "certificatePath": "C:/User/username/bin/android-sdk-windows/android1.keystore",
  • "sdkPath": "C:/User/username/bin/android-sdk-windows",
  • Substitute "username" with your username
  • Yes, you can and should use FORWARD slashes in your Windows path

Save your edits to the file.

You’re almost done! Now all we have to do is run our program in the Android emulator. Here are the steps:

  • Start your Android emulator. It has to be running at the time that Sencha Cmd attempts to send it the application's files
  • Change directory to "htdocs/demo" (the root of your application, where your packager.json file lives)
  • Type: sencha app package run packager.json

(Note: your Java executable must be somewhere in your path in order for Sencha Cmd to work)

If you're lucky (and patient), you should see the sample application start in your Android emulator! Congratulations!

Click on the tabs at the bottom to move between screens in the sample app.

6. (optional) Install Intel’s hardware acceleration drivers for the Android emulator

Summary

Install hardware acceleration for the Android emulator to improve performance. This step is HIGHLY recommended.

Discussion

While running your Sencha Touch program inside your Android emulator, you may notice that it runs a bit "sluggish" (the most polite term I could think of). Since the emulator is implemented completely in software, it’s always been slow.

However, if you’re running on an Intel-based Mac or Windows machine, you can use Intel drivers that provide hardware acceleration for the Android emulator, in the same way that VMWare’s or Hyper-V’s virtual machines are also hardware assisted. Your Intel processor has to support Intel’s Virtualization Technology (VT) in order for the drivers to work. Intel’s name for this package is HAX, short for "Hardware AXceleration".

You can download the software from this page.

The page also contains links to very detailed installation instructions for all supported platforms. After you install the software, you will notice that the Android emulator runs much faster.

NOTE: You’ll notice that, in the Android Package SDK tool, HAXM is listed at the bottom as a possible install. I've had problems installing HAX this way. Instead, go to the link above and install it from that page.

NOTE: If you are running Hyper-V in Windows 7 on your PC, you will have to disable it in order for Intel’s hardware acceleration to work. Hyper-V will lock up the virtualization feature for itself, thus preventing other virtualization programs from running.

7. More resources

Below I&rsquo've listed two useful Android development features that I don't have room to cover in this blog post.

  • Chrome Mobile Emulation:Within Chrome, you can simulate touch events, screen resolutions, device user agents, device orientation, and geolocation, all from within Chrome. This allows you to perform the bulk of your development and debugging in the host’s browser, which is much faster, and then run the application in the simulator as a once-a-day test and sanity check.
  • Remote Debugging on Android:Use Chrome on your host to debug web applications in your Android browser.
반응형
반응형

Android example app with PhoneGap and JQM in Holo style

 

http://teusink.blogspot.kr/2013/04/android-example-app-with-phonegap-and.html

 

PhoneGap + JQuery Mobile + JQuery + energize.js

 

this example app is to have a some sort of a template to make a new app very fast, based on the technologies supplied by PhoneGap and jQuery Mobile, using web-technology.

Details


Frameworks:

  • Suitable for Android 2.3.3 and higher. API level 10 and up to be more technical :).
  • PhoneGap 2.7.0.
  • jQuery 1.9.1
  • jQuery Mobile 1.3.1
Plugins for jQuery Mobile:
  • Energize.js (to speed up the tap and click events in the app)
Plugins for PhoneGap:
  • Toast (to show android toasts)
  • Share (to send a share intent)
Features in this example app:
  • Holo theme. Dark, light with dark header and light with light header. The last one ain't very worked out yet, but it should give you a heads up start. The header features the same style as a native app including press effects.
  • Panel menu like the Google Plus app. Tap on title to open and tap outside panel menu to close. You can also swipe to left to close. Upon first boot the panel menu opens and closes for a brief second automatically, to demonstrate where the menu is. Panel menu content is defined only once, in the javascript.
  • Of course the use of the plugins Share and Toast.
  • Native Android like back-button behavior.
  • Supplied Gimp image files (xcf files) to easy edit the icons to your liking.
Notice: the Holo theme is almost like and very inspired by Holo for Android. It is not exactly the same for 100% as native.

    Screenshots of the interface




     






     

    Additional info

    Download

    You can download the package by clicking here. If you have any questions, please let me know!

     

     

    반응형

    + Recent posts