android

Javascript question--what is "window"?

<html> <script language="javascript"> /* This function is invoked by the activity */ function wave() { alert("1"); document.getElementById("droid").src="android_waving.png"; alert("2"); } </script> <body> <!-- Calls into the javascript interface for the activ...

In Android Webview, am I able to modify a webpage's DOM?

Suppose I load a 3rd party URL through webview. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview = (WebView) findViewById(R.id.webview); webview.setWebViewClient(new HelloWebViewClient()); webview.getSettings().setJavaScri...

How do I modify the -encoding argument to javac in the Android Ant build system

Apologies if this is a stupid question - I'm an Android and Ant newbie. I have utf8 encoded source files that I need to compile with the Android Ant build system. By default, the encoding is set to ascii. I'd be very grateful for a pointer to whatever I need to do to let the build system know that my files are utf8. Incidentally, it wo...

iPhone/Android app development tutorials?

Hi, I'm looking at jumping on the band-wagon and knock out a couple iPhone and Android apps. I'm not a complete beginner as I have programmed in quite a few languages, with my current focus on PHP and Drupal development, but I have not developed for either the iPhone or Android before. I have downloaded the respective SDKs, but I was ...

How do I "listen" for something in WebView, Android?

private class HelloWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceStat...

Problem in refering Files from Android emulator?

Hi, I have one problem , i want to refer particular file in my system D: from my android emulator,but it throwing Nullpointer Exception, Here is my code for (File file : new File("D:\\vcards").listFiles()) { i++; } Log.i("I",""+i); If i run this code in core java application it prints the no of files in th...

Installer Android

Hi , I need to make an installer which will ask for T&C and install the App . But i am not able to find any tutorial related to the same . Any help would be appreciated . Thanks in advance. ...

Any resource or tutorial for Android's CDMA and RIL layer

In Android 1.5, it already introduce the support of CDMA network, any resource or tutorial could be reference except the 'developer.android.com'? ...

texture the 3d cube in android

i have ever tried to texture the 3d cube in android using opengl es according to the example in c++, but after several times , the result is disappointed! so i wanna know, who have ever done it before? may you give me some suggestions? thanks in advance! ...

how to solve Null pointer exception on Getting latitude or GPS?

dear friends, i am trying to get current latitude and longitude and written following code given exception at getlatitude method LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); LocationListener myLocationListener = new CurrentLocationListener(); locationManager.requestLocation...

how display Advertisements in bottom of the screen in android?

Hi,In my application i want to be use advertisements.Let me know which controls are use for displaying the SLIDE OUT AD. ...

Why doesn't System.out.println work? (in Java)

I want to print something in console so I can debug it. But for some reason, nothing prints in my Android application. How do I debug then? public class HelloWebview extends Activity { WebView webview; private static final String LOG_TAG = "WebViewDemo"; private class HelloWebViewClient extends WebViewClient { ...

Can an Android Toast be longer than "Toast.LENGTH_LONG"?

When using setDuration for a Toast is it possible to set a custom length or at least something longer than Toast.LENGTH_LONG? ...

How to implement an audio player for Android using MediaPlayer And MediaController?

I want to create an Android application that is a client for an Internet radio station. And I want it look native to Android? But im confused with Android API logic and documentation. What i've got is that I need MediaPlayer and MediaController classes. Am I right, and is there any good example of AUDIO player for Android? Especially, I...

Android - About box in application manager?

Hi all, I was wondering does anyone know how to give an Android application an about box in the application manager? So when a user goes to Settings > Applications > Manage Applications and clicks on an app there is an About box there that the user can click and info about the app pops up. Like the images below? ...

Handling large Bitmaps

I have a bunch of image URLs. I have to download these images and display them in my application one-by-one. I am saving the images in a Collection using SoftReferences and also on Sdcard to avoid refetches and improve user experience. The problem is I dont know anything about the size of the bitmaps. And as it turns out, I am getting O...

Decoupled AppWidget Intents after Home process restart

My Android app Transdroid offers several home screen widgets. Every AppWidget has 2 'buttons' (ImageButton), one starts the app and one starts some activity that refreshes the AppWidget content. Pretty simple. Here is a screenshot. The widget code is at my Google Code website, but most importantly: RemoteViews views = new RemoteViews(co...

frequent problem in android view, Error parsing XML: unbound prefix

Hello, I have frequent problem in android view, Error parsing XML: unbound prefix on Line 2. <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:orientation="vertical" android:id="@+id/myScrollLayout" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_height="wrap_content" a...

KeyStore loading causing EOFException error on Android

I have some code for my app that creates a keystore in android, creates some default keys then saves the keystore. Later on the code tries to reload the keystore, on the emulator this runs fine however when run on a phone I get an EOFException. Any advice on where I'm going wrong? An out take of the code is below: In the class I...

passing more data from android view

private Button.OnClickListener goFirstPage = new Button.OnClickListener() { public void onClick(View v) { try { Intent i = new Intent(v.getContext(), quizMath.class); startActivityForResult(i, 0); } catch (Exception e) { e.printStackTrace(); // TODO: handle exception } } }; hi, this is my code, bu...