I followed every step mentioned for this lib.
But addOrientationListener is not working at all in ANDORID but works in iOS.
@yamill Please check this.
Any solution?
@andfs That's my mistake, I had not implemented orientation listener methods in Android project. Its working fine.
@sujay-bidchat How did you fix the issue? I am facing the same issue!!! Working fine on iOS but not on android. Can you share some code to clarify. Thanks
don't forget to add this in your MainActivity.java
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
@imranMnts
don't forget to add this in your MainActivity.java
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Intent intent = new Intent("onConfigurationChanged"); intent.putExtra("newConfig", newConfig); this.sendBroadcast(intent); }
That didnt do it for me, returns an error when trying to run the app
@imranMnts
don't forget to add this in your MainActivity.java
@override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Intent intent = new Intent("onConfigurationChanged"); intent.putExtra("newConfig", newConfig); this.sendBroadcast(intent); }
That didnt do it for me, returns an error when trying to run the app
Which error ?
Did you add these lines:
import android.content.Intent;
import android.content.res.Configuration; ?
Most helpful comment
@sujay-bidchat How did you fix the issue? I am facing the same issue!!! Working fine on iOS but not on android. Can you share some code to clarify. Thanks