실행환경

 Desktop

 조립식

 CPU

 Intel(R) Core(TM) i7-3770 3.50GHz

 Memory

 4 GB

 OS

 Window 7 Professional 32bit

 Java

 1.7.0_51

 Android

 SDK : 4.4.2 (KitKat) / 테스트기기 : Galaxy S3 4.3(Jelly Bean)

 WebServer

 Apache Tomcat 7.0

 DB

 MySQL 5.6.15


문제점

현재 클래스의 Activity, Context를 가져오는 방법


해결방안

Activity mActivity;
mActivity = 현재클래스.this;
Context mContext;
mContext = getApplicationContext();

 실행환경

 Desktop

 조립식

 CPU

 Intel(R) Core(TM) i7-3770 3.50GHz

 Memory

 4 GB

 OS

 Window 7 Professional 32bit

 Java

 1.7.0_51

 Android

 SDK : 4.4.2 (KitKat) / 테스트기기 : Galaxy S3 4.3(Jelly Bean)

 WebServer

 Apache Tomcat 7.0

 DB

 MySQL 5.6.15


문제점

안드로이드에서 파일 출력을 하려는데 openFileOutput에서 에러가 발생했다.

"The method openFileOutput(String, int) is undefined for the type LocationData" 라고 정의되어 있지 않다고 한다.


해결방안

openFileOutput()는 Context 클래스에 있는 메서드인데 파일출력을 하는 클래스를 따로 만들었을땐 문제가 발생한다.

그러므로, 파일 출력 클래스에서 Context를 선언해주어야 한다.

(혹시 몰라 MainActivity에 있는 Context를 그대로 가져왔습니다. 문제 없다면 댓글 부탁바랍니다.)


MainActivity.java

...
Context mContext;
mContext =  getApplicationContext();
data.textFileSave(mContext);
...

LocationData.java(파일출력 클래스)

...
public void textFileSave(Context cont) {
FileOutputStream fos = null;
	try {
		// 기본 파일 저장
		fos = cont.openFileOutput("test.txt", Context.MODE_APPEND);
		for.write(toString().getBytes());
		...
	} catch (Exception e) {}
}
...


radioGroup 리스너 예제 - 2014.04.01

MainActivity.java
package com.example.project4_1_pet;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity {

	TextView tv1, tv2;
	CheckBox start_chkBox;
	RadioGroup rGroup;
	RadioButton rb1, rb2, rb3;
	ImageView imgView;
	Button btn, btnQuit, btnReturn;
	Switch switchBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		setTitle("yeongjun");

		switchBtn = (Switch) findViewById(R.id.switchBtn);
		tv1 = (TextView) findViewById(R.id.tv1);
		tv2 = (TextView) findViewById(R.id.tv2);
		rGroup = (RadioGroup) findViewById(R.id.RGroup);
		rb1 = (RadioButton) findViewById(R.id.rb1);
		rb2 = (RadioButton) findViewById(R.id.rb2);
		rb3 = (RadioButton) findViewById(R.id.rb3);
		imgView = (ImageView) findViewById(R.id.imgView);
		btnQuit = (Button) findViewById(R.id.btnQuit);
		btnReturn = (Button) findViewById(R.id.btnReturn);

		switchBtn
				.setOnCheckedChangeListener(new Switch.OnCheckedChangeListener() {
					public void onCheckedChanged(CompoundButton cb,
							boolean isChecking) {
						if (isChecking) {
							Toast.makeText(getApplicationContext(),
									"isChecked", Toast.LENGTH_SHORT).show();
							tv2.setVisibility(1);
							rGroup.setVisibility(1);
							imgView.setVisibility(1);
						} else {
							Toast.makeText(getApplicationContext(),
									"isNotChecked", Toast.LENGTH_SHORT).show();

							tv2.setVisibility(4);
							rGroup.setVisibility(4);
							imgView.setVisibility(4);
						}

					}
				});

		rGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				// TODO Auto-generated method stub
				switch (checkedId) {
				case R.id.rb1:
					imgView.setImageResource(R.drawable.dog);
					break;
				case R.id.rb2:
					imgView.setImageResource(R.drawable.cat);
					break;
				case R.id.rb3:
					imgView.setImageResource(R.drawable.rabbit);
					break;
				default:
					Toast.makeText(getApplicationContext(),
							"radio btn select plz", Toast.LENGTH_SHORT).show();
				}
			}
		});

		btnQuit.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				finish();
			}
		});

		btnReturn.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				tv2.setVisibility(4);
				rGroup.setVisibility(4);
				imgView.setVisibility(4);

				switchBtn.setChecked(false);
			}
		});
	}
}


main.xml


 실행환경

 Notebook

 SAMSUNG NT550p5c-s61r

 CPU

 Intel Core i5-3210M 2.50GHz

 Memory

 8 GB

 OS

 Window 7 ultimate 64bit

 Java

 1.7.0_51

 WebServer

 Apache Tomcat 7.0


ADT(Android Development Tool) 설치

안드로이드 개발에 필요한 기능을 묶어서 만든 플러그인으로 이클립스와 SDK와 연결해준다.


1. 이클립스를 실행하고 아래 메뉴를 선택한다.

Help - Install New Software



2. 설치할 경로를 입력하기 위해 Add...를 클릭하고 아래와 같이 입력한다.

https://dl-ssl.google.com/android/eclipse/



3. 플러그인을 선택한다. 

  • NDK Plugins은 Native Development Kit의 약자로 C 또는 C++로 개발할 수 있게 도와주는 Development Kit이다.

4. 설치를 진행한다.



5. 이클립스가 재시작되고 설치가 완료된다. 

아직 안드로이드 개발 환경이 완성된 것은 아니다. 다음은 SDK를 설치하고 이클립스에 연동시켜보자.


Android SDK 설치


1. SDK는 안드로이드 홈페이지에 받을 수 있다.

  • 홈페이지에 접속하면 아래와 같은 화면이 나오게되는데 파란색 버튼(Download the SDK)를 선택하게되면 ADT와 SDK가 함께 설치된 이클립스를 받을 수 있다.
  • 하지만 위에서 이클립스와 ADT를 받았으니 SDK만 받기위해 좀 더 아래로 내려가 DOWNLOAD FOR OTHER PLATFORMS를 선택하자.
  • 각자 자신의 컴퓨터에 맞는 파일을 다운받는다.


2. 압축파일을 보면 이클립스도 같이 들어있다. 이클립스는 이전에 받았기 때문에 두개의 파일만 원하는 곳에 받는다. 계속 사용해야하므로 바탕화면에 덩그러니 놓아두는 것은 피하자.


3. 이클립스를 켜면 아래와 같은 창이 나올 것이다. 혹시나 나오지 않게 되면 아래 메뉴로 들어간다.



4. 다운받은 SDK를 지정해준다.



5. SDK를 실행시키고 설치하고자 하는 파일을 받는다.

이클립스 SDK 버튼이 보이지 않을 때



안드로이드 설치가 완성되었다.

 실행환경

 Desktop

 조립식

 CPU

 Intel(R) Core(TM) i7-3770 3.50GHz

 Memory

 4 GB

 OS

 Window 7 Professional 32bit

 Java

 1.7.0_51

 Android

 SDK : 4.4.2 (KitKat) / 테스트기기 : Galaxy S3 4.3(Jelly Bean)

 WebServer

 Apache Tomcat 7.0

 DB

 MySQL 5.6.15


문제점

xml에서 개행(엔터)을 넣어주고 싶을 경우.


해결방안

개행할 곳에 \n을 넣어준다.

<string name="msg">
    개행하기\n
    두번째 줄</string>


 실행환경

 Desktop

 조립식

 CPU

 Intel(R) Core(TM) i7-3770 3.50GHz

 Memory

 4 GB

 OS

 Window 7 Professional 32bit

 Java

 1.7.0_51

 Android

 SDK : 4.4.2 (KitKat) / 테스트기기 : Galaxy S3 4.3(Jelly Bean)

 WebServer

 Apache Tomcat 7.0

 DB

 MySQL 5.6.15


문제점

gps를 잘 사용하다가 언제부턴가 계속 위치를 가져오지 못한다.

아마 재부팅 후 부터 가져오질 못하는것 같다. 로그는 남겨서 어디까지 실행하는지 확인해봤다.

먼저 선언부이다.

Location location;
protected LocationManager locationManager;

locationManager = (LocationManager) mContext.getSystemService(mContext.LOCATION_SERVICE);
isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);



먼저 GPS가 활성화되어 있을 때 날짜를 Toast로 출력하였다 사진엔 보이진 않지만 정상적으로 실행되었다.

1번 로그와 2번 로그 모두 확인할 수 있었다. 하지만 3번 로그가 출력되지 않았다.

location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);

위 코드에서 문제가 있는 것 같다. getLastKnownLocation()은 이전에 저장된 위치정보을 가져오기 때문에 재부팅 후에는 null값을 반환한다.



해결방안

퍼미션으로 추가한 android.permission.ACCESS_FINE_LOCATION 은 위성과 직접 연결하여 현재 위치를 받아오는 것이다. 

핸드폰을 재부팅하거나 GPS 위치정보를 가지고 있지 않은 경우(GPS를 한번도 사용하지 않았다면)에 건물내부에서 GPS만을 사용하는 앱으로 테스트를 할 경우 현재 위치를 가져올수 없기 때문에 getLastKnownLocation()은 마지막에 GPS를 구동시켰던 장소를 가져오게 된다. 하지만 마지막 위치정보가 없기 때문에 null값이 반환된다.


실외에서 GPS를 활성화 시키고 대략 10초가량 기다린 후에 앱을 실행시켜보니(혹은 위치정보를 가져오는 버튼을 클릭했을 경우) 정상적으로 현재위치를 확인할 수 있었다.


위치정보를 계속 가져오는 것을 바란다면 정확성은 떨어지지만 조건문을 사용해서 GPS가 활성화 되어있지 않으면 네트워크 정보를 가져오는 방법이 있다. 전체 코드는 아니지만 확인해보길 바란다.

public Location getLocation() {
	try {
		locationManager = (LocationManager) mContext.getSystemService(LOCATION_SERVICE);

		// GPS, NETWORK 활성화 여부 확인
		isGPSEnabled = locationManager.
			isProviderEnabled(LocationManager.GPS_PROVIDER);
		isNetworkEnabled = locationManager.
			isProviderEnabled(LocationManager.NETWORK_PROVIDER);

		if (!isGPSEnabled && !isNetworkEnabled) {
			// 모두 비활성화의 경우
		} else {
			this.canGetLocation = true;
			if (isNetworkEnabled && !isGPSEnabled) {
				locationManager.requestLocationUpdates(
						LocationManager.NETWORK_PROVIDER,
						MIN_TIME_BW_UPDATES,
						MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
				if (locationManager != null) {
					location = locationManager
							.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
					if (location != null) {
						data.setLatitude(location.getLatitude());
						data.setLongitude(location.getLongitude());
					}
				}
			} else if (isGPSEnabled) {
				if (location == null) {
					locationManager.requestLocationUpdates(
							LocationManager.GPS_PROVIDER,
							MIN_TIME_BW_UPDATES,
							MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
					if (locationManager != null) {
						location = locationManager
								.getLastKnownLocation(LocationManager.GPS_PROVIDER);
						if (location != null) {
							data.setLatitude(location.getLatitude());
							data.setLongitude(location.getLongitude());
						}
					}
				}
			}
		}

	} catch (Exception e) {
		e.printStackTrace();
	}

	return location;
}


참고1, 참고2

Listener 사용 - 2014.03.18 강의내용

package com.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends Activity {

	Button _btnNum;
	Button _btnName;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		_btnNum = (Button) findViewById(R.id.btn_num);
		_btnName = (Button) findViewById(R.id.btn_name);

		OnClickListener mClickListener = new OnClickListener() {
			@Override
			public void onClick(View v) {
				switch (v.getId()) {
				case R.id.btn_num:
					Toast.makeText(MainActivity.this, "2010211878",
							Toast.LENGTH_LONG).show();
					break;
				case R.id.btn_name:
					Toast.makeText(MainActivity.this, "Kim Yeong-Jun",
							Toast.LENGTH_LONG).show();
					break;
				}

			}
		};
		_btnNum.setOnClickListener(mClickListener);
		_btnName.setOnClickListener(mClickListener);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}

Toast 사용 - 2014.03.11 강의내용

public class HelloAndroidActivity extends Activity {
	Button _clickBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main); // 초기에 띄워줄 화면

		// 초기화
		_clickBtn = (Button) findViewById(R.id.btn_click);

		// 이벤트 리스너
		_clickBtn.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				// 매개변수 1 : context 내가 사용할 응용프로그램 자체
				// 매개변수 2 : 출력할 문자
				// 매개변수 3 : 화면에 보여줄 시간

				Toast.makeText(HelloAndroidActivity.this, "test", Toast.LENGTH_LONG).show();
				// Toast.makeText(getApplicationContext(), "test",Toast.LENGTH_LONG).show();

				// 아래 변수를 생성해주어야만 사용 가능
				// final Context thisContext = this.getApplicationContext();
				// Toast.makeText(thisContext, "test",Toast.LENGTH_LONG).show();
			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.hello_android, menu);
		return true;
	}

}

문제점

 

 

화면이 회전되어서 다시 회전하려 할 때

 

해결방안

ctrl + F11 수직

ctrl + F12 수평

res/layout/activity.xml

<RelativeLayout
    android:id="@+id/btn_layout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true" >

    <RadioGroup
        android:id="@+id/radioGroup"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal" >

        <RadioButton
            android:id="@+id/bt1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="a" />

        <RadioButton
            android:id="@+id/bt2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="b" />

        <RadioButton
            android:id="@+id/bt3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="c" />

        <RadioButton
            android:id="@+id/bt4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="d" />
    </RadioGroup>
</RelativeLayout>


참고사이트

res - layout 에 custom_title.xml 생성

(아래 예제에서는 버튼을 따로 만든 이미지버튼을 사용하였다.)

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:background="#505050" >

    <TextView
        android:id="@+id/titleTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="@string/msg"
        android:textColor="#ffffff"
        android:textSize="14sp" />

    <ImageButton
        android:id="@+id/btnMap"
        android:layout_width="80px"
        android:layout_height="80px"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginRight="5dp"
        android:adjustViewBounds="true"
        android:background="@drawable/button_map"
        android:padding="0sp"
        android:scaleType="centerCrop" />

</RelativeLayout>

res - values - style.xml 에 추가

<style name="CustomTitle" parent="android:Theme">
    <item name="android:windowTitleSize">48dp</item>
    <item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
</style>

<style name="CustomWindowTitleBackground">
    <item name="android:background">#00000000</item>
</style>

AndroidManifest.xml 수정

작성한 CustomTitle을 적용한다.

<activity
    android:name="com.Test.MainActivity"
    android:theme="@style/CustomTitle">
...

Activity.java 수정

작성한 CustomTitle을 적용한다.

protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	// requestWindowFeature(Window.FEATURE_NO_TITLE);
		
	// custom title bar
	requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
	setContentView(R.layout.activity_main);
	getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title);

API 이동

public final class PowerManager

java.lang.Object
-> android.os.PowerManager

Class Overview

이 클래스는 장치의 전원 상태를 제어할 수 있게 한다.


장치의 배터리 생명은 이 API를 사용함에 따라 상당한 영향을 받을 것이다. 정말로 필요하지 않는 한 acquire, PowerManager.WakeLock는 사용하지 말고, 가능한 가장 낮은 레벨을 사용하고 그리고 가능한 한 빨리 release하라.


너는 Context.getSystemService()를 호출함으로써 이 클래스의 인스턴스를 얻을수 있다. 


주된 API는 newWakeLock()이다. 그것은 PowerManager.WakeLock 객체를 만들어 준다. 너는 wake lock 객체를 이용해서 장치의 전원상태를 제어하는 메소드들 사용할 수 있다.


예)

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();


The following wake lock levels are defined, with varying effects on system power. 

그 다음으로 wake lock 레벨들은 시스템 전원에 변화하는 효과와 함께 정의된다. 이 레벨들은 상호 배타적이다. - 너는 오직 그것들 중 하나만 명시할지도 모른다.

Flag Value CPU Screen Keyboard
PARTIAL_WAKE_LOCK On* Off Off
SCREEN_DIM_WAKE_LOCK On Dim Off
SCREEN_BRIGHT_WAKE_LOCK On Bright Off
FULL_WAKE_LOCK On Bright Bright

*If you hold a partial wake lock, the CPU will continue to run, regardless of any display timeouts or the state of the screen and even after the user presses the power button. In all other wake locks, the CPU will run, but the user can still put the device to sleep using the power button.


덧붙혀, 너는 오직 화면의 행동에 영향을 주는 두개의 플래그를 추가할 수 있다. 그 플래그들은 PARTIAL_WAKE_LOCK와 같이 사용할때 효과를 얻지 못한다.

Flag Value Description
ACQUIRE_CAUSES_WAKEUP Normal wake locks don't actually turn on the illumination. Instead, they cause the illumination to remain on once it turns on (e.g. from user activity). This flag will force the screen and/or keyboard to turn on immediately, when the WakeLock is acquired. A typical use would be for notifications which are important for the user to see immediately.
ON_AFTER_RELEASE If this flag is set, the user activity timer will be reset when the WakeLock is released, causing the illumination to remain on a bit longer. This can be used to reduce flicker if you are cycling between wake lock conditions.

Any application using a WakeLock must request the android.permission.WAKE_LOCK permission in an <uses-permission> element of the application's manifest.


Summary

Nested Classes
class PowerManager.WakeLock A wake lock is a mechanism to indicate that your application needs to have the device stay on. 
Constants
int ACQUIRE_CAUSES_WAKEUP Wake lock flag: Turn the screen on when the wake lock is acquired.
int FULL_WAKE_LOCK This constant was deprecated in API level 17. Most applications should use FLAG_KEEP_SCREEN_ON instead of this type of wake lock, as it will be correctly managed by the platform as the user moves between applications and doesn't require a special permission.
int ON_AFTER_RELEASE Wake lock flag: When this wake lock is released, poke the user activity timer so the screen stays on for a little longer.
int PARTIAL_WAKE_LOCK Wake lock level: Ensures that the CPU is running; the screen and keyboard backlight will be allowed to go off.
int SCREEN_BRIGHT_WAKE_LOCK This constant was deprecated in API level 13. Most applications should use FLAG_KEEP_SCREEN_ON instead of this type of wake lock, as it will be correctly managed by the platform as the user moves between applications and doesn't require a special permission.
int SCREEN_DIM_WAKE_LOCK This constant was deprecated in API level 17. Most applications should use FLAG_KEEP_SCREEN_ON instead of this type of wake lock, as it will be correctly managed by the platform as the user moves between applications and doesn't require a special permission.
Public Methods
void goToSleep(long time)
Forces the device to go to sleep.
boolean isScreenOn()
Returns whether the screen is currently on. 화면이 현재 켜있는지 반환한다. 
PowerManager.WakeLock newWakeLock(int levelAndFlags, String tag)
Creates a new wake lock with the specified level and flags. 생성한다. 새로운 wake lock
void reboot(String reason)
장치를 재부팅한다.
void userActivity(long when, boolean noChangeLights)
Notifies the power manager that user activity happened.
void wakeUp(long time)
Forces the device to wake up from sleep.


Constants






http://aroundck.tistory.com/48



by the use of... -숙어- ...의 상용(일상적으로 씀)에 따라.

significantly -부사- (영향을 주거나 두드러징 정도로) 상당히[크게]

affected -형용사- 영향을 받은

unless -접속사- ......하지 않는 한

be sure to do something -숙어- (명령문으로 쓰여) 꼭[반드시] ~을 해라

as soon as -- ...하자마자

as soon as possible -숙어- 되도록 빨리

affect one's behavior -숙어- ~의 행동에 영향을 주다.

have no effect -숙어- 효과를 얻지 못하다


참고 : http://memesong.blogspot.kr/2012/09/blog-post.html


import java.text.SimpleDateFormat;
import java.util.Date;

// 시스템으로부터 현재시간(ms) 가져오기
long now = System.currentTimeMillis();
// Data 객체에 시간을 저장한다.
Date date = new Date(now);
// 각자 사용할 포맷을 정하고 문자열로 만든다.
SimpleDateFormat sdfNow = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String strNow = sdfNow.format(date);

// 1. 위 코드를 2줄로 줄였다.
SimpleDateFormat sdfNow = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
time = sdfNow.format(new Date(System.currentTimeMillis()));
					
// 2. 위 코드를 1줄로 줄였다. 하지만 위에 코드를 이해하지 못한 상태라면 가독성이 떨어질 수 있다.
time = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date(System.currentTimeMillis()));


다른 방법

Calendar calendar = Calendar.getInstance();

// long으로 가져올 때
long now = calendar.getTimeInMillis();
// 문자열로 가져올 때
String str = calendar.getTime().toString();

calendar.getTime().toString(); 일 때 출력 형식



res - values - strings.xml 에서 굵게하고 싶은 글자에 <b> 태그를 넣는다.

<string name="msg">
    <b>GPS 사용 시 실내에선 정확하지 않을 수도 있습니다.</b>   
</string>


+ Recent posts