android

How can I use an external jar in an Android project in NetBeans?

I need to create an Android library which I can include as a jar in any Android application. I use NetBeans 6.8, the nbandroid plugin, and the Android SDK. The steps I took so far are: 1) Create the library project, with android.jar included to have access to Android classes (the library uses android.util.Log and other Android classes)...

how to play the 30 seconds sample itunes music

I'm trying to figure out if its possible for programmers to build an itunes client app for iphone or android where the user has the option to browse and listen to the song preview, something similar to this page: itunes link maker I greatly appreciate any pointers or links in this direction thanks ...

How to Consume Web service in Android?

dear friends, i am new to Android development i have a web service made in php now i want to consume it in android can any one guide me how to achieve this..??? i have tried many code samples on net but failed to achieve this goal. i am using Eclipse with ADT. any help would be appriciated. ...

Why not standard Android emulators?

I'm new to Android, but have published iphone and bberry apps. I see that I have to create an emulator using the SDK, before I can write and test an app. Why are there no default emulators? Why not at least a Nexus one, or HTC hero emulator shipped with the product? Sure its supposed to be flexible, but why not make it easy to create...

How to open an Intent (MapView) from the Main activity with menu in Android

Hi Since I'm a newbie I don't know if I'll be explaning this correctly. But here goes it. I'm trying from main Activity (MainFile.java) to open a Map as a new intent through a menu. Something like this... switch(item.getItemId()) { case VIEW_AROUND: **Intent cityMap = new Intent(MainFile.this, Map.class); ...

Android: Wakelock & handling orientation change

I'm using Wakelock in my application to prevent the phone from sleeping when the app is visible. The problem comes when there is an orientation change and the system destroys and re-creates the app in landscape mode. If the wakelock timer has expired in the background the system takes the release of wakelock as an opportunity to switch ...

OpenGL ES - huge map, best practice

If I want to render just a huge map, what is the best practice when using OpenGL ES with a mobile device (Android or iPhone based)? What is the best structure to contain all the vertices, normales and texture coordinates? I guess using a interleaved structure may give you some performance benefits caused by memory caching. Ok? Should ...

Using VideoView for streaming or progressive-download video

I'm confused about how VideoView can be used to play video: from a local file, as progressive download and streaming. This example work for me (on 1.5 and 2.0 at least) by downloading the file and playing it locally. But is it necessary to download the video before playing: is it possible to play video as progressive download, or by s...

Retaining android app state using alwaysRetainTaskState and lauchMode

In my Android app, I have a main activity that serves as an entry point to my application, which is configured in my manifest file like this : <activity android:name=".Main" android:label="@string/app_name" android:screenOrientation="portrait" android:alwaysRetainTaskState="true" ...

Creating Buttons Dynamically, Could I select one and deselect the other buttons?

I'm creating buttons dynamically ... for(int i=0; i<colSize;i++){ final Button btn = new Button(this); btn.setText(SectionName[i]); btn.setTextSize(10); btn.setPadding(8, 3,8, 3); btn.setTextColor(Color.WHITE); btn.setTypeface(Typeface.SERIF, Typeface.BOLD); btn.setOnClickListener(new OnClic...

who in mobile phone market allow me to upload my customly compiled linux kernel to my phone.

i want to add some features to linux kernel to run on my mobile (android based mobile perhaps). but i don't know who let me to upload my custom kernel. i want to buy such mobile phone. some restrictions about uploading custom kernel to phone: 1- replace existing kernel. 2- can use my phones functionalities: it is due to some driver...

android:id what is the plus sign for

The document says "@[+]id/myid" as the definition for android:id, from the notation it indicates that the plus is optional. But nowhere can I find a definition of what the plus sign means or not supplying it would mean. What does it mean and why is it there? ...

How to use Android's CacheManager?

I'm currently developing an Android application that fetches images using http requests. It would be quite swell if I could cache those images in order to improve to performance and bandwidth use. I came across the CacheManager class in the Android reference, but I don't really know how to use it, or what it really does. I already scop...

Why doesn't HttpClient work but HttpUrlConnenction do when posting data to form.

Hello experts! I'm building an android app which should perform a GET on my site to get two cookies and then perform a post to the same site with these cookies. As mentioned I start of with the GET and I'm using org.apache.http.client.HttpClient to perform this operation. String requiredCookies = ""; HttpContext localContext = null;...

Setting an Android Notification Icon to a remote URL

Hi folks. I'm try to use a remote URL (like a favicon) for a Notification Icon, however the Constructor for a Notification only accepts a resource id (which is an int), as opposed to something sensical like a FileInputStream. How can I either, define at runtime a new resource id for a stream source, or download an icon to my resources ...

Simple Splash Screen

I am trying to follow a simple splash screen example I found. But I cannot get it to even compile. First this is the source of the example: http://www.anddev.org/simple_splash_screen-t811.html I am trying to put in into a form that would work for my program. I created a class in Eclipse for this splash screen com.ePN.ePNMobileAndro...

Android: internet access connection

Hi, i'm retreiving data from an internet service. Is there a way to control which (data) connection the device uses for connecting to a website?(access via wifi or via the cellular network) thx ...

Communicating between Android and PC (C#)

Hi, I want to create an application in Android which communicates with a server application (written in C#, doesn't matter what version of .NET) on the PC via TCP/IP. What would be the best approace here? I was thinking about some kind of RPC like SOAP or XML-RPC. But I want to keep the server application as light and simple as possi...

How do I launch a URL from my application on Android?

How can I code my Android application to start the web browser to display a given URL? (I'd rather not embed a web browser component into my app, but rather want to start the Android web browser to show the URL.) Thanks! ...

getLayoutParams returning null?

I've created a class that extends a View: public class BoardView extends View { and I've specified the width and height of the BoardView in the application's main.xml file: <mypackage.BoardView android:id="@+id/board" android:layout_width="270px" android:layout_height="270px" /> I'm trying to g...