我需要一些帮助.我想通过Bump将Jpg或PNG图像从一个iPhone转移到另一个iPhone.我遇到了成功和失败,根本没有发送图像.
下面是一个NSObject文件,当用户从UIimagepicker中选择图像时将调用该文件.
接收方不会发送任何数据,只会接收.
请帮我看看代码并给我任何评论或观点.
谢谢,感谢您的帮助.
- (id) init{
if(self = [super init]){
bumpObject = [BumpAPI sharedInstance];
NSError *error;
NSURL *fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"sound_bump_tap" ofType:@"aif"]];
bumpsound = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&error];
[bumpsound prepareToPlay];
}
return self;
}
-(void) configBump
{
[bumpObject configAPIKey:@"My API Key"]; //put your api key here. Get an api key from http://bu.mp
[bumpObject configDelegate:self];
[bumpObject configParentView:self.bumpShare.view];
[bumpObject configActionMessage:@"Bump with your friend to start."];
}
- (void) startBump{
[self configBump];
[bumpObject requestSession];
}
- (void) stopBump{
[bumpObject endSession]; …Run Code Online (Sandbox Code Playgroud) 我SIGPIPE在Xcode项目中遇到错误.自一周前开始显示此错误.如果我评论这个方法调用:[self configureBump];一切正常.我在我的项目中集成了BUMP API.这个API工作到一周之前没有任何问题.我不确定这个错误的原因.有谁可以帮我解决这个错误?我的一些朋友也报告了这个错误.
Xcode版本:4.5 iOS版本:iOS 6.0/iOS 5.0
请参阅下面的堆栈跟踪:
* thread #1: tid = 0x1c03, 0x95a887d2 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGPIPE
frame #0: 0x95a887d2 libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x95a87cb0 libsystem_kernel.dylib`mach_msg + 68
frame #2: 0x029ef13a CoreFoundation`__CFRunLoopServiceMachPort + 186
frame #3: 0x02952580 CoreFoundation`__CFRunLoopRun + 1312
frame #4: 0x02951db4 CoreFoundation`CFRunLoopRunSpecific + 212
frame #5: 0x02951ccb CoreFoundation`CFRunLoopRunInMode + 123
frame #6: 0x03093879 GraphicsServices`GSEventRunModal + 207
frame #7: 0x0309393e GraphicsServices`GSEventRun + 114
frame #8: 0x017a0a9b …Run Code Online (Sandbox Code Playgroud) 我想在我的Android应用程序中添加一个凹凸功能,但由于它现在只获得了妈妈,我无法获得适当的实现模式.有关它的专业知识,请帮助我提出宝贵的建议.谢谢
我找到了一个工作演示并成功使用它.但问题是我用最小版本10实现它,其中StrictPolicy是可导入的.现在我想使用min sdk 1.6或更高版本来使用Bump.
我也看到AsysncTask for BindService可以用,但不适用于我.我正在做什么错
int sdkVersion = android.os.Build.VERSION.SDK_INT;
if(sdkVersion>9)
{
try{
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}catch (Exception e) {
// TODO: handle exception
}
}
IntentFilter filter = new IntentFilter();
filter.addAction(BumpAPIIntents.CHANNEL_CONFIRMED);
filter.addAction(BumpAPIIntents.DATA_RECEIVED);
filter.addAction(BumpAPIIntents.NOT_MATCHED);
filter.addAction(BumpAPIIntents.MATCHED);
filter.addAction(BumpAPIIntents.CONNECTED);
filter.addAction(BumpAPIIntents.DISCONNECTED);
filter.addAction(BumpAPIIntents.BUMPED);
this.registerReceiver(receiver, filter);
//txtReceived=(TextView)findViewById(R.id.txtReceived);
//bindService(new Intent(IBumpAPI.class.getName()), connection, Context.BIND_AUTO_CREATE);
new BindService().execute();
}
class BindService extends AsyncTask<String, Integer, String>{
@Override
protected String doInBackground(String... params) {
// TODO Auto-generated method stub
bindService(new Intent(IBumpAPI.class.getName()), connection, Context.BIND_AUTO_CREATE);
return null;
}
@Override
protected void onPostExecute(String result) …Run Code Online (Sandbox Code Playgroud) 我在android bump API上有问题,当我第一次在我的应用程序上运行时它很好但是当我第二次尝试时我的应用程序自动关闭,当我检查日志它说:
A/libc(12139): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1)
Run Code Online (Sandbox Code Playgroud)
我认为问题是unbindService(连接)onDestroy方法不知何故它没有停止服务所以当你第二次尝试配置它时,它会因为已经配置的服务而得到致命的信号错误.
我正在创建一个音叉应用程序,您可以将 iPhone 轻拍到另一只手的手掌上,或者轻拍到柔软的表面上,以设置音叉的声音。
所以我想检测每个“凹凸”中包含的能量
(编辑:删除了大量的gumpf)
谁能帮我破解这个吗?
我想做一个像Bump这样的应用程序,触摸两个iPhone我可以检测到它们,是否有人知道如何检测iPhone的物理凹凸?
非常感谢!