[android-developers] Renderscript Allocations without copying data.

2012-08-24 Thread xtrawurst
Hi,
is there a method to have a Renderscript Allocation use an existing array 
of data without the overhead of copying?
I'm trying to allocate a java array which gets passed down the JNI to be 
filled by native code, then, once back in Java, wrap the array in an 
Allocation and do Renderscript on it. Does that sound like a good idea?

Rafael

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Mock Location Providers in 1.0

2008-09-25 Thread xtrawurst

Could that issue be solved yet? I could not receive anything from DDMS
as well.

On Sep 25, 9:22 am, Cristina [EMAIL PROTECTED] wrote:
 I have downloaded some gpx files from this 
 webhttp://tramper.co.nz/?view=browsegpxFiles

 So. DDMS location tool loads them ok..I am able to se both the points
 and the track...and when I pressed the button play it seems that is
 processing the file...but my test application doesnotreceive
 anything.

 Ludwig, can you please write in this thread a brief example of a GPX
 file that works for you? Maybe the problem is related with the gpx I
 have downloaded

 I include also some of my test code, maybe there is somthing I have
 misssed

 By the way, I am running on Windows XP SP2 ...

 Thanks in advance

 public class LocationTest extends MapActivity implements
 LocationListener {

         private LocationManager mLocationManager= null;
         private LocationProvider mLocationProvider = null;
         private MapView mMapView = null;

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         mLocationManager =
 (LocationManager)getSystemService(Context.LOCATION_SERVICE);
         Criteria criteria = new Criteria ();
         criteria.setAccuracy(Criteria.ACCURACY_FINE);
         ListString providerIds
 =mLocationManager.getProviders(criteria, true);
         if (!providerIds.isEmpty()) {
                 mLocationProvider =
 mLocationManager.getProvider(providerIds.get(0));
         }

         mMapView = new MapView(this, tid);
         mMapView.getController().setZoom(20);
         setContentView(mMapView);

         MyLocationOverlay myLocationOverlay = new MyLocationOverlay
 (this, mMapView);
         mMapView.getOverlays().add (myLocationOverlay);
         myLocationOverlay.enableMyLocation();

         // Para que si me muevo mire constantemente la localizacion

 mLocationManager.requestLocationUpdates(mLocationProvider.getName(),
 0, 0, this);
     }

     [EMAIL PROTECTED]
     protected boolean isRouteDisplayed() {
            return false;
     }

      public void  onLocationChanged(Location location) {
             updateView(location);
      }

      public void  onProviderDisabled(String provider) {
      }
      public void  onProviderEnabled(String provider) {
      }
      public void  onStatusChanged(String provider, int status, Bundle
 extras) {
      }
      private void updateView (Location location) {
           Double lat = location.getLatitude()*1E6;
           Double lng = location.getLongitude()*1E6;
           GeoPoint point = new GeoPoint(lat.intValue(),
 lng.intValue());
           mMapView.getController().setCenter(point);
     }

 }

 On 24 sep, 18:06, Ludwig [EMAIL PROTECTED] wrote:

  I donothave a problem playing GPX files from DDMS and my code continues to
  work ok with 1.0.
  The only change required was to remove the calls to the two methods you
  mention when subscribing to location updates.

  (I am running on Vista, just in case this is a platform issue)

  Ludwig

  2008/9/24 Cristina [EMAIL PROTECTED]

   Hi!

   I have downloaded SDK 1.0 this morning, so I have tried to migrate
   some code I have to this version.
   When trying to migrate MockLocationProvider Ifoundthat some methods
   have dissapeared from LocationManager:
   setTestProviderEnabled
   addTestProvider

   It seems that itnotpossible to create a Mock Provider by code any
   more...

   I have also checked DDMS Location controls, but they seem tonotbe
   working either in this version.
   Maybe I am doing something wrong, but I have tried kml and gpx. In
   both cases my kml/gpx files loads ok, but when I click on play
   button, my application doesnotreceive the locations.

   I have test thegeocommand, and it works...so by the moment I am
   using this, although it is a little hard to write every point in order
   to do tests...

   Has anybody managed to make DDMS locations tools to work in 1.0? Is it
   possible to create a mock location provider by code in this version?
   Is there any other way to automate this? maybe an script that calls
  geoutility?

   Thanks in advance- Ocultar texto de la cita -

  - Mostrar texto de la cita -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Links to API demos broken

2008-09-23 Thread xtrawurst

for example this one when I click on 'Graphics':
http://code.google.com/android/samples/ApiDemos/src/com/android/samples/graphics/

Going manually to
http://code.google.com/android/samples/ApiDemos/src/com/
I can navigate to the above site, which apparently changed to
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/graphics/

but here, again, links are broken, for example to the surface view
overlay layout file:
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/graphics/[EMAIL
 PROTECTED]/ApiDemos/res/layout/surface_view_overlay.html

Thanks in advance for fixing this quickly,
Rafael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---