Android/2012.04월 강좌
9일차 복습
Bohemian life
2012. 5. 8. 09:53
- 구글맵 googleAPI 로 프로젝트 생성 .android/debug.keystore 안의 MD5 : layout.xml <android......MapView> Permission : internet, gooleMap MapActivity를 상속해서 만들어야 함. LocationManager를 호출해서 나의 마지막으로 알려진 위치를 얻을 수 있다. 위도/경도 23.345623457 / 38.3421234 234686542 / 392345123 - Activity , Service(음악재생) Intent intent=new Intent(); intent.setClass(this, 서비스클래스.class); startService(인텐트); // -> onStart() 호출 stopService(인텐트); // -> onDestroy() 호출 서비스클래스 extends Service { onStart(){ } onDestroy(){ } } - 입출력(대상 : File) 입력 : inputStream 얻어서 File.openStrea()/// this.openStream(); while ( (int k =is.read() )!= -1) { 배열.append(k) } 배열 -> String 형변환해서 화면에 출력 출력 : 화면에 출력, 파일에 저장 setText().. print()... FileOutputStream fos... fos.write(배열); fos.flush(); fos.close(); - 파일을 읽어오기 File file=new File("c:\\abc.txt"); FileInputStream fis=new FileInputStream(file); while( fis.read() ) { }