我有一个集成了callkit的Voip应用程序。它在iOS 10中运行良好,现在我似乎在使用原生临时(iOS最新版本)进行调用时遇到iOS 11问题。
public class IndianTeamFullScreenActivity extends AppCompatActivity
{
Button setWallpaper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_indian_team_full_screen);
setWallpaper = (Button) findViewById(R.id.Set_Wallpaper);
Intent i = getIntent();
final int position = i.getExtras().getInt("id");
final IndianCricketTeamAdapter imageAdapter = new IndianCricketTeamAdapter(this);
ImageView imageView = (ImageView) findViewById(R.id.full_image_view);
imageView.setImageResource(imageAdapter.mThumbIds[position]);
setWallpaper.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
setWallpaper.setTextColor(getResources().getColorStateList(R.color.colorstatelist));
Bitmap bm = BitmapFactory.decodeStream(getResources().openRawResource(imageAdapter.mThumbIds[position]));
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int height = dm.heightPixels;
int width = dm.widthPixels;
WallpaperManager wallpaperManager = WallpaperManager.getInstance(getApplicationContext());
try {
wallpaperManager.setBitmap(bm);
wallpaperManager.suggestDesiredDimensions(height, width);
} catch (IOException e) {
e.printStackTrace();
}
Toast.makeText(IndianTeamFullScreenActivity.this, "Set Succesfully", Toast.LENGTH_SHORT).show();
}
});
}
}
这两种方法都没有被调用,因此我无法处理NSUserActivity INStartAudioCallIntent。我错过了iOS 11中明显改变的东西吗?
提前致谢。
答案 0 :(得分:8)
验证 remoteHandle和supportedHandleTypes ,两者都应符合您的要求。
If $A$1 > 3 Then
I1
Else
If B3 > B2 Then
1
Else
$B$1
End If
End If
callUpdate.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:[NSString stringWithFormat:@"%@", phoneno]];
如果句柄不匹配,您就无法处理NSUserActivity。