android

How do I design a custom Android control and use it in Xml?

I understand how to create a custom Android control, and I believe I understand how to pull attributes for it from the Xml layout. I don't know, however, how to get any children elements from it. Here's a visual example of what I'm trying to accomplish: public class Menu extends LinearLayout { // Custom Code } public class MenuIte...

How to get around the performance issues with Buffer.put() and Android OpenGL

It is a Java issue in general, though in this particular case I am using Vertex Arrays in Android for OpenGL. To use this basic GL system, you must use Java's Buffer system in native allocation mode. This is very slow on Java. And roughly 40-50% of my entire application's time is spent inside of buffer.put(). Is there any way to speed t...

Android Message Sending

Is there any source code to send same messages to multiple recipients. Here I need to send some message to multiple recipients. I should be able to select phone numbers and send that message. Can any one please add any sample code with a apt user interface... ...

Capturing the tab click event in Android Tabview

I have a tabview in my android app with 3 tabs. The tabs are all working fine. Now I want to perform some additional logic when the tab (on the top) of the currently active tab is clicked. Here is an example: In one of my tabs, I provide an option for the user to sort things in different order. When the press the tab of the currently...

Whats are the ten most deadly permissions?

I would like to know what would be the top ten most deadly permissions that can be requested by an android. I know it might be a matter of opinion, but supposing that I had the 10 permission listed in by an application, I would definitely know my application did not generate a whole lot of confidence among users. What would be the permis...

push notification in Android 1.6

I want to know that is it possible to implement the push notification in Android 1.6. If it possible then how can I solve this? ...

How can I get a missing cookie with android ? In Firefox yes appear

I can get a cookie with firefox, but not with android. This is the code: HttpParams httpparams = new BasicHttpParams(); httpparams.setParameter(ClientPNames.COOKIE_POLICY,CookiePolicy.BROWSER_COMPATIBILITY); HttpGet httpget = new HttpGet(sURL); httpget.setParams(httpparams); httpget.setHeader("User-Agent","Mo...

How to use ADB to send touch events to device using sendevent command?

Hi I am trying to send touch events to a device using AndroidDebugBridge, so that I can do some basic automation for UI tests. I have followed the discussion in LINK. I am able to use sendevent to simulate touch on emulators, but unable to do the same on a device. Like in above link the emulator seems to send out 6 events for each tou...

How to get the connection strength of Wifi access points?

I am building an application reading the signal strength of each available Wifi access point. I've written code like: wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); // Get WiFi status WifiInfo info = wifi.getConnectionInfo(); textStatus.append("\n\nWiFi Status: " + info.toString()); // List availabl...

leaked IntentReceiver android.widget.ZoomButtonsController?

I want my application to display a ZoomButtonsController on a GLSurfaceView whenever the user touches the GLSurfaceView. My activity constructor looks like this: _zoomButtonsController = new ZoomButtonsController(_surface); _zoomButtonsController.setAutoDismissed(true); _zoomButtonsController.setOnZoomListener(_zoomListener)...

How to render text in C (android)?

Hi experts, I am developing a program drawing text on screen using android NDK in C native code. Could you please tell me how do I render the text? Thank you. Best regards Michael ...

Where to find the Contact View in Android?

I notice that some of the base applications in Android are using this little control (View in Android terms I guess) that shows the contact picture. When you click on the picture it shows all the ways of contacting the person (phone, sms, talk, facebook). I see this little View used in the contact app, sms app, twitter for android, faceb...

Adding new Custom Field of specific MIME type in Contacts App

Hi Pentium10 .. Thanx for snippet you provided it helped me a lot. I have successed regarding storing of Custom field in Contact database, i also viewed my data through LogCat by printing it using "Cursor". Thanx for your snippet it helped me a lot. Can we view our Custom field from Main Contacts Application? ...

Transparent toast frame

How to set transparent toast frame in android ? I want to it more transparent. ...

Unknown space to the right of the grid view

My xml code is: <GridView android:id="@+id/gridView_calendar" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:numColumns="5"/> But there appear to the right of the gridView a blank. Its size seems for scroll bar. I don't know how it comes. Can anybody help me? Thanks...

Android map overlay icon with relative/fixed position to the screen

I am trying to have a drawable (basically an icon/button) that sits on the mapview with a fixed position at the corner of the map. Similar to the zoom controller, and unlike a typical marker, it shouldn't move when I pan the map. When I click on the icon it should bring up an activity. I am currently implementing it as an OverlayItem...

Password protect launch of android application

I'm searching for a way to password protect my android application on launch, i.e. when launching/resuming an activity belonging to my apk-package a password dialog will be shown. I've tried some approaches to this (extending application class and so on) but none seems to work. Either they don't run on the UI thread or the dialog isn't ...

Change title bar text in Android

How do I change the text of the title bar? as of now it just displays the title of the program and im wanting it to display something of my choosing and be different for each page/activity in my app i.e. my home page could say page1 in the title bar while another activity that the app switches to could have page2 in that page's title bar...

How to avoid setting inline onClickListner in getView()

I was asked to refactor the getView() code presented below. I have got ListView with custom Adapter. Every row contains clickable buttons and texts. At the moment onClickListeners are set in the body of getView(), this is quite insane idea, because this method is called very frequently. Inside of every onClick function I need access to...

Widget onUpdate, onReceive

I initialize some arrays in an onUpdate() method and after that, using an intent and a button, I try to call onReceive() function which runs fine but cannot access arrays set in onUpdate() method. Why is that? Those array's are object variables and are declared public. Am I missing something? package net.aerosoftware.widgettest; import...