posted by 네코냥이 2013. 8. 2. 09:26

[출처] [안드로이드] 바탕화면에 단축 아이콘 생성 방법|작성자 까미유



안드로이드 앱에서 바탕화면에 단축 아이콘을 생성하는 예제 소스 코드는 다음과 같다.

 

// 단축 아이콘을 클릭하였을 때에 실행할 Activity 를 설정한다.

Intent shortcutIntent = new Intent( Intent.ACTION_MAIN );
shortcutIntent.setClassName( clsContext, DlgSplash.class.getName( ) );
shortcutIntent.putExtra( Code.NAME, "PowerProgrammer" );

 

// 단축 아이콘을 등록한다.

Intent intent = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");
intent.putExtra( Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent );
intent.putExtra("duplicate", false); // 단축 아이콘을 중복으로 등록하고 싶지 않은 경우 추가해 주어야 한다.

intent.putExtra( Intent.EXTRA_SHORTCUT_NAME, "PowerProgrammer" );
intent.putExtra( Intent.EXTRA_SHORTCUT_ICON_RESOURCE,

                      Intent.ShortcutIconResource.fromContext( clsContext, R.drawable.icon ) );

 

clsContext.sendBroadcast( intent );




posted by 네코냥이 2013. 7. 31. 15:36


Listview Search in Android Studio.pdf


posted by 네코냥이 2013. 7. 31. 15:35


Change Brightness of a Screen Using SeekBar in Android Studio.pdf


posted by 네코냥이 2013. 7. 31. 15:34


JSON Parsing in Android Studio.pdf


posted by 네코냥이 2013. 7. 19. 09:03


안드로이드 센서(Sensor) 설명과 예제.pdf

출처:http://www.cyworld.com/kjky0/3981901




안드로이드 센서_네이버.pdf

출처:http://memy80.blog.me/100124150013