Category: Knowledge Center

Android ImageView not displaying image in few phones only

Issue: Android ImageView was not displaying image on Redmi Note Prime, when tested. But the same code when used in Redmi 4A shows image.  Image which was being used Solutions tried: Setting Image using XMLUsed:  android:src Setting image using Java codeUsed:  ImageView img;img = (ImageView) findViewById(R.id.startscreen);img.setImageResource(R.drawable.startimage); Setting background to different colourUsed: android:background Changing the background […]

Android Code : Ping a domain/IP & Latency Calculation

The following code may be used to ping the IP / Domain addresses and to obtain latency Tested in Android 4.4.2, 6.0Mobile handsets: Lenovo A6000, Redmi Note 4AWorking application: PUBG Network Quality CheckMinimum API Tested: 19 Explanation:The code fetches the current time in milliseconds to a variable. The ping function is then called, with the […]