android,google-maps,android-mapsRelated issues-Collection of common programming errors


  • Jane Wayne
    android python monkeyrunner
    i have the following python script in an attempt to take a screen shot of a device (not an emulator).import sys import timefrom com.android.monkeyrunner import MonkeyRunner, MonkeyDeviceCONNECTION_TIME_OUT = 30 deviceName = str(sys.argv[1]) pathName = str(sys.argv[2])device = MonkeyRunner.waitForConnection(CONNECTION_TIME_OUT, deviceName) result = device.takeSnapshot() result.writeToFile(pathName,’png’)i run this script at the windows command prompt as follows.monkeyrunner.bat -v ALL %SCRIPT_DIR

  • Cy Kaustav
    android phonegap extjs gcm
    Hi i have already built the native GCM application for Android which is working very fine in all my android devices. But i want to further use this GCM service like i want to integrate this GCM service with my existing Android app as for for testing i have already done my server for GCM but i am lagging behind all because of the Client side implementation. i have been trying to get the relevant information regarding my project but i couldn’t be able to find an resource of Client Side Implementat

  • genpfault
    android animation video text opengl-es
    We are trying to create a text animation like Transition and Zoom on the Video. We are not able to get Smooth transition and the effect is so jerky. Then we understood sub pixel rendering is not possible in android. What alternatives can we think of? Can we solve this problem in OpenGL?Ok… I would like to add more to my question….We are actually trying to implement text animations on top of a video which is played by a native player on a surface view. We tried to achieve the text animation

  • tazeenmulani
    java android sqlite
    I work with SQLite database in my Android application.I want only one column retrieved in spinner.When i run the application ,the application is crash.And my log cat shows “Bad request for field slot 0,1. numRows = 1, numColumns = 1”.Below are the codes for retrieving data from database and put it into spinner(NewleadActivity.class).This is my Adapter classpublic class DbHelper extends SQLiteOpenHelper{// Database Version@SuppressWarnings(“unused”)private static final int DATABASE_VERSION = 1;//

  • Santhosh
    java android inputstream ioexception processbuilder
    making a class , with several functions , I am having a problem with one of these functions which will use the ProcessBuilder to send a command and take its output as a string , acting as a shell command . When I use it , it catches an IOException , with a Bad file number , at the InputStreamReader , and returns “ERROR!!!” , here is my code , if you need to know anything about this comment … I am using the command “ls” btw , “ls /sdcard/” …public String builder(String str) { startTimer();

  • Kara
    android out-of-memory
    I am developing an Android Application to load some images to emulator, but it fails with the below error:11-07 19:38:51.596: E/dalvikvm-heap(322): 73670400-byte external allocation too large for this process.11-07 19:38:51.596: E/GraphicsJNI(322): VM won’t let us allocate 73670400 bytes11-07 19:38:51.596: D/AndroidRuntime(322): Shutting down VM11-07 19:38:51.616: W/dalvikvm(322): threadid=1: thread exiting with uncaught exception (group=0x4001d800)11-07 19:38:51.926: E/AndroidRuntime(322): FATA

  • Patrick Mahoney
    android toast android-xml
    I know that I could do all of this easily with a custom toast layout, but in creating a custom layout, I would no longer be using the system’s default toast view.Example: Toasts of course look different in Android 2.2 vs Android 4.0. If I create a custom view for my toast, then it will look the exact same in both versions, but what I want is for it to retain its… “Androidiness” for lack of a better word. Basically, does anyone know of a default toast XML layout? Is that even possible?

  • Vyger
    android sqlite contacts contactscontract
    Hi I am trying to get data from Contacts Table through contentprovider but it Crashes every time when I started my app,Here is my source code:public class WebpreneurActivity extends ListActivity {private DBHandler dbHelper;private Cursor phones;ImageButton imageButton;public static long rowId;@Overrideprotected void onCreate(Bundle savedInstanceState) {Log.d(“database1″ ,”0”);Log.d(“Your Location4”, “ok4:”);super.onCreate(savedInstanceState);Log.d(“database1″ ,”1”);setContentView(R.layout.acti

  • user2586942
    android
    I have this login acitivity that fetches the values from a server.i am able to retreive the values correctly but i am getting an illegal state exception.—————————————————————————————————————————————————————————————————————– code:public class StartActivity extends Activity {String[] classname= new String[10]; String[] pass= new String[10]; EditText class_name,

  • MattDavis
    android android-camera
    I tried to implement front facing camera in my application. I used the following code. It works fine with the back camera. But I cant change the camera to front camera.package com.fsp.googleimagesearch;import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date;import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Curso

  • ChrisF
    android google-maps
    I downloaded google map api v2 sample and followed official tutorial on google website (installed and added google play services) but i got NoClassDefFoundError error when run sample as below07-26 02:01:04.821: I/Process(620): Sending signal. PID: 620 SIG: 9 07-26 02:01:18.559: W/dalvikvm(682): Unable to resolve superclass of Lcom/example/mapdemo/BasicMapActivity; (80) 07-26 02:01:18.559: W/dalvikvm(682): Link of class ‘Lcom/example/mapdemo/BasicMapActivity;’ failed 07-26 02:01:18.559: E/dalvikv

  • Hovercraft Full Of Eels
    java swing google-maps
    I have tried to load a static google map in the following lines of code.The request to connect to the specified URL has failed with java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown

  • Dean Blakely
    android google-maps
    I have a few working examples now that successfully display a V2 map. But now I’m trying to display a V2 map on one of my pages in a ViewPager. The problem is that while the map displays properly (the default display west of africa as I have no code yet) if I try to scroll it with my finger it blows and the LogCat listed below is generated.On my other apps, I can scroll around and zoom in and out just fine but those maps are not in a viewpager.Thanks, GaryXML is …<fragment android:id=”@+i

  • David Martinelli
    java android google-maps android-fragments google-maps-api-2
    I searched a lot in the web but I don’t know where is my error. I’m trying to use the Android APIs for Maps for the first time. Here my code:public class MapClass extends FragmentActivity {@Overrideprotected void onCreate(Bundle savedInstanceState){// TODO Auto-generated method stubsuper.onCreate(savedInstanceState);setContentView(R.layout.info_restaurant_layout);} }Here my manifest:<manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”it.android.test” android:version

  • Daniel Gray
    android google-maps
    I’m fully aware that this question has been asked before, in 2 instances: Display Map v2 in popup Window not display in android? Transparent Google Map on PopupWindow?I want to add some information, but after I edited the second question, my edit disappeared from my view, so I guess someone rejected it or something.In my case: 1. The API key is NOT wrong. The map is displayed perfectly fine on a Nexus 10, inside the popup, and in an Android 4.0.3 device, in a separate activity. 2. The SupportMap

  • Bar Mako
    javascript google-maps gwt google-maps-api-3 jsni
    I’m working with GWT and I’m trying to add google-maps to my website. Since I want to use google-maps V3 I’m using JSNI. In order to display the map in my website I need to create a div element with id=”map” and get it in the initialization function of the map. I did so, and it worked out fine but its location on the webpage is funny and I want it to be attached to a panel I’m creating in my code. So my question is how can I do it? Can I create a div somehow with GWT inside a panel ?I’ve tried t

  • jaisonDavis
    android google-maps map google-maps-api-2
    I am trying to get a basic map application to work but, I am getting only the grid screen.Code:1.ActivityMain.javaimport android.os.Bundle; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; public class MainActivity extends MapActivity {MapView mapView;@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);mapView = (MapView) findViewById(R.id.map_view); }@Overrideprotected boole

  • Rob W
    jquery ajax google-maps getscript
    I’m trying to load two scripts with the $.getScript function of getting Google Map script, then after that is loaded, I get another script (goMap) which makes map applets easily to be made.However, when loaded, the first script of getting Google Map API is good, then the second script returns a parse error and shows this:TypeError: ‘undefined’ is not a constructor’Yet, I don’t know where that is referencing from or which line, I think it must be trying to execute the Geocoder on this file (first

  • kolar
    android google-maps
    I try test my app on device (Ainol Crystal) with Android 4.1.1. In emulator everything works ok but on device I get: 12-14 12:22:13.437: E/PackageManager(3372): Package com.capgemini.navi4uni requires unavailable shared library com.google.android.maps; failing!Native Google Maps app is installed and it works. There are also files: /system/framework/com.google.android.maps.jar /system/framework/com.google.android.maps.xml /system/etc/permissions/com.google.android.maps.xmlApp uses api version 1 (

  • Abhi
    google-maps shared-libraries android-mapview ddms
    First of all, I set the Project Build Target in project\properties\android. I created AVD with Level 7 and 8 with Google APIs, set each AVD only the SD card size 4Gb, set the min version of SDK to 7 the target SDK to 8 in Manifest file. Without success. I delete all AVD and recreate those.After I reinstall Eclipse Rcp, Installed ADT in Eclipse, and Installed Android SDK, and create AVDs again.My GPS application is worked fine without Google APIs, in the earlier version I currently implemented

  • JanBo
    android android-manifest android-maps android-maps-v2
    I am using Android Google maps V2 in my application. If the user doesnt have internet connection, i send them to an alternative activity without maps.The problem is that my app is not supported on devices that dont have openGL2, because of manifest:<uses-feature android:glEsVersion=”0x00020000″ android:required=”true”/>If i put required element to false, the maps dont show.Is there a way to program this somehow during run-time? Or any other alternatives?

  • animuson
    android android-maps
    I want to to change the google map view from one state to another. Currently the view is satellite view, now I want to change it to street view. I have written as below but it’s not changing the view. How do I change the view at run-time?mapView.setStreetView(true);

  • AndreaF
    android android-mapview android-maps geopoints
    This in a bit complex issue so read carefully.I have tried to realize a map that -shows my current position, -when I click on a point in the map, the app should place a custom geoPoint getting latitude and longitude to pass these to an activity to create a new Pub object-the map on start must show the positions of Pubs saved beforeFollowing this tutorial I have created these classClass MyMap:public class MyMap extends MapActivity implements LocationListener {private MapView mapView;private Locat

  • Adrian Olar
    android android-maps android-support-library
    I am using SupportMapFrgment to ensure backwards compatibility for the Google Maps API in my application.It seems to load the map just fine on 4.1 but i get a crash on 2.3.4.Here’s my code:private String getCurrentLocation() {LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);Criteria criteria = new Criteria();String provider = service.getBestProvider(criteria, false);Location location = service.getLastKnownLocation(provider);LatLng userLocation = new LatLng(location.

  • gkris
    android gps android-maps
    I am trying to develop an application which has a button, which on clicking should lead me to my current location in the map. My main confusion is the OnClick Listener and the Map events. Where can i possibly go wrong?Here is my code:-package geopoint.ns;import java.io.IOException; import java.util.List; import java.util.Locale;import android.content.Context; import android.graphics.Canvas; import android.graphics.Point; import android.location.Address; import android.location.Geocoder; import a

  • Antrromet
    android google-maps android-emulator android-maps
    I am using the following map class to use maps in my android app…package com.wglxy.example.dash1;import java.io.IOException; import java.util.List;import android.app.AlertDialog; import android.content.Intent; import android.location.Address; import android.location.Geocoder; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import

  • user1918034
    android android-intent android-maps android-location android-cursor
    Hi below is my code for checking gps settings which works perfectly on all devices with android 2.3.6 and lower , but not in ICS and Jellybean. When i check for GPS settings enabled or not on the device and start the location settings intent and enable the GPS and return to my app , when i check again for GPS it still shows disabled and force closes the apppublic GPSTracker(Context context) {this.mContext = context;getLocation();}public Location getLocation() {try {locationManager = (LocationMan

  • aseem
    android android-maps android-fragmentactivity android-maps-v2 supportmapfragment
    Earlier i have made an application in which i have used Maps with Fragment. In XML layout file i have used “fragment” element (using SupportMapFragment) and used in my activity by using setContentView and have defined some marker. It works fine.Now this time i tried to make another activity and its corresponding XML layout in same application…I have just inflated XML layout…it gives error of force close.I have searched many time on internet but not get helped clearly. Please show me the way.

  • slyder07
    android android-fragments android-mapview android-maps android-fragmentactivity
    I have an activity, what I’m trying to do is to start a new activity that holds a Google Maps Fragment API v2 following this example (https://developers.google.com/maps/documentation/android/start). I get an runtime error “Binary XML file line #4: Error inflating class fragment” This the XML of activity:<?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”android:layout_width=”match_parent”android:layout_height=”match_parent”andr

  • Sanchit
    android google-maps android-maps
    I started on with a car finder activity in my car manager application. I planned to show up a simple google map as a first step. I wrote up the following codes. carfinder.xml<?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” > <com.google.android.maps.MapView android:id=”@+id/mapView” android:layout_width=”fill_parent”

Web site is in building