[태그:] Android
구글 안드로이드 관련
취미 기록용 블로그
구글 안드로이드 관련
Bitmap image = ThumbnailUtils.createVideoThumbnail(“동영상 경로”, android.provider.MediaStore.Video.Thumbnails.MINI_KIND); 이렇게 하면 동영상 썸네일을 구해옴. “read more”
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(); layoutParams.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND; layoutParams.dimAmount = 0.8f; // 투명도 0 ~ 1 getWindow().setAttributes(layoutParams); 위 내용은 onCreate에 넣어주고 android:theme=”@android:style/Theme.Translucent” 이건 AndroidManifest.xml 에서 해당 액티비티에 아래 속성을 넣어준다 “read more”
File apkFile = new File(apk파일경로); if(apkFile.exists() == true ){ Intent intent2 = new Intent(Intent.ACTION_VIEW); intent2.setDataAndType( Uri.fromFile(apkFile), “application/vnd.android.package-archive”); this.startActivity(intent2); } 안드로이드에서 APK 설치하게 해주는 명령 “read more”
Intent intent = this.getPackageManager().getLaunchIntentForPackage(패키지명); this.startActivity(intent); 별다른 권한은 필요치 않음 “read more”
다른 액티비티 상태에서 종료를 원할때 public class TestMain extends Activity { public static Activity mainAct; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mainAct = TestMain.this; } @Override protected void onDestroy() { ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE); am.restartPackage(getPackageName()); super.onDestroy(); } } public… “read more”
3d프린터 AI이미지 Android Buying C# C Language DVD Game Story Golang Java Linux MacOS Netflix PS3 PS4 PSN Review SSD stable-diffusion Waifu2x Web XBOX 게임 엔딩 게임패스 구글 넵튠 넷플릭스 마우스 맥미니 배터리 버그 블루레이 블루투스 사용기 소니 소비전력 스팀 스피커 아마존 알리익스프레스 여름휴가 여행 영화 외장하드 우분투 워드프레스 자전거 책 해외여행 해외직구
Copyright© 2005-2026 Linsoo All Rights Reserved.