0
BUMP API를 내 앱에 통합하려고합니다. 그들의 사이트에있는 동일한 문서는 충분하지 않습니다. 이라는 샘플을 Github에 제공된 BumpTest에 다운로드하고 API 키를 받았습니다. 나는 GPS가 켜져있는 동일한 WIFI 인 내 전화기와 에뮬레이터 사이의 충돌을 시뮬레이트하려고하고있다. 하지만 내 logcat에 어떤 일치/충돌 볼 수 없어요. 도와주세요 !!Bump API 및 테스트를 사용하기위한 단계별 튜토리얼
private final ServiceConnection connection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName className, IBinder binder) {
Log.i("BumpTest", "onServiceConnected");
api = IBumpAPI.Stub.asInterface(binder);
try {
api.configure("MY KEY",
"Bump User");
} catch (RemoteException e) {
Log.w("BumpTest", e);
}
bump.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
api.simulateBump();
sendBroadcast(new Intent(BumpAPIIntents.BUMPED));
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
Log.d("Bump Test", "Service connected");
}
@Override
public void onServiceDisconnected(ComponentName className) {
Log.d("Bump Test", "Service disconnected");
}
};
private final BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
try {
if (action.equals(BumpAPIIntents.DATA_RECEIVED)) {
Log.i("Bump Test", "Received data from: " + api.userIDForChannelID(intent.getLongExtra("channelID", 0)));
Log.i("Bump Test", "Data: " + new String(intent.getByteArrayExtra("data")));
} else if (action.equals(BumpAPIIntents.MATCHED)) {
long channelID = intent.getLongExtra("proposedChannelID", 0);
Log.i("Bump Test", "Matched with: " + api.userIDForChannelID(channelID));
api.confirm(channelID, true);
Log.i("Bump Test", "Confirm sent");
} else if (action.equals(BumpAPIIntents.CHANNEL_CONFIRMED)) {
long channelID = intent.getLongExtra("channelID", 0);
Log.i("Bump Test", "Channel confirmed with " + api.userIDForChannelID(channelID));
api.send(channelID, "Hello, world!".getBytes());
} else if (action.equals(BumpAPIIntents.NOT_MATCHED)) {
Log.i("Bump Test", "Not matched.");
} else if (action.equals(BumpAPIIntents.CONNECTED)) {
Log.i("Bump Test", "Connected to Bump...");
api.enableBumping();
}
} catch (RemoteException e) {}
}
};
이 문제를 해결할 수있는 방법을 알려주시겠습니까? 또한 github에서 데모를 얻었고 최신 API 키를 가져 왔지만 기기에서 실행되는 동안 로그를 볼 수 없습니다. 그게 무슨 뜻인지 말해주세요. . – Google
당신이 해준 데모를 나에게 줄 수 있겠 어. API 키를 바꿔서 내 옆에서 테스트 해. 제발. – Google
"내 키", "범프 사용자"를 입력하십시오. – Android