我知道我可以在我的 View 中应用这些属性 filterTouchesWhenObscured 方法 onFilterTouchEventForSecurity 但我想在我的每个可点击 View 上应用,所以我该如何应用它..?
最佳答案
我今天需要修复 Tapjacking 场景。 对我的应用有用的是:
从 RN 中弹出应用程序并将其添加到 MainActivity.java:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// get the root view and activate touch filtering to prevent tap jacking
View v = findViewById(android.R.id.content);
v.setFilterTouchesWhenObscured(true);
}
关于android - 如何解决 React Native 应用中的 TapJacking 漏洞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51818363/