android

Is it possible for an Android App to Auto-Install and Run an Update?

I have an application installed on phones sitting in locked boxes in different states. It runs 24/7 and has little to no user interaction. I know how to push updates to the marketplace...can I have a thread running in my application that sees an app update, installs the apk, and opens the new apk, replacing the currently running versio...

OpenGL when turning Android Phone

What is it called ( what term should i google) when flipping/tilting the phone, so that the view rotates when running android? My (OpenGL) application crashes when I do this, are there some certain steps you should do when handling OpenGL when this occures? Is there something else I might want to think about? ...

How to pass AttributeSet to custom View

How do I pass the current AttributeSet to a custom View class? If I use a constructor that only has Context in the arguments, I lose all themes and the ability to use "style" tags in the xml for that custom View. What I've done is create an activity that contains my custom view already in the xml file, and then programmatically create ...

Android, running an app in the background.

I have an app which consists of a simple GUI and a few Broadcast receivers. I found somewhere on here how to start an app on boot of the device but cant seem to locate it atm. However i need more i need it to start in the background and just listen using the broadcast receivers and then return to this state after the Gui(the visible part...

Help reading ANR stack traces in Android.

I have been battling an ANR happening in one of my services for a while now. It is very hard to reproduce and the UI seems to have full functionality right before it happens 100% of the time there is never any noticeable lag or freezing. My service has a TimerTask and a few AsyncTask's that it runs and that is it. The stack traces ...

How to reference an external jar in an Android Library project in Eclipse

Oh Android. How I love your verbiage. I have a workspace with a few projects in it. App1 and App2 are Android applications. Common is an Android library project. App1 and App2 depend upon Common (linked via the Android tab). Common has some external dependencies, namely httpmime & apache-mime4j, which exist as jar files. For some rea...

dividers between TabWidgets

Hi, Is the android:divider attribute under the TabWidget working? I tried the Tab Layout tutorial from android just to test (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) and set the android:divider to some image (for now I used the android vertical scrollbar as the drawable to really emphasize if its get...

Eclipse android error

Hi, Everytime I start the emulator from eclipse, I get the following error in my console. [2010-09-13 17:04:51 - DeviceMonitor]Sending jdwp tracking request failed! [2010-09-13 17:18:49 - DeviceMonitor]Sending jdwp tracking request failed! The application works fine, but I am concerned as to why I see this error. Please help ...

openGL fading background

I'm trying to create a particular effect where I have a bunch of particles on the screen which leave trails that slowly fade. I was hoping that I could simply use glClear with a small alpha value to do this but that doesn't seem to be working. My second idea was to draw a black face on the front of the screen but this doesn't seem to be...

Generic Java mobile development

I'm working in a Java-oriented shop and we're starting to adapt our products to mobile devices now (mainly focusing on smart phones). A separate native app is already in the works for the iPhone, but we would like to make a generic Java/J2ME version for any other devices. My question is, how feasible is this? And where is the divergence...

Using TabWidget.setDividerDrawable()?

Hi, Has anyone had any success with TabWidget.setDivider()? I'm not sure it does what I'm assuming: gives you a chance to supply a drawable to be drawn between each tab instance?: mTabHost.getTabWidget().setDividerDrawable( R.drawable.dividerDrawable); this does not appear to do anything. Looking at the tab drawable resources in ...

how to implement tab layout using only one activity??

official android dev website says that:「You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity,.....」 http://developer.android.com/resources/tutorials/views/hello-tabwidget.html i just wanna use tabs to swap views, no more than one activity. could someone teach me how to do that?? is...

Admob ads will not display when placed inside a tabview

I've been trying to get my ads to display in this type of layout. Tabs -> LinearLayout -> ListView -> header. The header is set via addHeaderView and is displaying normally. If I were to move the ads anywhere else they display normally (so its not a setup issue). Using ads in the header of a listview works fine in my other projects. So ...

Getting Package string from Android manifest

Hi All This should be simple but I can't find any info on this... I simply want to read the package value in the android manifest... <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="THIS" the reason is simple I have to call context.getResources().getIdentifier(...) and I need the package. since this c...

vcard manager in android

Hi I want to make VCard manager in android for 1.5 and above . This application will be able to perform following functions: 1 Send and receive contact . I want that when i send a contact to any mobile it should get the save option to save the contact and if some send me a business card then i should be able to save it in my contacts. ...

Android: How to place an animated image inside an EditText that we can show and hide.

Hello, I am trying to add an animated spinner inside a EditText view to the right. And programmatically show/hide it. I have created the animated spinner by introducing a linear interpolation rotation: *res/anim/rotate_forever.xml* <?xml version="1.0" encoding="UTF-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/an...

Sorting my ArrayAdapter doesn't change my data source

I am having a weird issue. I have an ArrayAdapter which I am sorting. This displays properly on my screen, however when I check the actual data source, the contents have not been sorted. How can I ensure that sorting my ListAdapter will also sort my data source? Collections.sort(quotes, new PercentChangeComparator()); //sort my data sou...

Android : how to set context to a view in layout xml ?

I am using WebView in an ActivityGroup and it will throw an exception if WebView show Dialog and complain the activity is not valid. But it's okay if I set the context of the WebView to the TOP activity. So I wish to know how to set the context in the layout xml ? ...

How to write message to client from server

for example,in a website or software on the pc,you could write some news or other things,and then it will update in your android is there any example of this,or tutorial related about it thank you in advance ...

Show PDF in Android

In my onCreate() I do this check: // // check if we have a PDF viewer, else bad things happen // Intent intent = new Intent(Intent.ACTION_VIEW); intent.setType("application/pdf"); List<ResolveInfo> intents = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); if (intents == null || intents.size() == 0...