As the stable release of react native is bumped to 0.73, it brings a lot of changes, most notable of them being new AGP and Java versions (Source) This can cause an issue if your older projects use JDK 11 and the one instantiated with 0.73 uses JDK 17 So to use multiple JDKs at
Category Archives: Android
The exact default location of ADB installation is: You can it to your environment variables for easy access in command line prompt. It could be different if you have changed your directories for tool installation. More at: Android Debug Bridge (adb) | Android Studio | Android Developers Cheers and Peace out!!!
If you need the almost complete network information then please refer to the code on below link: https://github.com/firebase/firebase-android-sdk/blob/master/transport/transport-backend-cct/src/main/java/com/google/android/datatransport/cct/CctTransportBackend.java The code at link is being used by a google project, so you can trust that it is one of the best ways to determine network information. The code is almost fully cooked, now you just need
To detect if developer options are enabled or not in an android device we could the following code:
If you need to get the time in milliseconds in android then you can use the following code snippet: Now above code snipped will give you time since the system has been rebooted in milliseconds. In some case it would be sufficient to find how may milliseconds has been taken by any operation. Now there
I had to download a file and didn’t want it to be saved (I will tell the purpose in later article). I wanted that whatever the contents that I receive are discarded. Initially Axios was being used for the same thing. But it is better for AJAX requests because they are lightweight and not much
You why you would need that. I used it to detect if screen mirroring is on or not. If length of displays is greater than 1 then screen mirroring is on else not. It’s not hundred percent upto the mark. May be we can use the MediaRouter API too. I haven’t gone through that much
Below the sample code to add the mediaRouter listeners to the mediaRouter: Cheers and Peace out!!!
If you want to add PAD to your react native app, then it is the right place. It is the demonstration for the install-time asset delivery and not ‘on demand’ one. First read article: Android Developers Blog: Introducing Google Play Asset Delivery (googleblog.com) Next thing do all the settings as described in: Integrate asset delivery
In react native if you want to list all the assets (base directory files and folder), use the following in the onCreate method of MainApplication.java