Skip to content

Tag: android

Loading a native library in an Android JUnit test

I’ve generated a native library using ndk-build which I’m able to load and use with in my Android application. However, I want to write some tests against this part of my app. When calling the native function in my tests, I recieve this exception message: …where process is my native library …

Microsoft ISA Server Authentication in Android

I have an application in Android, in which I were reading files from the remote server, code for reading file is given below; Now all the remote files are behind proxy (Microsoft ISA Server) which required authentication to access the files. Please guide me how I can pass authentication parameters from androi…

Switch listener in ListView giving wrong results

Here is my Array adapter. It assigns each switch button in the list with a listener that is dependant on the id given by the database (passed using devices.id). But for some reason, the switch listener is getting the correct states from the switches. For debugging purpose, I’m just using the same on cha…

ApplicationInfo metadata returning null

I have the following code: In the manifest: In the code: But the result is ai.metaData==null. Why is this happening Answer From the latest android doc, <meta-data> can be only contained in <activity>/<activity-alias>/<service>/ <receiver>. So you should append meta-data in these …

How to check if Handler has an active task?

If I have a Handler handler = new Handler() and run a delayed task for it handler.postDelayed(xxx, xxx), is that possible to check has the postDelayed() was called or not? Answer is that possible to check has the postDelayed() was called or not? One quick fix, in method assign some boolean variable to true an…

how to handle spaces in url android

i have an error while i tried to run some spaces in url android, this is the code : as you see.. i have the command for take login validation in strUrlLoginFullpath = strUrlMain+”exl?u=”+strUser+”&p=”+strPass+”&t=1″; but there’s condition that strUser sometime…