klauski.egloos.com

klauski's (*.lib)

포토로그 마이가든



Use Android bluetooth Android

안드로이드는 개발자가 어플리케이션의 권한을 설정하기 때문에 디바이스 사용 권한을 개발시 설정해줘야 한다.
물론 제한된 유저의 권한으로 가능한 권한만 설정가능하다. AVD에서는 블루투스를 사용하지 못하기 때문에 삽질 하지 않길 바란다.

In this release, the limitations of the emulator include:

  • No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
  • No support for USB connections
  • No support for camera/video capture (input).
  • No support for device-attached headphones
  • No support for determining connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insert/eject
  • No support for Bluetooth

다음 코드를 추가.
//AndroidManifest.xml
<manifest ... >
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission adnroid:name="android.permission.BLUETOOTH" />
...
</manifest >


# English
A developer should setup permissions of application. Of course, a setting is possible up to the limited user's permission.
In an AVD, It is impossible to use a bluetooth like that:

In this release, the limitations of the emulator include:

  • No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
  • No support for USB connections
  • No support for camera/video capture (input).
  • No support for device-attached headphones
  • No support for determining connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insert/eject
  • No support for Bluetooth

Add next code.
//AndroidManifest.xml
<manifest ... >
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission adnroid:name="android.permission.BLUETOOTH" />
...
</manifest >


Android DEBUG Mode setup in AndroidManifest.xml Android

Android 에서 디버깅 모드를 사용하기 위해서는 해당 프로젝트의 Manifest 파일에서 설정해줘야한다.

//AndroidManifest.xml
<manifest ... >
<application android:debuggable="true" >
...
</application>
</manifest>

# English
For using DEBUGGING MODE in Android, you need add one code line on the project's Manifest file.

//AndroidManifest.xml
<manifest ... >
<application android:debuggable="true" >
...
</application>
</manifest>

WCF 코딩 중에 본 에러 WCF/C# .NET

WCF를 제대로 이해하지 않고 프로그래밍을 하다보면 종종 명확한 이유가 있지만(구글에..) 왜 일어났는지 이해하지 못하는 에러가 발생한다.

영어로는
"Could not find endpoint element with name '{0}' and contract '{1}' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element." 

한글로는
"이름이 '{0}'이고 계약이 '{1}'인 끝점 요소가 ServiceModel 클라이언트 구성 섹션에 없습니다. 응용 프로그램에 대한 구성 파일이 없거나, 이 이름과 일치하는 끝점 요소가 클라이언트 요소에 없기 때문입니다."

이런 에러이다. Stack Overflow에 왜 이런 에러가 발생하는지에 대한 설명이 올라와 있지만 나는 한번에 이해하지 못해 헤맸었다.
내 경우 저기 쓰여진 말 그대로 이 에러는 '끝점에 대한 정보'가 없었기 때문에 발생했다. 나는 여러 서비스이자 클라이언트를 분산환경에 띄어놓고 서로 통신하게 했었는데, svcutil.exe를 통해 생성된 config 파일들(예를들어 서비스 a,b,c에 대해 a.config, b.config, c.config)을 각각 프로젝트에 추가했었던 것이다. 내가 이해하기를 이것도 C# 소스코드 처럼 컴파일 후 어셈블리 안에 포함되어 후에 사용되는 것인줄 알았다. 그 결과 클라이언트 어셈블리가 app.config를 찾지 못했었고 나는 서비스의 이름으로 BasicHttpXXX 를 사용했지만 설정을 찾을 수가 없었던 것이다.
따라서 각 config 파일들을 하나의 app.config로 합친 후 사용했더니 문제는 해결되었다.


1 2 3 4 5 6 7 8 9 10