๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

๐Ÿ‘จ๐Ÿผ‍๐Ÿ’ป๊ฐœ๋ฐœ/์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค16

์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์‹คํ–‰(์„œ๋น„์Šค) ๊ด€๋ จ ์˜ˆ์ œ ์ฝ”๋“œ Create a service public class YourService extends Service { @Nullable @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { // do your jobs here return super.onStartCommand(intent, flags, startId); }}   Create an Application class and start your service public class Ap.. 2024. 10. 13.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ํ™”๋ฉด ์ผœ์ง ์ƒํƒœ ์œ ์ง€ public class MyActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }} 2024. 10. 10.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ์›น๋ทฐ(WebView) ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์กฐ์ž‘ private Boolean isLoadingFinished = false; ... WebView webView = findViewById(R.id.webView); webView.setWebViewClient(new WebViewClient(){ @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); Toast.makeText(getApplicationContext(), "ํŽ˜์ด์ง€ ๋กœ๋“œ ์ค‘...", Toast.LENGTH_LONG).show(); isLoadingFinished = false; } @Override public void onPag.. 2023. 8. 23.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ์Šค์™€์ดํ”„ ๋ฆฌ์ŠคํŠธ ๋ฉ”๋‰ด ๊ตฌํ˜„ SwipeMenuListView: https://github.com/baoyongzhang/SwipeMenuListView GitHub - baoyongzhang/SwipeMenuListView: [DEPRECATED] A swipe menu for ListView. [DEPRECATED] A swipe menu for ListView. Contribute to baoyongzhang/SwipeMenuListView development by creating an account on GitHub. github.com ListView ์กฐ์ž‘ ๋ธ”๋กœ๊ทธ: https://lktprogrammer.tistory.com/163 [Android] ์•ˆ๋“œ๋กœ์ด๋“œ - ๋ฆฌ์ŠคํŠธ๋ทฐ(ListView) ๊ตฌํ˜„ ๋ฆฌ์ŠคํŠธ๋ทฐ(ListView)๋Š”.. 2022. 4. 7.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - HTTP ํ†ต์‹  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(Volley) [build.gradle] implementation 'com.android.volley:volley:๋ฒ„์ „' [AndroidManifest.xml] usesCleartextTraffic๋กœ https ์‚ฌ์šฉ ์ง€์› ํ™œ์„ฑํ™” [mainActivity.java] String url ="https://www.google.com"; RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext()); StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener() { @Override public void onResponse(String res.. 2022. 4. 5.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - RecyclerView(๋ฆฌ์‚ฌ์ดํด๋Ÿฌ๋ทฐ) ์กฐ์ž‘ ์ด 5๊ฐ€์ง€์˜ ์ž‘์—…์ด ํ•„์š”, ๊ฐ๊ฐ activity_main.xml, ์•„์ดํ…œ.xml, ๋ฐ์ดํ„ฐ.java, ๋ฆฌ์‚ฌ์ดํด๋Ÿฌ_์–ด๋Œ‘ํ„ฐ.java, MainActivity.java [activity_main.xml] ๋„ํ™”์ง€ ์—ญํ• ์„ ํ•ด์ค„ activity_main.xml์— RecyclerView๋ฅผ ๋„ฃ์Œ [item.xml] ๋ฆฌ์ŠคํŠธ์— ๋“ค์–ด๊ฐˆ ์•„์ดํ…œ๋“ค์„ ๊พธ๋ฉฐ์คŒ [Data.java] package com.app.listapp; public class Data { private String name; private String phone; public Data(String name, String phone){ this.name = name; this.phone = phone; } public String getName(){ return.. 2022. 3. 30.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - notification Intent ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋˜ MainActivity๋กœ ๋‹ค์‹œ ์ด๋™ํ•˜๊ธฐ ํ•ด๊ฒฐ Intent notificationIntent = new Intent(getApplicationContext(), MainActivity.class); notificationIntent.setAction(Intent.ACTION_MAIN); notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER); notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” MainActivity๋กœ ๋‹ค์‹œ ์ด๋™์„ ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ. ์ถœ์ฒ˜: https://like-tomato.tistory.com/156 [Notification] ์•ˆ๋“œ๋กœ์ด๋“œ ์•ฑ ์ค‘๋ณต ์‹คํ–‰ ๋ฌธ์ œ ์™„๋ฒฝ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• ์•ˆ๋“œ๋กœ์ด๋“œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ฐœ๋ฐœํ•˜๋‹ค ๋ณด๋ฉด ๋Œ€๋ถ€๋ถ„.. 2022. 3. 22.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ์•ฑ ์•„์ด์ฝ˜ ์ˆจ๊ธฐ๊ธฐ/๋ณด์ด๊ธฐ [์ˆจ๊ธฐ๊ธฐ] PackageManager p = getPackageManager(); ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); // activity which is first time open in manifiest file which is declare as p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); [๋ณด์ด๊ธฐ] PackageManager p = getPackageManager(); ComponentName componentN.. 2021. 12. 19.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ๋ถ€ํŒ…์‹œ ์ž๋™ ์‹คํ–‰ [AndroidManifest.xml] [StartActivityOnBootReceiver.java] package com.codinginflow.onbootreceiverexample; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class StartActivityOnBootReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAct.. 2021. 12. 19.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์„œ๋น„์Šค ์‹คํ–‰ ์ถœ์ฒ˜: https://stackoverflow.com/questions/46716069/how-to-make-background-process-in-android-studio How To Make Background Process in Android Studio hi guys thank you for answering my question,i have made an android app in android studio i want to make funtion when i close the app the function start automatically in background is there any way ... stackoverflow.com [์•กํ‹ฐ๋น„ํ‹ฐ] public class App extends .. 2021. 12. 19.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - The minCompileSdk (31) specified in adependency's... ์˜ค๋ฅ˜ ํ•ด๊ฒฐ build.gradle๋กœ ๋“ค์–ด๊ฐ€์„œ compileSdkVersion์„ 31๋กœ ์ˆ˜์ • ์ถœ์ฒ˜: https://ardmos.tistory.com/entry/The-minCompileSdk-31-specified-in-adependencys-AAR-metadata [์˜ค๋ฅ˜ ํ•ด๊ฒฐ] The minCompileSdk (31) specified in adependency's AAR metadata ... ์–ด์ œ ์ƒˆ๋กœ ๋งŒ๋“  ํ”„๋กœ์ ํŠธ๋ฅผ ๋นŒ๋“œํ•˜๋ ค๋˜ ๋„์ค‘ The minCompileSdk (31) specified in a dependency's AAR metadata ... ๋ผ๋Š” ๋‚ด์šฉ์˜ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. - ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•! bulid.gradle (Module) ํŒŒ์ผ์˜ compileSdk์™€ targ.. ardmos.tistory.com 2021. 11. 24.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - fragment ์กฐ์ž‘ํ•˜๊ธฐ ์•กํ‹ฐ๋น„ํ‹ฐ์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์•„์›ƒ์„ LinearLayout์œผ๋กœ ๋ณ€๊ฒฝ ๊ธฐ๋ณธ horizontal๋ฅผ vertical์œผ๋กœ ๋ณ€๊ฒฝ LinearLayout ์ž์‹์„ ๋‘ ๊ฐœ ๋„ฃ์–ด์ฃผ๊ธฐ ๊ฐ๊ฐ fragment ๋ทฐ์–ด, fragment ์ „ํ™˜ ์—ญํ• ์„ ํ•  ๊ฑฐ์ž„ ์ฒซ ๋ฒˆ์งธ ์ž์‹ LinearLayout์˜ id๋ฅผ Container๋กœ ์ˆ˜์ • ๋‘ ๋ฒˆ์งธ์˜ ์ž์‹ LinearLayout์— button๋“ค์„ ๋„ฃ์–ด์คŒ ๊ทธ๋Ÿฐ๋ฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์— button๋“ค์ด ๋ณด์ด์ง€ ์•Š๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋Š”๋ฐ, ์ด๋Š” Container๊ฐ€ ๋ถ€๋ชจ์˜ ํฌ๊ธฐ๋งŒํผ ์„ค์ •์ด ๋˜์–ด์žˆ์–ด์„œ ๋ฒ„ํŠผ์˜ ๋ ˆ์ด์•„์›ƒ์ด ๋ฐ€๋ ค๋‚œ ๊ฒƒ์ž„ Container์˜ layout_weight ์†์„ฑ ๊ฐ’์œผ๋กœ 1์„ ์ค€๋‹ค. ๋ฒ„ํŠผ ๋ ˆ์ด์•„์›ƒ์˜ layout_height๋ฅผ wrap_content๋กœ ๋ณ€๊ฒฝํ•ด์ค€๋‹ค. ๊ทธ๋Ÿผ ๋ฒ„ํŠผ๋“ค์ด ์ œ๋Œ€๋กœ ๋‚˜์˜ค๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.. 2021. 11. 23.
728x90
๋ฐ˜์‘ํ˜•