레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시

2015년 1월 28일 수요일

Using SQLite Browser in Android Studio

1. Go to:
https://code.google.com/p/android-sqlite-browser-for-eclipse/wiki/HowTo

2. Download Android_SQLiteBrowser_x.x.x.jar

3. Move the downloaded jar file to [Android SDK folder]/tools/lib/monitor-x86_64/plugins/

4. Restart Android Device Monitor

2014년 11월 2일 일요일

Eclipse Navigation Shortcuts

Windows shortcut (Mac shortcut)

1. Ctrl+Shift+R (Command+Shift+R): Open Resource

2. Ctrl+Shift+T (Command+Shift+T): Open Type

3. Ctrl+O (Command+O): Show inherited members

4. Ctrl+L (Command+L): Go to line

5. Ctrl+Q: Go to the last edit location

6. Ctrl+T (Command+T): Go to supertype/subtype

7. Ctrl+E (Command+E): Go to open other editors

8. Ctrl+. (Command+.): Move to the next problem in a file

9. F3 (Fn+F3) or hold Ctrl (Command) down and click the hyperlink: Go to a type declaration

10. Alt+←,  Alt+→ (Command+Alt+←, Command+Alt+→): Go back and forth through files you visited

11. Ctrl+H (Ctrl+H): Search

2014년 5월 29일 목요일

Conversion between Uri and file path

1. Conversion of Uri to file path
public String getPathFromUri(Uri uri){
Cursor cursor = getContentResolver().query(uri, null, null, null, null );
cursor.moveToNext(); 
String path = cursor.getString( cursor.getColumnIndex( "_data" ) );
cursor.close();

return path;
}

2. Conversion of file path to Uri
public Uri getUriFromPath(String path)
String fileName= "file:///sdcard/DCIM/Camera/2013_07_07_12345.jpg";
Uri fileUri = Uri.parse( fileName );
String filePath = fileUri.getPath();
Cursor c = getContentResolver().query( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 
null, "_data = '" + filePath + "'", null, null );
cursor.moveToNext()
int id = cursor.getInt( cursor.getColumnIndex( "_id" ) );
Uri uri = ContentUris.withAppendedId( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, id );

return uri;
}

2014년 5월 6일 화요일

Installing Tomcat on Mac OS

Step 1: Download a binary distribution of the core module: apache-tomcat-7.0.53.tar.gz (or apache-tomcat-7.0.53.zip) from here.

Step 2: Opening or Unarchiving the tar.gz (or zip) file will create a folder something like this in your Downloads folder ~/Downloads/apache-tomcat-7.0.53

Step 3: Move the unarchived distribution to /usr/local:
sudo mkdir /usr/local sudo mv ~/Downloads/apache-tomcat-7.0.53  /usr/local

Step 4: To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat:
sudo ln -s /usr/local/apache-tomcat-7.0.53  /Library/Tomcat

Step 5: Change ownership of the /Library/Tomcat folder hierarchy:
sudo chown -R /Library/Tomcat

Step 6: Make all scripts executable:
sudo chmod +x /Library/Tomcat/bin/*.sh

Step 7: Now executes the startup.sh and open your Web Browser and goto http://localhost:8080. You should see the following window.

You can use the very simple app Tomcat Controller.


2014년 4월 27일 일요일

Obtaining authorisation credentials and an API Key

App에서 Google에서 제공하는 API들을 사용하기 위해서는 App을 등록하고 API key를 발급 받는 과정을 거쳐야 합니다. 이 과정은 크게 두 단계로 나눌 수 있습니다.
1. 인증서의 SHA1값 생성
2. Google Development Console에서 API key 값 생성



  • 인증서의 SHA1값 생성

애플리케이션을 배포하기 위해서는 정식으로 발급받은 키를 사용해야 하지만, 개발 과정에서는 디버그용 인증서를 사용할 수도 있습니다. 디버기용 인증서를 사용해서 API 키를 발급받기 위해서는 안드로이드 사용자 폴더(Windows인 경우 C:\Documents and Settings\username\.android, Mac OS인 경우 /Users/username/.android)에서 다음과 같이 keytool 명령을 실행합니다
keytool -list -v -keystore debug.keystore -storepass android -keypass android



  • Google Development Console에서 API key 값 생성

1. Google 계정으로 Google Developers에 로그인

2. Google Developers Console로 이동


3. Create Project


4. API & auth -> APIs에서 원하는 API들을 ON

5. Credentials -> OAuth -> NEW CLIENT ID
  Application type: Installed application
  Installed application type: Android
  Package name:
  Signing certificate fingerprint(SHA1):

6. Create Client ID

7. Credentials -> Public API Access -> Create New Key

8. Android Key

9. Create

2013년 11월 26일 화요일

Google USB Driver

Windows에서 Android 디바이스를 테스트하기 위해서는 OEM USB 드라이버를 설치할 필요가 있습니다.
테스트 하려는 디바이스의 각 제조사(OEM) USB 드라이버를 다운로드 받아 설치합니다. Google의 Nexus 디바이스를 Windows 환경에서 테스트하기 위해서는 Google USB 드라이버를 설치합니다.
자세한 사항은 아래 링크를 참조하세요.
http://developer.android.com/sdk/win-usb.html

Mac OS와 리눅스에서는 USB 드라이버를 따로 설치할 필요가 없습니다.

아래는 국내 핸드폰 제조사들의 USB 드라이버를 다운로드할 수 있는 페이지들의 링크입니다.
삼성전자: http://www.samsung.com/sec/support/pcApplication/KIES/
LG전자: http://www.lgmobile.co.kr/lgmobile/front/download/retrieveDownloadMain.dev
팬택: http://www.vegaservice.co.kr/down/software/main.sky
홈