AddOrientationListener not working for in android
AmmiWang opened this issue · 3 comments
AmmiWang commented
AddOrientationListener not working for in android
AmmiWang commented
I believe my configuration is all right. But it's no working!
assaqqaf commented
Could you share the error message?
bodaghialib4 commented
I had the same problem in android with react native 0.60.4
After adding below codes in MainActivity.java, it worked fine. (implementing onConfigurationChanged):
import android.content.Intent; // <--- import
import android.content.res.Configuration; // <--- import
public class MainActivity extends ReactActivity {
......
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
......
}
hope this help you. :)