I try comment this line :
mDevOptionsDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
Dev menu can show .
harebu
Same issue on a RedMi 2 with Android 4.4.4. However, harebu's solution doesn't work in my case.
Just found that it was not a react-native issue. App needs to be granted with pop-up window privilege in MIUI. This issue may be closed.
OK, closing :)
Thank you.
But,how to grant pop-up window privilege? add ?
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Not work for me..
@jundazhu
fixed.
(android and react-native newb here)
OS: Ubuntu 15.04
node.js: v2.5.0
[email protected]
Phone: Android 4.4.4. Moto X. HW version: p30
I am following the quick start tutorial and running react-native run-android put the app on my phone but I see a red screen tells me 'unable to download JS bundle. Did you forget to start the development server or connect your device'.
Since my phone is 4.4.4, I can't use this command adb reverse tcp:8081 tcp:8081 so I try to 'Configure device to connect to the dev server via Wi-Fi' as described here but my phone doesn't do anything when I shake it.
My understanding from this thread is I need to do the following:
Add 1 line to this file android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
I did it and run react-native run-android again, but got the same results as above.
The first comment here mentioned this mDevOptionsDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); but grepping the code didn't show anything.
I apologize if my question is trivial. I might need a bit more hand holding.
I don't have a Moto X at hand so cannot comment specifically. Two things to
check: 1. Whether the app has popup window privilege, (ROMs such as MIUI
control it in a centralized way, not sure about Moto though); and 2.
Whether there is some way to emulate the menu button on your phone. On
mine, shaking doesn't work but menu key does (Which is emulated by
long-pressing some soft-key).
The code mentioned by buhe is in reactAndroid source, which is linked as an
.aar. You can try to debug from that part if the above two don't work.
oren [email protected]于2015年9月21日 周一13:41写道:
(android and react-native newb here)
OS: Ubuntu 15.04
node.js: v2.5.0
[email protected]
Phone: Android 4.4.4. Moto X. HW version: p30I am following the quick start tutorial and running react-native
run-android put the app on my phone but I see a red screen tells me
'unable to download JS bundle. Did you forget to start the development
server or connect your device'.Since my phone is 4.4.4, I can't use this command adb reverse tcp:8081
tcp:8081 so I try to 'Configure device to connect to the dev server via
Wi-Fi' as described here but my phone doesn't do anything when I shake it.My understanding from this thread is I need to do the following:
Add 1 line to this file android/app/src/main/AndroidManifest.xml:
I did it and run react-native run-android again, but got the same results
as above.The first comment here mentioned this
mDevOptionsDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
but grepping the code didn't show anything.I apologize if my question is trivial. I might need a bit more hand
holding.—
Reply to this email directly or view it on GitHub
https://github.com/facebook/react-native/issues/2754#issuecomment-141881296
.
thanks. i am going to google (or maybe republic wireless forums) for enabling popup window privileges and also for emulating the menu button. One part the confuses me is you said that the app might be responsible for enabling popup windows. is it this file? android/app/src/main/AndroidManifest.xml
I am a bit confused about the other option (aar). grepping for such file lead me to this folder - ./node_modules/react-native/Examples/SampleApp/android/app/build/intermediates/exploded-aar but i am not sure what to look for.
@oren , by any chance did you get this to work? I'm on mi3 4.4.4 and I still cant get the debug menu up.
@abilashs90 I bought a new phone...
come on
I had the same question. and I found the way to make MIUI can show the pop up window.
You just need to change the settings.
https://www.youtube.com/watch?v=hZfcIT74PS8
Most helpful comment
I had the same question. and I found the way to make MIUI can show the pop up window.
You just need to change the settings.
https://www.youtube.com/watch?v=hZfcIT74PS8