'분류 전체보기'에 해당되는 글 189건

  1. 2013.10.20 WiFi 데이터 공유기 Apotop
  2. 2012.01.17 오랜만에 작업 좀 하고 있습니다. 61식 전차입니다.
  3. 2011.08.25 Jquery를 사용한 비동기화 구현
  4. 2011.02.07 Oracle에서 요일 알아내기
  5. 2011.01.06 Listen to incoming/outgoing SMS
  6. 2011.01.06 sms 송신 이벤트 발생 확인하기
  7. 2010.12.30 안드로이드 개발 팁
  8. 2010.12.19 스크롤이 마지막인지 체크하기
  9. 2010.12.17 firefox계열에서 iframe의 객체 얻어오기
  10. 2010.11.26 Ajax 한글 파라미터 보내기
2013. 10. 20. 16:40

WiFi 데이터 공유기 Apotop

오랜만에 써보는 리뷰 입니다.

요즘 카메라와 핸드폰에서 기능이 많이 보이는 WiFi로 데이터 전송 기능이 추가 되고 있는 추세 입니다.

데이터 전송시 WiFi로만 접근하여 손 쉽게 데이터 전송이 가능케 해주는데요.


기기 이름은 엑슬 비전코리아 apotop dw21 휴대용 개인클라우드 리더기 입니다.

이 기기는 따로 WiFi 데이터 전송 기능이 없는 환경에서도 WiFi로 데이터를 전송, 동영상 구동 및 다른 모바일 OS기기 끼리의 데이터 공유에도 도움을 주는 기기 입니다.


[외관 및 구성]

외관 포장에 표시된 기능들. WiFi공유, 외장배터리 기능, WiFi Router 등등


구성품 - 본체, 케이블


UBS포트와 ethernet 단자



전면 구동 상태 LED


SD카드슬롯, USB단자, 기능 버튼





[Mobile App]


기기의 기능 버튼을 WiFi에 놓으면 모바일 기기의 WiFi목록에 Wi-Copy_xxxxxx가 뜨게 됩니다.


AppStore에서 Wi-Copy를 검색하여 설치합니다.



SD카드 또는 USB만 연결 했을 경우 각 항목의 파일을 자동으로 목록화 해주며, 제일 하단에는 슬롯에 장착된 메모리카드의 폴더를 확인 하는 아이콘이 존재합니다.


USB와 SD카드가 함께 꽂혀 있는경우 어플 사용시 첫 화면은 USB와 SD카드의 아이콘이 보여지게 되며, 해당 항목을 선택하면 목록이 확인 가능 합니다.



App에서는 각 설정이 가능 하다.



check storage Space선택 시, 각 메모리의 남은 용량도 확인이 가능




Apotop wifi에 물려있는 컴퓨터나, 모바일 기기에서 FTP로도 USB메모리나 SD카드의 내용을 확인 할 수 있다.


[사용 방법 동영상]








2012. 1. 17. 11:51

오랜만에 작업 좀 하고 있습니다. 61식 전차입니다.

건담 이글루 애니에 나오는 탱크입니다. 미래형 전차.ㅎㅎ 라이노로 조금씩 끄적이고 있는데 언제 끝날지는 의문이네요;ㅎ
자세한 내용은 이곳에서 확인 가능합니다.ㅎ  http://www.hardcraft.net/web/forum/viewtopic.php?f=6&t=193
2011. 8. 25. 11:59

Jquery를 사용한 비동기화 구현

function xDomainProc(puzlNum){
    var tmp_ifr = $('<iframe />')
       .attr({'name':'temporary_ifr','id':'temp_ifr'})
        .hide()
       .load(function() {
                   $('#temporary_frm').remove();
                   var resetFlag = $('#temp_ifr').contents().find('#resetFlag').html();
                   var firstAccess = $('#temp_ifr').contents().find('#firstAccess').html();
                   var success = $('#temp_ifr').contents().find('#success').html();

if(success){
                    $('.iconpopup2').hide();
                    $('.puzzleeventPopup2 p:eq(0)').text('<%=iPuzlCnt+1%>')
                    $('.puzzleeventPopup2').show();
/*
                    if(firstAccess == "true"){
                    $('.puzzleeventPopup2').hide();
                    $('.puzzleeventPopup1').show();
                    }else if(resetFlag == "true"){
                    $('.puzzleeventPopup3 p:eq(0)').text('<%=iComplPuzl+1%>')
                    $('.puzzleeventPopup2').hide();
                    $('.puzzleeventPopup3').show();
                    }
*/ 
                   }else{
                    alert('fail');
                   }
                   //$(this).remove();
               });
var tmp_frm = $('<form />')
       .attr({'id':'temporary_frm',
               'action':'url',
               'method':'post',
               'target':'temporary_ifr'})
       .append($('<tag/>'))

$('body').append(tmp_ifr).append(tmp_frm);
//$('body').append(tmp_frm);
//tmp_frm.submit();
    }
2011. 2. 7. 14:09

Oracle에서 요일 알아내기

CASE
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '1' THEN '일'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '2' THEN '월'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '3' THEN '화'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '4' THEN '수'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '5' THEN '목'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '6' THEN '금'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'D') = '7' THEN '토'
END

CASE
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'SUN' THEN '일'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'MON' THEN '월'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'TUE' THEN '화'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'WED' THEN '수'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'THU' THEN '목'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'FRI' THEN '금'
WHEN TO_CHAR('20110211', 'YYYYMMDD'), 'DY') = 'SAT' THEN '토'
END
2011. 1. 6. 15:45

Listen to incoming/outgoing SMS


1, Listen to incoming SMS
1.1, Prepare manifest file
     
          
              
                  
                      
                  
              
         
       
      

Remark: action android.provider.Telephony.SMS_RECEIVED is undocumented.

1.2, Parse SMS

    package org.apache.sms;  
    
    import android.content.BroadcastReceiver;  
    import android.content.Context;  
    import android.content.Intent;  
    import android.os.Bundle;  
    import android.telephony.gsm.SmsMessage;  
  
    public class SMSApp extends BroadcastReceiver
    {  
        private static final String LOG_TAG = "SMSApp";  
     
       /* package */ 
        static final String ACTION =  
               "android.provider.Telephony.SMS_RECEIVED";  
     
        public void onReceive(Context context, Intent intent) 
        {  
            if (intent.getAction().equals(ACTION)) 
            {  
                Bundle bundle = intent.getExtras();
                if (bundle != null)
                {
                    Object[] pdus = (Object[]) bundle.get("pdus");
                    SmsMessage[] messages = new SmsMessage[pdus.length];
                    for (int i = 0; i < pdus.length; i++)
                    {
                        messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
                    }

                    for (SmsMessage message : messages)
                    {
                        String strFrom = message.getDisplayOriginatingAddress();
                        String strMsg = message.getDisplayMessageBody();
                    }
                }     
            }  
        }  
    }  

Reference: 
http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/

2 Listen to outgoing SMS  (Remark: following code is not tested)
2.1 Register observer for outgoing SMS
class SMSHandler extends Handler
{
    public void handleMessage(Message msg)
    {
        //Handle message
    }
}

class SMSObserver extends ContentObserver
{
    private Handle m_handle = null;

    public SMSObserver(Handle handle)
    {
        super(handle);
        m_handle = handle;
    }

    public void onChange(boolean bSelfChange)
    {
        super.onChange(bSelfChange);

        //Send message o Activity
        Message msg = new Message();
        msg.obj = "xxxxxxxxxx";
        m_handle.sendMessage(msg);

        Uri uriSMSURI = Uri.parse("content://sms");
        Cursor cur = this.getContentResolver().query(uriSMSURI, null, null,
                     null, null);
        cur.moveToNext();
        String protocol = cur.getString(cur.getColumnIndex("protocol"));
        if(protocol == null)
                onSMSSend();            
        else
                onSMSReceive();         


    }
}

ContentResolver contentResolver = getContentResolver();
Handler handler = new SMSHandler();
ContentObserver m_SMSObserver = new SMSObserver(handler);
contentResolver.registerContentObserver(Uri.parse("content://sms/"),
true, m_SMSObserver);  //Register to observe SMS in outbox,we can observe SMS in other location by changing Uri string, such as inbox, sent, draft, outbox, etc.)

2.2 Parse SMS
Uri uriSMSURI = Uri.parse("content://sms");
Cursor cur = this.getContentResolver().query(uriSMSURI, null, null,
null, null);
cur.moveToNext();
String protocol = cur.getString(cur.getColumnIndex("protocol"));
if(protocol == null)
    onSMSSend();        
else
    onSMSReceive();      


3 Read and Delete All SMS
/*
  //Available Uri string
  String strUriInbox = "content://sms/inbox";//SMS_INBOX:1 
  String strUriFailed = "content://sms/failed";//SMS_FAILED:2 
  String strUriQueued = "content://sms/queued";//SMS_QUEUED:3 
  String strUriSent = "content://sms/sent";//SMS_SENT:4 
  String strUriDraft = "content://sms/draft";//SMS_DRAFT:5 
  String strUriOutbox = "content://sms/outbox";//SMS_OUTBOX:6 
  String strUriUndelivered = "content://sms/undelivered";//SMS_UNDELIVERED
  String strUriAll = "content://sms/all";//SMS_ALL 
  String strUriConversations = "content://sms/conversations";//you can delete one conversation by thread_id 
  String strUriAll = "content://sms"//you can delete one message by _id 
*/

String strUriInbox = "content://sms/inbox";
Uri uriSms = Uri.parse(strUriInbox);  //If you want to access all SMS, just replace the uri string to "content://sms/"
Cursor c = mContext.getContentResolver().query(uriSms, null, null, null, null);
while (c.moveToNext()) 
{
    try 
    {
        //Read the contents of the SMS;
        for(int i; i < c.getColumnCount(); i++)
        {
            String strColumnName = c.getColumnName(i);
            String strColumnValue = c.getString(i);
        }


        //Delete the SMS
        String pid = c.getString(1);  //Get thread id;
        String uri = "content://sms/conversations/" + pid;
        mContext.getContentResolver().delete(Uri.parse(uri), null, null);        
    } 
    catch (Exception e) 
    {
    }
}  

REMEBER: must request following permission
1) Read SMS 
    
2) Delete/Modify/Send SMS
    
in AndroidManifest.xml
출처 : http://blog.chinaunix.net/u/9577/showart_1850111.html
2011. 1. 6. 15:33

sms 송신 이벤트 발생 확인하기


    private ContentObserver observer = null;
    private final Uri inboxUri = Uri.parse("content://sms/");
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        test();
    }
    private void test() {
        observer = new SMSObserver(new Handler); 
        getContentResolver().registerContentObserver(inboxUri, Boolean.FALSE, observer); 
    }

    class SMSObserver extends ContentObserver {
        public SMSObserver(Handler handler) {   
            super(new Handler());    
        }
        @Override
        public void onChange(boolean selfChange) {
            Log.d("test_woori", "call onChange");
        }
    }
    
    public void onDestroy(){
        super.onDestroy();
        getContentResolver().unregisterContentObserver(observer);
    }
2010. 12. 30. 14:31

안드로이드 개발 팁

개발중에 메모해둔 팁/힌트입니다.
한참을 헤매다가 때로는 3일에 1개 만들기도 하고, 하루에 1개 겨우 구현하기도 했던 
검색력 향상(?)를 꾀한 개발.
50개가 되었기에 포스팅을 걸어둡니다.
또 50개 모으면 2탄을;
(요약 부분이 있는데 잘려서 입력되네..)

번호

제목

출처

요약

1

이미지와 텍스트가 같이 들어간 버튼 만들기

http://www.androidpub.com/15765

<Button
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:drawableLeft="@drawable/ic_settings"
android:drawablePadding="4dp"
android:text="Settings"
/>
 
Button button = new Button(mContext);
button.setText("Close");
Drawable close = Drawable.createFromPath("/data/icon/image.png");
close.setBounds(0, 0, close.getIntrinsicWidth(), close.getIntrinsicHeight());

button.setCompoundDrawables(close, null, null, null);

2

버튼 색깔 바꾸기

http://stackoverflow.com/questions/1521640/standard-android-button-with-a-different-color

 

<?xml version="1.0" encoding="utf-8"?>    
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@drawable/red_button_pressed" />
    <item android:state_focused="true" android:drawable="@drawable/red_button_focus" />
    <item android:drawable="@drawable/red_button_rest" />
</selector>

3

전체화면 사용하기(Status bar, Title bar 숨기기)

http://www.androidpub.com/4710

 

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

android:theme="@android:style/Theme.NoTitleBar"

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,

 WindowManager.LayoutParams.FLAG_FULLSCREEN);

 

4

ImageButton의 투명 효과 사용하기

http://joywoni.egloos.com/2847047

 

android:background="#a0000000" 를 설정하면 배경이 투명해지므로 버튼 모양을 안봐도 된다.

5

Android 정리문서

http://sgap.springnote.com/pages/5076381

 

SurfaceView와 SurfaceHolder.Callback, thread

6

네이티브 안드로이드 개발 관련 블로그

http://hybridego.net/

 

 

7

안드로이드 개발 각종 예제 소스

http://www.androidpeople.com/2010/01/

 

 

8

메뉴별 이미지 처리

http://stackoverflow.com/questions/2065430/fixed-android-detecting-focus-pressed-color

 

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true"
        android:drawable="@android:drawable/btn_default" ></item>
    <item android:state_focused="true"
        android:drawable="@android:drawable/btn_default" ></item>
    <item android:drawable="@drawable/btn_default_red" ></item>
</selector>

9

객체 Style 처리

http://www.anddev.org/viewtopic.php?p=37330

 

 

10

Button Highlight

http://www.androidpeople.com/category/android-tutorial/

 

 

11

SurfaceView

http://vissel.tistory.com/92

 

 

12

android:configChanges

http://www.androidpub.com/52338

 

android:configChanges="orientation"

onConfigurationChanged()

13

전원관리

http://samse.tistory.com/entry/AlarmManager-PowerManager

 

PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);

 PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");

 wl.acquire();

   ..screen will stay on during this section..

 wl.release();

14

하드웨어 콘트롤 관련PDF 문서

http://mikechen.com/classes/2009-11-27%20NTU%20Mobile%20Phone%20Programming%20-%20Mike%20Chen%20-%2010%20-%20Security,%20Camera,%20Audio%20and%20Video.pdf

 

 

15

unique device ID

고유값 가져오기

http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId%28%29

 

TelephonyManager mTelephonyMgr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);

String imei = mTelephonyMgr.getDeviceId();

16

안드로이드 네이티브 라이브러리Ⅰ

http://www.imaso.co.kr/?doc=bbs/gnuboard.php&bo_table=article&wr_id=34284

 

[다른블로그] http://infodev.tistory.com/322

17

Introduction android

http://yotteum.tistory.com/entry/Introduction-Android

 

안드로이드 소개

바인딩 설명

18

안드로이드 - 버튼 OnClickListener 인터페이스 구현

http://woosa7.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-%EB%B2%84%ED%8A%BC-OnClickListener-%EC%9D%B8%ED%84%B0%ED%8E%98%EC%9D%B4%EC%8A%A4-%EA%B5%AC%ED%98%84

http://www.cyworld.com/kkjw1801/3222534

 

 

19

Android - Change Tab Background

http://escomic.net/218

 

TabWidget에서 추가되는 Tab의 Background변경하기

Tab마다 View를 얻어와서 직접 BackgroundDrawable을 지정하고

아래 막대부분은 reflection을 이용하여 꽁수로 바꿔치기 한다

 

tab_indicator.xml, tab_bar_left.xml, tab_bar_right.xml 내용은 <selector>로 정의

20

KH5200 드라이버 설치

http://kil.imradriss.co.cc:8000/tc/30

 

 

21

DrawableTop 이미지 변경하기

http://www.androidpub.com/10154

 

보기 1 ================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = img ;

보기 2 ================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = context.getResources().getDrawable(R.drawable.filename);

보 기
 3 ================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = context.getResources().getDrawable(R.drawable.filename2);
================================================

22

Layout 사이즈 동적변경

http://www.androidpub.com/40481

http://gall.dcinside.com/list.php?id=accident2&no=1195485

LinearLayout ll = (LinearLayout)findViewById(R.id.write_LinearLayout);

LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,

400);  // 400 이라는 높이를 지정

ll.setLayoutParams(params);

23

Android UI 개발기: XML 안쓰고 UI 코딩하기

http://xrath.com/2009/11/android-ui-%EA%B0%9C%EB%B0%9C%EA%B8%B0-xml-%EC%95%88%EC%93%B0%EA%B3%A0-ui-%EC%BD%94%EB%94%A9%ED%95%98%EA%B8%B0/

 

 

24

전화상태 변화감지 리스너

PhoneStateListener 예제

http://www.kandroid.org/board/board.php?board=AndroidTechQnA&page=124&command=body&no=432

 

MyPhoneStateListener phoneListener=new MyPhoneStateListener();

TelephonyManager telephonyManager  =(TelephonyManager)getSystemService(TELEPHONY_SERVICE);

telephonyManager.listen(phoneListener,PhoneStateListener.LISTEN_CALL_STATE);

 

public class MyPhoneStateListener extends PhoneStateListener {...}

25

안드로이드 하드웨어관련 자료(통화,폰상태,네트워크,카메라,센서)

http://gtko.springnote.com/pages/5396297

http://developer.android.com/reference/android/content/Intent.html

http://developer.android.com/reference/android/net/ConnectivityManager.html

android.net.conn.CONNECTIVITY_CHANGE

 

26

sms 수신해서 요약내용 보여주기

http://www.anddev.org/recognize-react_on_incoming_sms-t295.html

http://flytop.tistory.com/62

android.provider.Telephony.SMS_RECEIVED

 

// SMS 수신 감지 등록

IntentFilter smsRcvFilter = new IntentFilter(CSmsReceiver .ACTION);

smsReceiver =  new CSmsReceiver();

registerReceiver(smsReceiver, smsRcvFilter);

 

//if(smsReceiver != null) {

//    unregisterReceiver(smsReceiver);

//}

 

<!-- SMS Broadcast Receiver 등록 -->

<receiver android:name=".common.CSmsReceiver">

<intent-filter>

<action android:name="android.provider.Telephony.SMS_RECEIVED" />

</intent-filter>

</receiver>

27

BroadcastReceiver XML설정하기

http://www.androidpub.com/186727

<receiver android:name="리시버클래스" android:enabled="true">
<intent-filter><action android:name="android.net.conn.CONNECTIVITY_CHANGE" /></intent-filter>
</receiver>

28

각종 Management 클래스

http://www.imaso.co.kr/?doc=bbs/gnuboard.php&bo_table=article&page=10&wr_id=34565

29

Dialog 구조 분석

(아이콘,텍스트 위치등)

http://sgap.springnote.com/pages/5235569

 

30

SMS 수신시 Toast 메시지 출력

http://www.androidpub.com/138352

 

Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.addCategory("android.intent.category.DEFAULT");      

sendIntent.putExtra("address", PhoneNumberUtils.formatNumber(phoneNumber));

sendIntent.putExtra("exit_on_sent"true);

sendIntent.putExtra("subject""TEST MMS");

sendIntent.putExtra("sms_body""MMS 테스트입니다.");

context.startActivity(sendIntent);

31

Broadcast Receiver :네트워크상태 체크

http://www.anddev.org/viewtopic.php?p=32088

 

OnReceive 메소드 내에서..

ConnectivityManager connec=  (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);

if(connec.getNetworkInfo(0).getState()==NetworkInfo.State.CONNECTED||connec.getNetworkInfo(1).getState()==NetworkInfo.State.CONNECTING ) {

text.setText("hey your online!!!");

//Do something in here when we are connected

}

elseif(connec.getNetworkInfo(0).getState()== NetworkInfo.State.DISCONNECTED||connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED ) {

text.setText("Look your not online");

}

32

안드로이드 API기능 설명

http://www.jopenbusiness.com/mediawiki/index.php/Android

 

 

33

Actions for BroadcastReceiver

http://www.dearsoft.org/tag/broadcastreceiver/

 

 

34

Layout.out.xml 생성되는 문제

http://www.androidpub.com/101585

main.out.xml 파일은 삭제해 주세효~
그건 xml 을 펼쳐둔 상태에서 Run 을 하면 만들어 지는데, 그럼 제대로 실행이 되지 않아효~

35

Multi Touch

http://www.mentby.com/naya/multitouch-support-in-android-20.html

http://gist.github.com/324166

2.0 부터 지원

36

ScrollView 스크롤 하단으로 내리기

http://www.anddev.org/viewtopic.php?p=36823

sv.post(new Runnable() {

             public void run() {

                           sv.fullScroll(ScrollView.FOCUS_DOWN);

             }

});

37

Timer 만들기

http://developer.android.com/intl/de/resources/articles/timed-ui-updates.html

http://www.developer.com/java/ent/print.php/3589961

http://www.androidpub.com/4374

http://blog.inculab.net/25

 

38

Logcat 동작안하는 에러 발생시 처리

(Could not create the view: For input string: "")

http://www.mail-archive.com/android-developers@googlegroups.com/msg60683.html

hide details Aug 18
 
I have had the same problem.
 
The logcat view crashes after I inserted a filter containing a ":" in
the filtername.
I solved the problem by changing the settings in the file
".metadata/.plugins/org.eclipse.core.runtime/.settings/
com.android.ide.eclipse.ddms.prefs" placed in the workspace of
eclipse.
com.android.ide.eclipse.ddms.logcat.filters= was the key of the fault
setting.

 

39

SSL 인증서 등록하기

http://www.java2go.net/blog/197?TSSESSION=1202a1a23fa67bae15ce3ab15a5a0cea

http://www.virgo81.net/70

http://crazybob.org/2010/02/android-trusting-ssl-certificates.html

http://www.bouncycastle.org/latest_releases.html

keytool -import -keystore cacerts -file C:\cert\TrialRootCA.cer -alias afcert

40

Signing By Private Key

http://www.devx.com/wireless/Article/39972/1954

 

41

영상 녹화하기

http://www.anddev.org/viewtopic.php?p=24723#24723

 

42

SurfaceView 의 이해

http://androidhuman.tistory.com/entry/카메라를-이용하자-SurfaceView에-대한-이해

 

43

안드로이드 JAVA 소스

http://anddev.tistory.com/77

http://anddev.tistory.com/50

http://anddev.tistory.com/42

{SDK_LOCATION}/platforms/1.5/sources

44

SSL 인증서 우회하기

http://www.experts-exchange.com/Programming/Languages/Java/Q_23063074.html

http://7bee.j2ee.us/blog/2008/03/28/1206704820000.html

 

 

45

JAVA SSL 관련 공식문서

http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html

http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore

http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CodeExamples

http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/samples/sockets/client/SSLSocketClient.java

 

46

SSL 인증서 증명에러 해결하기

http://blog.naver.com/PostView.nhn?blogId=fidelis98&logNo=140103425406&redirect=Dlog&widgetTypeCall=true

http://code.google.com/p/android/issues/detail?id=1946

http://developer.android.com/intl/de/reference/javax/net/ssl/TrustManager.html

http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/200906.mbox/

http://www.exampledepot.com/egs/javax.net.ssl/GetCert.html?l=rel

http://www.android-portal.com/2007/12/20/secure-server-socket-with-tlsssl-on-android-fails/

http://www.exampledepot.com/egs/javax.net.ssl/TrustAll.html?

http://blog.keduall.co.kr/lsb76/entry/자바-SSL-접속-오류

해결방법http://www.exampledepot.com/egs/javax.net.ssl/TrustAll.html

 

// Create a trust manager that does not validate certificate chains

TrustManager[] trustAllCerts = new TrustManager[]{

   new X509TrustManager() {

        public java.security.cert.X509Certificate[] getAcceptedIssuers() {

             return null;

        }

        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) {

        }

        public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) {

        }

    }

};

47

안드로이드 Service 에서 Activity 를 실행하는 방법 

http://blog.naver.com/huewu/110084868855

 

Intent i = new Intent(this, ServiceTest.class);

PendingIntent p = PendingIntent.getActivity(this, 0, i, 0);

try {

           p.send();

} catch (CanceledException e) {

           e.printStackTrace();

}

 

48

안드로이드 이미지(사진) 불러오기

http://shinluckyarchive.tistory.com/469

http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html

 

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
...
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 8;  
Bitmap src = BitmapFactory.decodeFile(fileListSDCard[i], options);
Bitmap resized = Bitmap.createScaledBitmap(src, 100, 100, true);

 

49

SSL 인증키 무조건 우회하기

http://groups.google.com/group/android-developers/browse_thread/thread/62d856cdcfa9f16e

public class _FakeX509TrustManager implements X509TrustManager { 
        private static TrustManager[] trustManagers; 
        private static final X509Certificate[] _AcceptedIssuers = new 
X509Certificate[] {};
 
        @Override 
        public void checkClientTrusted(X509Certificate[] chain, String 
authType) throws CertificateException {
 
        } 
        @Override 
        public void checkServerTrusted(X509Certificate[] chain, String 
authType) throws CertificateException {
 
        } 
        public boolean isClientTrusted(X509Certificate[] chain) { 
                return true; 
        } 
        public boolean isServerTrusted(X509Certificate[] chain) { 
                return true; 
        } 
        @Override 
        public X509Certificate[] getAcceptedIssuers() { 
                return _AcceptedIssuers; 
        } 
        public static void allowAllSSL() { 
                HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() 
             {
 
                        @Override 
                        public boolean verify(String hostname, SSLSession session) { 
                                return true; 
                        } 
                }); 
                SSLContext context = null; 
                if (trustManagers == null) { 
                        trustManagers = new TrustManager[] { new _FakeX509TrustManager() }; 
                } 
                try { 
                        context = SSLContext.getInstance("TLS"); 
                        context.init(null, trustManagers, new SecureRandom()); 
                } catch (NoSuchAlgorithmException e) { 
                        e.printStackTrace(); 
                } catch (KeyManagementException e) { 
                        e.printStackTrace(); 
                } 
                  
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory()); 
        } 
}

50

효과음 관련 자료(Creating Sound Effects in Android)

http://www.and

2010. 12. 19. 23:01

스크롤이 마지막인지 체크하기

 function scrollAutoTestFnc(){
     //현재문서의 높이
     var scrollHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);

    //현재 스크롤탑의 값
    var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);

    //현재 화면 높이 값
    var clientHeight = document.documentElement.clientHeight;

    if((scrollTop+clientHeight) == scrollHeight){ //스크롤이 마지막일때
      alert("last") ;
    }
 }
 window.onscroll=function(){
    scrollAutoTestFnc();
 }
자 이건 어디에 써먹을 수 있느냐.
요즘 스마트폰에서 스크롤을 내리다보면 내용이 계속 추가 되는게 보일텐데;;
상탄의 alert부분에 AJAX로 작동하는 Contents 내용 추가 해주는 함수를 넣어주면 스크롤이 젤 하단에 내려가면 
자동으로 일정부분  Contents가 추가 되는 화면 구성을 만들 수 있을 것이다.

아직 실험은 안해봤지만;;;
요즘 만들고 있는 Android Hybrid Application에 적용해 보려합니다.

Chrome 브라우져에서도 되야 하는데;;;
내일 확인해 봐야겠음돠.ㅋ 기대기대~~+_+

다른 브라우져의 Object확인은
2010. 12. 17. 16:33

firefox계열에서 iframe의 객체 얻어오기

<IE>

var iframeDocument =  iframe.contentWindow.document;

 

<FireFox>

var iframeDocument = iframe.contentDocument;

 

<둘다 동작하게 하기>

if(iframe.contentWindow) {

var iframeDocument =  iframe.contentWindow.document;

} else if (iframe.contentDocument) {

var iframeDocument = iframe.contentDocument;

}

2010. 11. 26. 15:27

Ajax 한글 파라미터 보내기

XMLHttpRequest 는 전송시

<meta http-equiv="content-type" content="text/html; charset=euc-kr" />

 

위에 처럼 euc-kr 이 지정되어 있더라도 설정된 인코딩을 사용하지 않는다

따라서 한글일경우 자바스크립트에서 직접 인코딩해주어야 한다 (불편하다! -0-)

자바스크립트에서 escape함수와 encodeURIComponent 함수를 지원해 주는데 escape은 유니코드로,

encodeURIComponent는 utf-8로 인코딩 된다

 

고로 보내기전 인코딩하고 받는 쪽에서도 인코딩 하면 한글문제는 일어나지 않는다

 

보내는쪽

utf-8     'list.jsp?search='+encodeURIComponent('홍길동')

 

받는쪽

request.setCharacterEncoding("utf-8");
request.getParameter("search");

 

Ajax에서 전송시 GET, POST 방식 모두 동일하게 처리해 주면 된다