'JAVA'에 해당되는 글 66건
- 2024.09.16 :: ListView, ArrayAdapter 1
- 2024.09.16 :: Android service not restarted when app back from idle state
- 2024.09.16 :: Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE
- 2024.09.16 :: add an item to a ListView with each button click
- 2024.09.16 :: JAVA, TimeFormat string , [Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat
- 2024.09.10 :: 서비스 ForegroundService , BackgroundService
https://armful-log.tistory.com/26
[안드로이드] ListView, ArrayAdapter 사용하기
안드로이드 개발을 하다보면, 스크롤이 되면서 아이템들을 리스트로 보여줘야할 상황이 있다.이것을 우리는 Adapter를 이용해서 data들을 가져오는 ListView를 사용할 것이다. ArrayAdapter- ArrayList(data)
armful-log.tistory.com
'JAVA > android_studio' 카테고리의 다른 글
| ListView 기본 , overview (0) | 2024.09.16 |
|---|---|
| Android ListView scroll to bottom (1) | 2024.09.16 |
| Android service not restarted when app back from idle state (0) | 2024.09.16 |
| Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE (0) | 2024.09.16 |
| add an item to a ListView with each button click (0) | 2024.09.16 |
Android service not restarted when app back from idle state
I've upgraded my app to API 26 and I'm facing some issues with the new background execution limits. On Oreo devices, as soon as my app goes in background, my app is stopped by the OS due to idle s...
stackoverflow.com
서비스 실행후 서비스포그라운드 를 제한시간이내에 호출해줘야 함.
'JAVA > android_studio' 카테고리의 다른 글
| Android ListView scroll to bottom (1) | 2024.09.16 |
|---|---|
| ListView, ArrayAdapter (1) | 2024.09.16 |
| Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE (0) | 2024.09.16 |
| add an item to a ListView with each button click (0) | 2024.09.16 |
| JAVA, TimeFormat string , [Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat (0) | 2024.09.16 |
Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE
Lately we have suddenly been seeing a few of the following stack traces. Why could that be? This is from when the app tries to move an audio commentary service into the foreground with a media
stackoverflow.com
From the migration notes for Android 9:
Apps wanting to use foreground services must now request the FOREGROUND_SERVICE permission first. This is a normal permission, so the system automatically grants it to the requesting app. Starting a foreground service without the permission throws a SecurityException.
The solution is to just add the following in AndroidManifest.xml:
<manifest ...>
...
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
...
<application ...>
...
</manifest>
'JAVA > android_studio' 카테고리의 다른 글
| ListView, ArrayAdapter (1) | 2024.09.16 |
|---|---|
| Android service not restarted when app back from idle state (0) | 2024.09.16 |
| add an item to a ListView with each button click (0) | 2024.09.16 |
| JAVA, TimeFormat string , [Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat (0) | 2024.09.16 |
| 서비스 ForegroundService , BackgroundService (0) | 2024.09.10 |
https://stackoverflow.com/questions/31279216/how-to-add-an-item-to-a-listview-with-each-button-click
How to add an item to a ListView with each Button click
This is the code I'm working on, it should simply add an item in a ListView (w/ array) each time the Button is clicked. The text inserted by the user on a EditText should be added to the list each ...
stackoverflow.com
| Button buttonPlus = (Button)findViewById(R.id.buttonPlus); buttonPlus.setOnClickListener( new Button.OnClickListener() { @Override public void onClick(View v) { arrayNames.add(0, namesText.getText().toString()); adapterNames.notifyDataSetChanged(); namesText.setText(""); } } ); |
'JAVA > android_studio' 카테고리의 다른 글
| Android service not restarted when app back from idle state (0) | 2024.09.16 |
|---|---|
| Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE (0) | 2024.09.16 |
| JAVA, TimeFormat string , [Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat (0) | 2024.09.16 |
| 서비스 ForegroundService , BackgroundService (0) | 2024.09.10 |
| 핸들러 , Handler (1) | 2024.09.10 |
[Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat
출처: https://kong-droid.com/entry/AndroidJava-현재-날짜-시간-출력-SimpleDateFormat [Kong-droid:티스토리]
- 사용예.
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS") ;//밀리초 단위로 표시
String time = sdf.format (System.currentTimeMillis());
adapter.add( time +"]" + message) ;
adapter.notifyDataSetChanged();
'JAVA > android_studio' 카테고리의 다른 글
| Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE (0) | 2024.09.16 |
|---|---|
| add an item to a ListView with each button click (0) | 2024.09.16 |
| 서비스 ForegroundService , BackgroundService (0) | 2024.09.10 |
| 핸들러 , Handler (1) | 2024.09.10 |
| WiFiManagerTest (0) | 2024.06.29 |
- 서비스 사용 예제
https://stickode.tistory.com/736
[Android][Java] Service 사용 이해를 위한 예제(1)
오늘은 간단한 예제를 통해 안드로이드 서비스의 동작 방식을 익혀 보도록 하겠습니다. Service ? 백그라운드에서 오랜 작업을 수행할 수 있는 앱 구성요소로써 사용자 인터페이스가 제공되지 않
stickode.tistory.com
'JAVA > android_studio' 카테고리의 다른 글
| add an item to a ListView with each button click (0) | 2024.09.16 |
|---|---|
| JAVA, TimeFormat string , [Java/Android] 현재 날짜, 시간 출력 SimpleDateFormat (0) | 2024.09.16 |
| 핸들러 , Handler (1) | 2024.09.10 |
| WiFiManagerTest (0) | 2024.06.29 |
| ListView 의 아이템으로 두가지 이상의 View사용하기 (0) | 2024.03.26 |

