티스토리 툴바


[Android]나에 두번째 안드로이드 어플리케이션!!


[용용]원터치 화면잠금!



Android(안드로이드) 를 접하고 간단하게 두번째로 만들어본 어플리케이션

그냥 필요에 의해서 만들었다.. 내가 쓰려고ㅋㅋ


어플리케이션 이름: [용용]원터치 화면잠금!

어플리케이션 용도: 위젯 으로 바탕화면에 배치후, 위젯 터치시 스크린이 오픈돼는 위젯

가격: 무료(Free) & 광고 없음

지원OS: Android2.1 ~ 4.0

지원언어: 한국어,중국어,영어

기능 :

- 터치 한번으로 화면 오프(ScreenOFF)

- 시간 지정으로 지정된 시간후 화면 오프(ScreenOFF) 1~5초

- 다양한 아이콘 제공!

- 자신이 가지고 있는 이미지로 아이콘 지정 가능!


공식 지원 홈페이지: http://www.tipnara.co.kr/

형태: 오픈소스 프로젝트


다운로드:   GooglePlay(Android Market)          Tstore





설정

트랙백

댓글

[Android]나에 첫번째 안드로이드 어플리케이션!!


[용용]다이어리 메모장!



Android(안드로이드) 를 접하고 처음으로 만들어본 어플리케이션

물론 지금도 만들고 있고, 정식버전 출시를 위하여 아예 새롭게 다시 만드는 중이다.


어플리케이션 이름: [용용]다이어리 메모장!

어플리케이션 용도: 메모장 및 다이어리

가격: 무료(Free) & 광고 없음

지원OS: Android2.2 ~ 4.0

지원언어: 한국어,중국어,영어

기능 :

- 메모

- 위젯

- 공유

- 백업

- 다양한 편의 옵션

- 기타등등


공식 지원 홈페이지: http://www.tipnara.co.kr/

형태: 오픈소스 프로젝트


다운로드:    GooglePlay(Android Market)       Tstore





많은 관심 부탁드리겠습니다^_^

설정

트랙백

댓글

[Android] 루팅(rooting)여부 확인하기

안드로이폰이 루팅이 되어있을경우 어플의 실행을 막고싶으면 폰이 루팅되어있는지 체크를 해야한다

가장 간단한 방법은 두가지(솔직히 더는 모르겠다)


1.직접 su에 루트권한을 요청한다.

2.루팅 구성파일 su 파일이 있는지를 체크한다.


일단 첫번째 방법이 가장 낳은듯 하다.. 두번째 방법은 파일 구성이 바뀌거나 하면 못잡아내므로..


방법은 루팅권한 요청 -> 루팅권한 요청을 날려봤자 의미가 없으면 exception 발생

즉 요청이 들어가면(수락을 하든 안하든 상관없이) exception이 발생하지 않으므로, 어플을 종료시켜버리면된다

만약 예외처리가 발생하게되면 어플을 정상적으로 실행하면 된다. 뭐 그 반대로 해도될듯 하다



try {

Runtime.getRuntime().exec("su");

Toast.makeText(TestActivity.this,"루팅된폰입니다.어플리케이션을종료합니다.", Toast.LENGTH_SHORT).show();

finish(); // 어플리케이션 강제종료

} catch ( Exception e) {  initialize(); /*메인 액티비티 실행*/ }


그럼 간단히는 막을 수 있을듯 하다

물론 뚫는 방법은 다양하겠지만...


설정

트랙백

댓글

[Android] 간단하게 xml layout만으로 아이폰 UI 만들어보기

안드로이드를 하면서 제일 많이 접하게 되는게 레이아웃 UI인데, 아이폰 스타일로 꾸며보는 사람이 많을꺼같다

진짜 간단하게 xml 로만 아이폰 UI와 약간(?) 비슷하게 만들어 보았다


구성

상단바( 버튼 2개, 로고 )

하단바( 버튼 2개 , 간단하게 웹뷰로 링크 )


main.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:id="@+id/home_root"

    android:orientation="vertical"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent">

   <!-- 상단바 구성 -->

   <RelativeLayout 

    android:layout_width="fill_parent"

    android:layout_height="50dp"

    android:orientation="horizontal"

    android:background="@drawable/top_bar" >

   

   <ImageButton

       android:clickable="true"

       android:layout_alignParentLeft="true"

       android:layout_marginLeft="13dip"

       android:layout_width="wrap_content"

       android:layout_height="fill_parent"

       android:layout_marginTop="5dip"

       android:scaleType="center"

       android:background="#00000000"

       android:src="@drawable/back" />  

   <TextView

       android:layout_width="wrap_content"

       android:layout_height="fill_parent"

       android:layout_alignParentBottom="true"

       android:layout_alignParentTop="true"

       android:layout_centerHorizontal="true"

       android:paddingTop="13dip"

       android:text="어정쩡한 아이폰 스타일!"

       android:textColor="#FFFFFF"

       android:textSize="20sp" />

   

   <ImageButton

       android:clickable="true"

       android:layout_alignParentRight="true"

       android:layout_marginRight="13dip"

       android:layout_width="wrap_content"

       android:layout_height="fill_parent"

       android:layout_marginTop="5dip"

       android:scaleType="center"

       android:background="#00000000"

       android:src="@drawable/edit" />

</RelativeLayout>

    <!-- 몸통 부분 -->

    <LinearLayout

   android:layout_width="fill_parent"

   android:layout_height="fill_parent"

   android:layout_weight="1"

   android:background="#000000" >

   

        <TextView 

            android:layout_width="fill_parent"

            android:layout_height="fill_parent"

            android:text="메인 화면"

            android:textSize="30sp"

            android:gravity="center"/>

</LinearLayout>

    <!-- 하단 부분 -->

<LinearLayout

    android:layout_width="fill_parent"

    android:layout_height="40dp"

    android:orientation="horizontal"

    android:background="@drawable/foot_bar" >

    

   <LinearLayout

       android:layout_width="fill_parent"

       android:layout_height="fill_parent"

       android:gravity="center" >

       <Button

           android:id="@+id/click1"

           android:onClick="mOnClick"

   android:focusable="false"

   android:layout_gravity="bottom"

           android:layout_weight="50"

           android:layout_width="wrap_content"

           android:layout_height="fill_parent"

           android:background="@drawable/bn"

           android:text="네이버" />

       <Button

           android:id="@+id/click2"

           android:onClick="mOnClick"

   android:focusable="false"

   android:layout_gravity="bottom"

           android:layout_weight="50"

           android:layout_width="wrap_content"

           android:layout_height="fill_parent"

           android:background="@drawable/bn"

           android:text="다음" />

   </LinearLayout>

</LinearLayout>    

</LinearLayout>


간단하게 만들어 봤고, 몸통부분에 원하는 내용을 출력해주면 됩니다.

페이지가 많고 액티비티가 많다면, 상단 과 하단을 따로 작성해서 필요할때마다 인클루드해서 쓰면됩니다.

하나하나의 레이아웃에 저렇게 길게 코딩하기는 좀 그러니까요^^


이게 좋은 방법인지 아닌지는 모르겠고.. 그냥 저런식으로 하면 잘됩니다.


아래는 실제 사진입니다( 이미지는 걍 대충 )



설정

트랙백

댓글

[Android] 안드로이드 Log 찍기


안드로이드 Log 찍을때 간단하게 Log.d 나 Log.i 로 TAG 와 보여줄 값을 뿌리는데, 이게 무조건 뿌려주는건 아니다. 보니까 쓰레드 생성에선 안되는거 같은데... 아래처럼 하면 무조건 찍힌다


근데 Log 도 일딴 찍으면 쌓이기 때문에 배포할때는 주석처리하거나 지우고 배포하자~


Log.d("TAG", "[" + new Throwable().getStackTrace()[0].getFileName() + "][" + new Throwable().getStackTrace()[0].getMethodName() + "]["

          + new Throwable().getStackTrace()[0].getLineNumber() + "] : " +"View 호출");


설정

트랙백

댓글

1 2 3 4 5 ... 78