[android-developers] Re: Dialog is leaked on orientation change

2010-06-26 Thread Zsolt Vasvari
I don't use managed dialogs at all -- not only don't they work in
certain cases (like in a TabActivity), I think the whole system of
having to maintain global dialog ids is a pain.  In my very large app,
I ended up with a DialogIds global enum, which I hated.  I still have
the same issue with request ids for startActivityForResult(), but I
don't have a solution for that yet.

Here's an example of what I do, a simple MessageDialog class.  It took
me a while to perfect the mechanism, but it works great with screen
orientation changes and activity save/restore.  Also, I am purposely
not saving a reference to Context, to avoid any possible leaks.   The
interesting part is how a new Listener is passed in to restoreState as
the listener is the only state that cannot be recrated reliably (the
target can be a different object if the Activity was destroyed/
resumed)


public class MessageDialog
{
public enum MessageDialogButton
{
POSITIVE,
NEGATIVE,
NEUTRAL
}


private static final String KEY_DIALOG_SHOWING   =
_dialog_showing;  //$NON-NLS-1$
private static final String KEY_DIALOG_DATA  =
_dialog_data; //$NON-NLS-1$
private static final String KEY_TITLE=
_title;   //$NON-NLS-1$
private static final String KEY_MESSAGE  =
_message; //$NON-NLS-1$
private static final String KEY_ICON =
_icon;//$NON-NLS-1$
private static final String KEY_POSITIVE_BUTTON_TEXT =
_positive_button_text; //$NON-NLS-1$
private static final String KEY_NEGATIVE_BUTTON_TEXT =
_negative_button_text; //$NON-NLS-1$
private static final String KEY_NEUTRAL_BUTTON_TEXT  =
_neutral_button_text; //$NON-NLS-1$

protected CharSequence  baseKey;
Dialog  dialog;
MessageDialogListener   listener;
private CharSequencetitle;
private CharSequencemessage;
private int icon;
private CharSequencepositiveButtonText;
private CharSequencenegativeButtonText;
private CharSequenceneutralButtonText;


public MessageDialog(CharSequence tag)
{
this.baseKey = this.getClass().getName() + '_' + tag;
}


public void saveState(Bundle bundle)
{
boolean dialogShowing = isShowing();
bundle.putBoolean(this.baseKey + KEY_DIALOG_SHOWING,
dialogShowing);
if (dialogShowing)
{
bundle.putBundle(this.baseKey + KEY_DIALOG_DATA,
this.dialog.onSaveInstanceState());
bundle.putCharSequence(this.baseKey + KEY_TITLE,
this.title);
bundle.putCharSequence(this.baseKey + KEY_MESSAGE,
this.message);
bundle.putInt(this.baseKey + KEY_ICON, this.icon);
bundle.putCharSequence(this.baseKey +
KEY_POSITIVE_BUTTON_TEXT, this.positiveButtonText);
bundle.putCharSequence(this.baseKey +
KEY_NEGATIVE_BUTTON_TEXT, this.negativeButtonText);
bundle.putCharSequence(this.baseKey +
KEY_NEUTRAL_BUTTON_TEXT, this.neutralButtonText);
}
}


public void restoreState(Context context, MessageDialogListener
_listener, Bundle bundle)
{
this.listener = _listener;

boolean dialogShowing = bundle.getBoolean(this.baseKey +
KEY_DIALOG_SHOWING);
if (dialogShowing)
{
this.title = bundle.getCharSequence(this.baseKey +
KEY_TITLE);
this.message = bundle.getCharSequence(this.baseKey +
KEY_MESSAGE);
this.icon = bundle.getInt(this.baseKey + KEY_ICON);
this.positiveButtonText =
bundle.getCharSequence(this.baseKey + KEY_POSITIVE_BUTTON_TEXT);
this.negativeButtonText =
bundle.getCharSequence(this.baseKey + KEY_NEGATIVE_BUTTON_TEXT);
this.neutralButtonText =
bundle.getCharSequence(this.baseKey + KEY_NEUTRAL_BUTTON_TEXT);

showDialog(context, checked);

Bundle dialogData = bundle.getBundle(this.baseKey +
KEY_DIALOG_DATA);
this.dialog.onRestoreInstanceState(dialogData);
}
}


public void show(Context context, MessageDialogListener _listener,
CharSequence _title, CharSequence _message, int _icon, CharSequence
_positiveButtonText, CharSequence _negativeButtonText, CharSequence
_neutralButtonText)
{
this.listener = _listener;
this.title = _title;
this.message = _message;
this.icon = _icon;
this.positiveButtonText = _positiveButtonText;
this.negativeButtonText = _negativeButtonText;
this.neutralButtonText = _neutralButtonText;

showDialog(context);
}


public void dismissIfShowing()
{
if (isShowing())
this.dialog.dismiss();

this.listener = null;
}


protected void showDialog(Context context)
{
Builder builder = new Builder(context);
builder.setTitle(this.title);
builder.setCancelable(false);

[android-developers] Re: Mapping Multiple textures to a cube in Android OpenGL ES

2010-06-26 Thread Robert Green
No, that's not what cube maps are for.

You can only draw 1 texture at a time (unless multitexturing but
that's totally different and not what you want) so you have 2 options:

1)  Combine all textures together into a single one and map the
coordinates to each side accordingly (will run much faster)
2)  Draw side-at-a-time binding to the appropriate texture for each
side. (not usually the preferred method.)

A trick many of us use when doing something like... say you want to
have the user pick 6 photos from their SD card and then you want to
display those on a cube, one on each face.  At some point you must
load each photo up, clipping and scaling it to fit aspect ratio and a
power-of-two texture and then uploading it to vram.  Well, instead of
uploading each one as a separate texture, why not just create a
1024x1024 bitmap and draw all 6 photos to it in different spots.  You
could use 50% of the texture vertically and 33% horizontally (for
example) to pack 6 photos onto it for 100% usage.  It's ok if they
distort going on to it so long as you draw them aspect-correct.  You
then keep track of which one is where (using UVs, so percentages from
0 to 1).  Upload that texture atlas as a single texture and when you
draw your cube, you just bind to that atlas once and draw everything
in one shot.  It'll run fast and it's not really that hard to do.

On Jun 25, 6:26 pm, chaitanya vengeance...@gmail.com wrote:
 Hi,
       I have just began opengl programming in android and i am fairly
 new to opengl as well. I've been using nehe's opengl tutorials as well
 as insanitydesign's android ports. I successfully managed to create a
 cube with a single texture mapped to all its 6 faces. I even mapped
 multiple textures to different faces of the cube.
         But the way I did it was to create 6 faces seperately, have 6
 seperate index and texture buffers and then using glBindTexture() with
 the selected texture for each face and then calling glDrawElements.
 Isn't there an efficient way around this. Should i use a cube map
 texture instead of a GL_TEXTURE_2D?

   Any suggestions would be appreciated?
 Thanks

-- 
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: Sensor listeners - threads and responsiveness

2010-06-26 Thread kamiseq
Ok thanks,
and I ve found that writes to db had made my app unresponsive

-- 
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


Re: [android-developers] Picking up contacts: difference in behaviour between HTC and NexusOne - SDK 2.1-update1

2010-06-26 Thread YuviDroid
Hi!

I had the same issue with my app. To solve it, instead of using the
'deprecated' Contacts.People on 2.1 devices, you should use
ContactsContracts (which deals also with multiple user accounts). I did the
following:

intent = new Intent (Intent.ACTION_PICK);
intent.setType(ContactsContract.Contacts.CONTENT_TYPE); // this will show
contacts  their primary numbers

// If you want to allow a user selecting also a secondary phone number use
this:
intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);


Hope it helps!
YuviDroid

On Tue, Jun 8, 2010 at 5:03 AM, frantz lohier floh...@gmail.com wrote:

 Hi,

 I wrote an app that invokes the contact manager in the following way:

 Intent pickcontact = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
 startActivityForResult(pickcontact, CONTACTPICKED);

 I am experiencing 2 different behavior between HTC phones and the NexusOne,
 all with firmware 2.1-update1.

 Thanks work properly on the NexusOne (i.e., my application is getting
 access to all my contact along the primary phone number of that contact
 list). On HTC phones however (incredible and the hero), the list of contact
 I get represents some sort of index as opposed to the actual contact
 name/phone number.

 Am I missing anything ?

 Thanks,

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
http://android.yuvalsharon.net

-- 
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: How to obtain ID of an image by the id of the thumbnails?

2010-06-26 Thread ReyLith
Nobody?

-- 
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: Save image on SD card

2010-06-26 Thread ReyLith
Nobody?

-- 
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


Re: [android-developers] Re: Android paid apps in Ireland

2010-06-26 Thread YuviDroid
The official countries lists are here:
Supported locations for merchants:
http://market.android.com/support/bin/answer.py?answer=150324
http://market.android.com/support/bin/answer.py?answer=150324Paid App
Availability:
http://market.android.com/support/bin/answer.py?hl=enanswer=143779

On Sat, Jun 26, 2010 at 7:53 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 How can you check if the user's country allows paid apps or not?
 (Other than the obvious: maintain my own list)


 On Jun 26, 1:06 am, TreKing treking...@gmail.com wrote:
  On Mon, Jun 21, 2010 at 3:37 AM, skooter500 skooter...@gmail.com
 wrote:
   1. When will the Android paid app marketplace be available in Ireland
 
  There is no ETA - assume never.
 
   2. If its not going to be for a while, how do I sell my app in Ireland
 withough
   using the Android Marketplace?
 
  Use third party sites like AndAppStore or SlideMe. Consider putting a
 free
  version on the Android Marketplace that's limited in functionality and
  points users in non-paid countries to your alternate market offerings.
 
  Good luck.
 
 
 ---­--
  TreKing - Chicago transit tracking app for Android-powered deviceshttp://
 sites.google.com/site/rezmobileapps/treking

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
http://android.yuvalsharon.net

-- 
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] Howto create a quick action bar/badge/Dialog

2010-06-26 Thread David
Hey everyone,

I watched the UI session on Google IO this year in which they showed
us the quick action dialogs used in the twitter App.
I really like the way they work and would like to include one in my
own App.
But even though I'm not a beginner I can't think of an efficient way
of implementing the dialog / badge / bar.

I tried looking at the implementation of the quick contact bage but it
is rather complex and hard to extract the essentials. And in the end
it's not really the same as the twitter one.

Does anyone have an example or is there any documentation of how to
create quick action bars?

Greets David

-- 
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


Re: [android-developers] Howto create a quick action bar/badge/Dialog

2010-06-26 Thread Mark Murphy
On Sat, Jun 26, 2010 at 5:21 AM, David davideberl...@googlemail.com wrote:
 But even though I'm not a beginner I can't think of an efficient way
 of implementing the dialog / badge / bar.

qberticus posted this the other day:

http://code.google.com/p/simple-quickactions/

Haven't played with it myself, and the look-and-feel is up to you.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

-- 
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] PNG loading that doesn't premultiply alpha?

2010-06-26 Thread Jeremy Statz
I'm working on a new project that requires a few layers of blending
(It's an OpenGL app), and I'm discovering that the PNG loader used by
Bitmap seems to always load the PNG with premultiplied alpha.  I've
spent all evening confirming the values being saved out are correct,
and the PNG spec itself declares that alpha should never be
premultiplied.

I need to mask out background elements with a blend function like
GL_ONE GL_ONE_MINUS_SRC_ALPHA, but the color math can't be done with
premultiplied alpha... a lot of very useful blends go away in this
case actually, and none of the other formats support a full alpha
channel.

I found a thread about this from over a year ago that pretty quickly
reduced to an argument of the merits of premultiplied alpha vs non-
premultiplied alpha.  Is there any way to load a PNG file into an
OpenGL texture without modifying the colors like this?

-- 
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] Receiving GPS navigation audio events

2010-06-26 Thread ls02
I have an audio player. I came to conclusion it is not possible to
receive notification that another application starts playing any kind
of audio prior to 2.2 where Google introduced audio focus concept.
However, I am trying to at least get notifications of GPS navigation
audio prompts so we can pause our playback. Is there way to do that on
Android prior to 2.2?

-- 
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] how often should getRotationMatrix update?

2010-06-26 Thread ThomasWrobel
I'm currently just bliting a rotation matrix onto the screen.
The source of which is RT from;

SensorManager.getRotationMatrix(Rt, I, accels, mags);

Where accels and mags are from the sensors. The getRotationMatrix, and
its display, are triggered once for every update of the acceleration
sensor.

Question;

How often should getRotationMatrix update? That is, change the values
its outputting? It seems to be far too slow to be any use.
I mean, once every 2-3 seconds it gives a new matrix out, even though
its triggered hundreds of times inbetween (with different accels and
mags fed to it)

Does anyone successfully use getRotationMatrix from here? What speeds
does it update? I'm using a HTC Legend, Android 2.1.

I'm sure it can't be meant to be this speed...must be something I'm
doing wrong, but I'm running out of options.

-- 
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] starting text to speech synthesis from a service?

2010-06-26 Thread pranay
i am trying to start a tts engine from a service which is started by a
BroadcastReceiver . The service starts but am not getting any sound. I
can see the log message as specified by Log.d in my prog and also get
the Toast messsage but no sound:

Recevier class :

public void onReceive(Context context,Intent intent)
{
context.startService(new Intent(context,Service.class));
...
}

Service class:

public static TextToSpeech mtts;
public void onStart(Intent intent,int startid)
{
mtts = new TextToSpeech(getApplicationContext(),this);
mtts.setLanguage(Locale.ENGLISH);
Toast.makeText(getApplicationContext(), From
Service,Toast.LENGTH_SHORT ).show();
mtts.speak(Testing,TextToSpeech.QUEUE_FLUSH, null);
Log.d(Serivce,Synthesis done)
...}

the log message i get is:

STOP command without a player
06-26 19:11:00.281: DEBUG/MediaPlayer(52): Couldn't open file on
client side, trying server side
 ERROR/MediaPlayerService(30): Couldn't open fd for
content://settings/system/notification_sound
ERROR/MediaPlayer(52): Unable to to create media player
WARN/NotificationService(52): error loading sound for
content://settings/system/notification_sound
WARN/NotificationService(52): java.io.IOException: setDataSource
failed.: status=0x8000
...
WARN/NotificationService(52): at
android.media.MediaPlayer.setDataSource(MediaPlayer.java:699)
...
 WARN/NotificationService(52): at
android.media.AsyncPlayer.startSound(AsyncPlayer.java:62)

-- 
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: How to clean DDMS view of the logs though ant script

2010-06-26 Thread Lance Nanek
Wouldn't you just use Ant's exec task to execute 'adb logcat -c'?

On Jun 24, 11:32 pm, Raja Nagendra Kumar nagendra.r...@tejasoft.com
wrote:
 Hi,

 Is it possible to clean DDMS logs clean up though ant script pl.

 Regards,
 Raja Nagendra Kumar,
 C.T.Owww.tejasoft.com
 -Enterprise Mobile Products

-- 
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


Re: [android-developers] Re: How to clean DDMS view of the logs though ant script

2010-06-26 Thread Mark Murphy
On Sat, Jun 26, 2010 at 11:18 AM, Lance Nanek lna...@gmail.com wrote:
 Wouldn't you just use Ant's exec task to execute 'adb logcat -c'?

That doesn't affect a running DDMS, which I thought was what the OP was seeking.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

-- 
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


Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)

2010-06-26 Thread Pedro Teixeira

Hi Brad,

Thanks for your solution. I'm trying to understand how it works.
Is this generic for all zoom levels?
I don't know how to implement the if condition snippet of your code.  
Something is missing me or I'm not understanding it right.

Can you explain this value:
latSpan/1E6, is this the simple getLatitudeSpan?

I'm sorry, I'm a little bit overwhelmed with this problem for some  
days and I've been really confused.


On Jun 26, 2010, at 3:53 AM, Brad Gies wrote:


Pedro,

I've been working on roughly the same thing today... see the thread   
MapView.getLatitudeSpan..


All you're running into is that the map isn't ready when you are  
asking for the getLatitudeSpan, so you need to wait until it is  
ready...OR...

the formula I've come up with to calculate it is this :

Note that I don't expect this formula is perfect.. and I can  
certainly make it more compact and faster by reworking it, but for  
working on it I wanted to do it step by step :).


   private class LatLonSpans
   {
   @SuppressWarnings(unused)
   public double LatSpan = 0.0;
   @SuppressWarnings(unused)
   public double LonSpan = 0.0;
   }

   private LatLonSpans getSpans()
   {
   LatLonSpans latLonSpans = new LatLonSpans();
   Display display = getWindowManager().getDefaultDisplay();
   int width = display.getWidth();
   int height = display.getHeight();


   int zoomLevel = mapView.getZoomLevel();
   // zoomToPower times 256 should be equal to the pixels  
required to view the entire world

   // at the resolution I've set.
   double zoomToPower = Math.pow(2, zoomLevel - 1);
   // it takes 256 pixels to view the entire world at resolution  
1, so this should be the pixels required to view the entire world

   // at the resolution I've set.
   double entireWorld = zoomToPower * 256;
   // Now I need to scale the zoomToPower to my screen size to  
figure

   // out what I'm really going to see.
   //
   // this is how many pixels to see 1 degree.
   double OneDegree = entireWorld / 360;
   // and for height we have x pixels minus 40 to account  
for top bars. so we will see this much of a degree.

   double heightSpan = (height - 40) / OneDegree;
   double widthSpan = width / OneDegree;

   latLonSpans.LatSpan = heightSpan;
   latLonSpans.LonSpan = widthSpan;

   return latLonSpans;
   }

and I'm using it like this :

if (mapView.getLatitudeSpan() == 0)
{
nvps.add(new BasicNameValuePair(latitudespan,  
String.valueOf(latLonSpans.LatSpan)));

}
else
{
nvps.add(new BasicNameValuePair(latitudespan,  
String.valueOf(latSpan / 1E6)));

}

Hope it helps... and if anyone can poke holes in my formula ..  
PLEASE DO... I'd love to know it doesn't work BEFORE I start relying  
on it. :).





On 25/06/2010 5:55 PM, Pedro Teixeira wrote:

New approach that makes more sense:

int latSpan = mapView.getLatitudeSpan();
int longSpan = mapView.getLongitudeSpan();
 GeoPoint mapCenter = mapView.getMapCenter();
int topLatitude = mapCenter.getLatitudeE6() + (latSpan/2);
int bottomLatitude = mapCenter.getLatitudeE6() - (latSpan/2);
int leftLongitude = mapCenter.getLongitudeE6() - (latSpan/2);
int rightLongitude = mapCenter.getLongitudeE6() + (latSpan/2);

But this values:
int latSpan = mapView.getLatitudeSpan();
int longSpan = mapView.getLongitudeSpan();

are giving me 3600 and 0 :/

On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote:


Exactly. You need to pass the neLatitude, neLongitude, swLatitude,
swLongitude as query parameters to your back end web service, which
then returns only POIs whose latitude and longitude fall within  
those

bounds, like this Javascript Google Map does:

http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105

Notice that it even handles panning and zooming.

--
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


Pedro Teixeira

www.pedroteixeira.org http://www.pedroteixeira.org

--
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


--
Sincerely,

Brad Gies
---
Bistro Bot - Bistro Blurb
http://www.bgies.com
http://www.bistroblurb.com
http://www.ihottonight.com
---

Never 

[android-developers] Re: Alarms after an update ?

2010-06-26 Thread mac-systems
I try to get my Reciever running, but at the moment it fails:

My Reciever:

public final class ReplaceReceiver extends BroadcastReceiver
{

private final static String LOG_TAG =
ReplaceReceiver.class.getSimpleName();

/*
 * (non-Javadoc)
 *
 * @see
android.content.BroadcastReceiver#onReceive(android.content.Context,
 * android.content.Intent)
 */
@Override
public void onReceive(final Context _context, final Intent _intent)
{
Log.i(LOG_TAG, Enqueue Alerts, Action is : + 
_intent.getAction());
Toast.makeText(_context, Package Installer ,
Toast.LENGTH_LONG).show();
startService(_context);
}


In the Manifest:

receiver

android:name=de.macsystems.windroid.receiver.ReplaceReceiver
android:label=@string/app_name
android:enabled=true
android:exported=false
intent-filter
intent-filter
action

android:name=android.intent.action.PACKAGE_CHANGED /
action

android:name=android.intent.action.PACKAGE_REMOVED /
action

android:name=android.intent.action.PACKAGE_ADDED /
action

android:name=android.intent.action.PACKAGE_INSTALL /
action

android:name=android.intent.action.PACKAGE_REPLACED /
data
android:scheme=package /
/intent-filter
/intent-filter
/receiver


What i do is, i install the App in the Emulator and just do a project
clean and do an reinstall (using Eclipse). Should my reciever be call
or what is missing there ? I also tried with

data
android:scheme=package

android:path=de.macsystems.windroid /


which also is not working. So any help would be nice to get it
working! I do not see any Toast or Info Massage in the Logcat.

regards,
Jens



-- 
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: OpenGL works incorrectly when projection matrix is set to identity?

2010-06-26 Thread satlan esh
Thanks everybody.

@ Leigh  Indicator: Sorry if I wan't clear enough. There's really not
much to it: nothing is being drawn when projection is set to identity.
All values are fixed point, and there's no mixing with floats.
@ openglguy: The coordinates are already NDC, so there's no need for
any sort of projection, just plain identity.


Here's a simple gl code that reproduces the problem:

glClear(GL_COLOR_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

// Eye coordinates - frustum projection. Ok
{
glViewport(0,0,width,height/3);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustumf(-1,1,-1,1,1,10);

GLfloat v[3*4]={-1, 1,  -2, 1,
-1, -1, -2, 1,
1,  1,  -2, 1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

// Normalized device coordinates - identity projection. Draws nothing
{
glViewport(0,height/3,width,height/3);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();

GLfloat v[3*4]={-0.5,   0.5,0.11,   1,
-0.5,   -0.5,   0.11,   1,
0.5,0.5,0.11,   1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

// Normalized device coordinates - almost identity projection. Ok
{
glViewport(0,2*height/3,width,height/3);

glMatrixMode(GL_PROJECTION);
GLfloat id[4*4]={   1.001,  0,  0,  0,
0,  1.001,  0,  0,
0,  0,  1.001,  0,
0,  0,  0,  1.001};
glLoadMatrixf(id);

GLfloat v[3*4]={-0.5,   0.5,0.11,   1,
-0.5,   -0.5,   0.11,   1,
0.5,0.5,0.11,   1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

It draws three identical triangles: The first uses eye coordiantes and
a frustum projection matrix. This one works fine.
The second uses the already transformed NDC and an identity projection
matrix. This one draws nothing on Android (but works ok on other
platforms).
The third one passes the same NDC, but uses a projection matrix that's
almost identity. This one draws.

Although the third approach is the closest I got to a solution, my
intentions are that a true identity projection matrix will implicitly
spare the unneeded projection transformation altogehter.

I hope this clarifies the problem.

-- 
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


Re: [android-developers] AIDL, Binder, ResultReceiver, and Performance

2010-06-26 Thread Jeff Sharkey
 If the purpose of this code (and I haven't looked at it to know) is to send
 a command to the service and get told later when it is done, then this is a
 reasonable approach.

Yep, that's exactly what I'm using it for.  I'm kicking off a heavy
background sync, and use an optional ResultReceiver to pass back
success/failure along with any Exception text for Toast'ing to the
user.


 Not my team's app...  I've not looked at the code, either. :}

The app was written by two engineers on the Android team, but not
anyone specifically working on the framework.


-- 
Jeff Sharkey
jshar...@android.com

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread pcm2a
Still have no resolution for this issue.

I have tried uninstalling and removing every single DLL that hte
Android SDK USB Drivers comes with from my system.  Afterwards I
installed the Motorola USB Drivers.  Next I plug in the Droid and all
it does it keep erroring out looking for the old sdk usb folder, which
I removed.

On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:
 I have owned my Droid since day 1 and I have been doing Android
 development, with ADB working, on my Windows 2003 Server laptop all
 this time.  I'll try to be as detailed as possible.

 Things to note right off the bat:
 - Motorola Droid 2.1
 - Windows Server 2003 laptop
 - ADB has worked perfectly with this for ~ 8 months

 My work gave me a HTC Evo to do some development on. I installed the
 HTC drivers, ADB worked fine, did my development and now I am done
 with the Evo. The problem is my Droid no longer works with ADB.

 Here are some steps that I have tried:

 Attempt A:
 1. In device manager I have listed Android Phone-Android ADB
 Interface
 2. Right click-Uninstall
 3. Scan for new hardware-Device shows up
 4. Select this device, pick the usb drivers that come with the SDK
 5. Various items install like ADB and Moto A855
 6. Device manager looks exactly as it did in step 1.
 7. ADB Doesnt work

 Attempt B:
 1. Start up USBDeview
 2. Delete the HTC entry, Delete all the Motorola A855 entries
 3. Go through the steps in Attempt A.
 4. ADB Doesnt work

 Attempt C:
 1. Download Motorola 4.6.0 driver package and install it
 2. Uninstall the current driver in device manager
 3. Scan for drivers automatically
 4. Drivers from SDK are automatically used
 5. ADB not working
 6. Go back and pick have disk for the driver. Tried every driver
 than came with Mtorola 4.6.0 driver package and none would install.

 Now I'm just stumped. Also important to note that the phone and ADB
 still work fine on other computers that I never installed the HTC
 drivers on.

 Thanks for any tips!

-- 
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


Re: [android-developers] Re: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread Mark Murphy
On Sat, Jun 26, 2010 at 12:52 PM, pcm2a reeeye...@gmail.com wrote:
 Still have no resolution for this issue.

 I have tried uninstalling and removing every single DLL that hte
 Android SDK USB Drivers comes with from my system.  Afterwards I
 installed the Motorola USB Drivers.  Next I plug in the Droid and all
 it does it keep erroring out looking for the old sdk usb folder, which
 I removed.

Have you asked Motorola?

http://developer.motorola.com/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
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


Re: [android-developers] Re: OpenGL works incorrectly when projection matrix is set to identity?

2010-06-26 Thread Leigh McRae
Well you have verified that your context is working.  Sending NDC isn't 
very common so who knows how tested it is.


Here is what I would try:

1) Try an emulator and an actual device and see if there is something 
different.

2) Change the order of your tests and see if anything changes.
3) Swap the view port line for 2  3 and see if that changes anything.
4) Use glLoadMatrix to load the identity.  Perhaps the driver is being 
to smart for it's own good.  If it works that's scary.


Leigh

On 6/26/2010 12:03 PM, satlan esh wrote:

Thanks everybody.

@ Leigh  Indicator: Sorry if I wan't clear enough. There's really not
much to it: nothing is being drawn when projection is set to identity.
All values are fixed point, and there's no mixing with floats.
@ openglguy: The coordinates are already NDC, so there's no need for
any sort of projection, just plain identity.


Here's a simple gl code that reproduces the problem:

glClear(GL_COLOR_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

// Eye coordinates - frustum projection. Ok
{
glViewport(0,0,width,height/3);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustumf(-1,1,-1,1,1,10);

GLfloat v[3*4]={-1, 1,  -2, 1,
-1, -1, -2, 1,
1,  1,  -2, 1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

// Normalized device coordinates - identity projection. Draws nothing
{
glViewport(0,height/3,width,height/3);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();

GLfloat v[3*4]={-0.5,   0.5,0.11,   1,
-0.5,   -0.5,   0.11,   1,
0.5,0.5,0.11,   1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

// Normalized device coordinates - almost identity projection. Ok
{
glViewport(0,2*height/3,width,height/3);

glMatrixMode(GL_PROJECTION);
GLfloat id[4*4]={   1.001,  0,  0,  0,
0,  1.001,  0,  0,
0,  0,  1.001,  0,
0,  0,  0,  1.001};
glLoadMatrixf(id);

GLfloat v[3*4]={-0.5,   0.5,0.11,   1,
-0.5,   -0.5,   0.11,   1,
0.5,0.5,0.11,   1};

glVertexPointer(4,GL_FLOAT,0,v);

glDrawArrays(GL_TRIANGLES,0,3);
}

It draws three identical triangles: The first uses eye coordiantes and
a frustum projection matrix. This one works fine.
The second uses the already transformed NDC and an identity projection
matrix. This one draws nothing on Android (but works ok on other
platforms).
The third one passes the same NDC, but uses a projection matrix that's
almost identity. This one draws.

Although the third approach is the closest I got to a solution, my
intentions are that a true identity projection matrix will implicitly
spare the unneeded projection transformation altogehter.

I hope this clarifies the problem.

   


--
Leigh McRae
www.lonedwarfgames.com

--
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] [Copyright question] Can I use Mozart's music in my Android apps/games?

2010-06-26 Thread Kakyoin
Hi.

Can I use Mozart or Beethoven music in my Android apps/games? Will I
get arrested for doing that?

I'm pretty sure their music are in public domain though.

Thank you in advance!

-- 
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


Re: [android-developers] [Copyright question] Can I use Mozart's music in my Android apps/games?

2010-06-26 Thread Shane Isbell
The answer is yes and no. The music itself is in the public domain, so if
you want to go to a recording studio and crank out Mozart on your violin,
you are in the clear. But when someone does their own recording, they own
the copyrights of their work. You would need to find a Mozart recording that
is in the public domain (I imagine you wouldn't have a problem here), either
because it was released this way or it is old enough to no longer have
attached copyrights.

Some other examples of this has to do with restored movies in the public
domain. The originals are in the public domain, but touch them up a bit and
you retain copyrights to the new work.


On Sat, Jun 26, 2010 at 10:31 AM, Kakyoin lgmc...@gmail.com wrote:

 Hi.

 Can I use Mozart or Beethoven music in my Android apps/games? Will I
 get arrested for doing that?

 I'm pretty sure their music are in public domain though.

 Thank you in advance!

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Shane Isbell (Founder of ZappMarket)
http://twitter.com/sisbell
http://twitter.com/zappstore
http://zappmarket.com

-- 
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

Re: [android-developers] Re: Avoiding GPL

2010-06-26 Thread Fabrizio Giudici
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 6/25/10 22:53 , Anton Persson wrote:
 Well, to connect to a MySQL database you need a connector, and the
 connector library shipped with MySQL is under GPL. Which is what I
 meant. And, hence, corporations buy licenses from MySQL to avoid
 having to release their applications under the GPL. (If you still
 don't believe me, try explaining the reason why they HAVE a dual
 license model... If they only wanted to sell support and
 indemnification, a separate paid-for license would NOT be needed...
 See Red Hat for an example of how that works..)

But I was referring to MySQL, not the connector. Also, sure there will
be also corporates who pay for not using the GPL, but my point was
that one is not forced to pay to use it. Now I think we are made clear
our points, and MySQL was only an example.

 And; the INTENT of MySQL is that if you use the GPL version of the
 MySQL database, your application should also be GPL. But, of
 course, there are loopholes. However, using these loopholes in a
 way that is obviously a circumvention is against this INTENT.

 If you want people to respect YOUR intellectual property, you
 should respect others as well, and not exploit their software in an
 unintended manner.

Licenses arbitrate how much land each entity has the right to own, in
other words they establish borders in a objective way that everybody
agrees on, not a subjective or moralistic one. So while I personally
might have some interest in what other people are willing to do
(subjective and moral position), not everybody is compelled to do
that, but only respect the law. Everybody uses licenses to try to
place that border in the most convenient possible way. An author of
FLOSS software tries to place the border in the best possible position
in his perspective, and a user of a FLOSS software has the same right,
in his perspective.

PS MySQL intent was to make money, and GPL is one of the best way to
do that, because of the double licensing thing. In fact, they made a
lot of money. Note that the owner of MySQL has changed many times and
the intents of the original founders, of Sun Microsystems and Oracle
might have been changed. Frankly, if I used MySQL I wouldn't be
interested in what their intents are, only in what I can do.


- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwmRwIACgkQeDweFqgUGxdGBACbBX13NejP63WSlLMgtoCuZ2xb
cQcAn15F0686sMX6qDugfZy8ScS4ajE/
=ME+q
-END PGP SIGNATURE-

-- 
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: Android paid apps in Ireland

2010-06-26 Thread Tomáš Hubálek
On 21 čvn, 10:37, skooter500 skooter...@gmail.com wrote:
 (though I have users in 22 countries). I am not going to release it
 for free. It seems I cant sign up for a google checkout merchant
 account, because I live in Ireland and there are no paid apps allowed
 on the Irish Android Marketplace!!!


Welcome to Android World where highest percentage of the apps on the
market is free... We are going to communism where everything is for
free and everybody is working for pleasure ;-) And all pigs are equal
and some of the are more equal ;-)

Tom

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread Lance Nanek
I ran into the same problem connecting both the Evo 4G and Droid to my
Windows 7 Tablet PC. After installing the HTC software off the Evo's
SD card, the Droid stopped working. I guess I did update a lot of SDK
stuff around then too, so that's also a potential factor.

I did eventually get both phones working at once. Basically I just
tried lots of combinations of removing everything HTC/Motorola in
remove programs, reinstalling them, connecting and disconnecting
devices, and the star of the show: right clicking on devices in the
device manager and choosing to update their drivers and picking a
different one from the list of applicable drivers. You can use this,
for example, to change a Mot Composite ADB Interface to an Android
Composite ADB Interface by choosing the Android drivers instead of
Motorola's.

My currently working setup doesn't even have Motorola's software
installed, but does have HTC's. There are several Android Composite
ADB Interface for the Droid and other phones, and one My HTC, no
Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
but I had to uninstall Motorola, but whatever. Although if you have
something pointing to a removed directory somehow I'd try fixing that
first via similar right-clicking on devices and updating methods.
Although I suspect what you are talking about there might just be a
helpful last used location for something copied into system32/drivers
anyway.

On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:
 Still have no resolution for this issue.

 I have tried uninstalling and removing every single DLL that hte
 Android SDK USB Drivers comes with from my system.  Afterwards I
 installed the Motorola USB Drivers.  Next I plug in the Droid and all
 it does it keep erroring out looking for the old sdk usb folder, which
 I removed.

 On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

  I have owned my Droid since day 1 and I have been doing Android
  development, with ADB working, on my Windows 2003 Server laptop all
  this time.  I'll try to be as detailed as possible.

  Things to note right off the bat:
  - Motorola Droid 2.1
  - Windows Server 2003 laptop
  - ADB has worked perfectly with this for ~ 8 months

  My work gave me a HTC Evo to do some development on. I installed the
  HTC drivers, ADB worked fine, did my development and now I am done
  with the Evo. The problem is my Droid no longer works with ADB.

  Here are some steps that I have tried:

  Attempt A:
  1. In device manager I have listed Android Phone-Android ADB
  Interface
  2. Right click-Uninstall
  3. Scan for new hardware-Device shows up
  4. Select this device, pick the usb drivers that come with the SDK
  5. Various items install like ADB and Moto A855
  6. Device manager looks exactly as it did in step 1.
  7. ADB Doesnt work

  Attempt B:
  1. Start up USBDeview
  2. Delete the HTC entry, Delete all the Motorola A855 entries
  3. Go through the steps in Attempt A.
  4. ADB Doesnt work

  Attempt C:
  1. Download Motorola 4.6.0 driver package and install it
  2. Uninstall the current driver in device manager
  3. Scan for drivers automatically
  4. Drivers from SDK are automatically used
  5. ADB not working
  6. Go back and pick have disk for the driver. Tried every driver
  than came with Mtorola 4.6.0 driver package and none would install.

  Now I'm just stumped. Also important to note that the phone and ADB
  still work fine on other computers that I never installed the HTC
  drivers on.

  Thanks for any tips!

-- 
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] Using targetSdkVersion

2010-06-26 Thread Peter Eastman
I'm stuck on a problem that I'm sure has a very simple answer, but I
haven't been able to figure it out.

I have a program that should work on Android 1.5, but when it's run on
newer devices with higher resolution screens, it should support the
full resolution and not emulate a lower resolution screen.  As far as
I can tell from the documentation, this should be simple.  I just
specify

uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/

The problem is that if I tell Eclipse to compile for 1.5, it refuses
to accept this.  It reports an error (targetSdkVersion is an unknown
tag) and refuses to compile or run.  If I tell it to compile for 1.6
it works fine, of course.  But if I then try to install on a 1.5 AVD,
the program immediately crashes with a java.lang.VerifyError.  I'm
clearly missing something simple.  How do I get it to compile an apk
that works under 1.5, but still includes the targetSdkVersion tag?

Peter

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread pcm2a
When I choose Dont search I will choose the driver to install I only
get two things listed:
- Android ADB Interface
- USB Compisite Interface

After installing and reinstalling the Motorola drivers 100 times I was
hoping to see something extra in this list but nothing ever changes.

On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:
 I ran into the same problem connecting both the Evo 4G and Droid to my
 Windows 7 Tablet PC. After installing the HTC software off the Evo's
 SD card, the Droid stopped working. I guess I did update a lot of SDK
 stuff around then too, so that's also a potential factor.

 I did eventually get both phones working at once. Basically I just
 tried lots of combinations of removing everything HTC/Motorola in
 remove programs, reinstalling them, connecting and disconnecting
 devices, and the star of the show: right clicking on devices in the
 device manager and choosing to update their drivers and picking a
 different one from the list of applicable drivers. You can use this,
 for example, to change a Mot Composite ADB Interface to an Android
 Composite ADB Interface by choosing the Android drivers instead of
 Motorola's.

 My currently working setup doesn't even have Motorola's software
 installed, but does have HTC's. There are several Android Composite
 ADB Interface for the Droid and other phones, and one My HTC, no
 Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
 but I had to uninstall Motorola, but whatever. Although if you have
 something pointing to a removed directory somehow I'd try fixing that
 first via similar right-clicking on devices and updating methods.
 Although I suspect what you are talking about there might just be a
 helpful last used location for something copied into system32/drivers
 anyway.

 On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:



  Still have no resolution for this issue.

  I have tried uninstalling and removing every single DLL that hte
  Android SDK USB Drivers comes with from my system.  Afterwards I
  installed the Motorola USB Drivers.  Next I plug in the Droid and all
  it does it keep erroring out looking for the old sdk usb folder, which
  I removed.

  On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

   I have owned my Droid since day 1 and I have been doing Android
   development, with ADB working, on my Windows 2003 Server laptop all
   this time.  I'll try to be as detailed as possible.

   Things to note right off the bat:
   - Motorola Droid 2.1
   - Windows Server 2003 laptop
   - ADB has worked perfectly with this for ~ 8 months

   My work gave me a HTC Evo to do some development on. I installed the
   HTC drivers, ADB worked fine, did my development and now I am done
   with the Evo. The problem is my Droid no longer works with ADB.

   Here are some steps that I have tried:

   Attempt A:
   1. In device manager I have listed Android Phone-Android ADB
   Interface
   2. Right click-Uninstall
   3. Scan for new hardware-Device shows up
   4. Select this device, pick the usb drivers that come with the SDK
   5. Various items install like ADB and Moto A855
   6. Device manager looks exactly as it did in step 1.
   7. ADB Doesnt work

   Attempt B:
   1. Start up USBDeview
   2. Delete the HTC entry, Delete all the Motorola A855 entries
   3. Go through the steps in Attempt A.
   4. ADB Doesnt work

   Attempt C:
   1. Download Motorola 4.6.0 driver package and install it
   2. Uninstall the current driver in device manager
   3. Scan for drivers automatically
   4. Drivers from SDK are automatically used
   5. ADB not working
   6. Go back and pick have disk for the driver. Tried every driver
   than came with Mtorola 4.6.0 driver package and none would install.

   Now I'm just stumped. Also important to note that the phone and ADB
   still work fine on other computers that I never installed the HTC
   drivers on.

   Thanks for any tips!- Hide quoted text -

 - Show quoted text -

-- 
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] Is runtime mapview defining possible? (rather then in main.xml)

2010-06-26 Thread ThomasWrobel
I've been trying to use a mapView in my app, and have been following
the tutorial;
http://developer.android.com/resources/tutorials/views/hello-mapview.html

However, I'd like to be able to generate the mapView at runtime, and
assign it to a widget container. (rather then just having it as the
route element in Main.xml as in the example).

Is this possible?

I tried just extending mapActivity as stated, and implementing the
overrides.
However, at the moment I'm getting this error;

06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
java.lang.IllegalAccessError: Class ref in pre-verified class resolved
to unexpected implementation
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.DexFile.defineClass(Native Method)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2489)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2621)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.access$2200(ActivityThread.java:126)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.os.Handler.dispatchMessage(Handler.java:99)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.os.Looper.loop(Looper.java:123)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
android.app.ActivityThread.main(ActivityThread.java:4595)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.reflect.Method.invokeNative(Native Method)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
java.lang.reflect.Method.invoke(Method.java:521)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-26 21:31:20.946: ERROR/AndroidRuntime(1845): at
dalvik.system.NativeStart.main(Native Method)



Which I think might be because theres no where in my code or xml at
the moment that defines where the mapView actually goes.
I can't figure out how to assign it. (in this case to a page in my
tabHost)

-- 
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


Re: [android-developers] Using targetSdkVersion

2010-06-26 Thread YuviDroid
The VerifyError occurs when you are using (or only 'importing') stuff that
is only in the newer API.
In this case I think you should use reflection to use the new APIs
methods/classes in Android  1.6.

On Sat, Jun 26, 2010 at 9:13 PM, Peter Eastman peter.east...@gmail.comwrote:

 I'm stuck on a problem that I'm sure has a very simple answer, but I
 haven't been able to figure it out.

 I have a program that should work on Android 1.5, but when it's run on
 newer devices with higher resolution screens, it should support the
 full resolution and not emulate a lower resolution screen.  As far as
 I can tell from the documentation, this should be simple.  I just
 specify

 uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/

 The problem is that if I tell Eclipse to compile for 1.5, it refuses
 to accept this.  It reports an error (targetSdkVersion is an unknown
 tag) and refuses to compile or run.  If I tell it to compile for 1.6
 it works fine, of course.  But if I then try to install on a 1.5 AVD,
 the program immediately crashes with a java.lang.VerifyError.  I'm
 clearly missing something simple.  How do I get it to compile an apk
 that works under 1.5, but still includes the targetSdkVersion tag?

 Peter

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
YuviDroid
http://android.yuvalsharon.net

-- 
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: Using targetSdkVersion

2010-06-26 Thread Peter Eastman
You're right, my fault.  Because I had Eclipse set to 1.6, I missed
the fact that I was calling an API that didn't exist in 1.5.

Thanks!

Peter

-- 
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] Intercepting the Android phone dialer

2010-06-26 Thread Jaap
Hi,

There are some programs to make calls via SIP with android. Nice thing
is that they work transparently. That is you can use the standard
android phone dialer but the call goes via SIP.

How can you use the android dialer to do this?

Thanks

Jaap

-- 
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: Is runtime mapview defining possible? (rather then in main.xml)

2010-06-26 Thread HeHe
it should be possible. one way is to put a framelayout on xml and in
activity do sxth like:

mapview mview=new mapview(this,getString(R.string.mapkey));

framelayout frame=(framelayout)findViewById(R.id.frame);

bframe.addView(mview,0,new
framelayout.layoutparams(FILL_PARENT,FILL_PARENT));


On Jun 26, 12:52 pm, ThomasWrobel darkfl...@gmail.com wrote:
 I've been trying to use a mapView in my app, and have been following
 the 
 tutorial;http://developer.android.com/resources/tutorials/views/hello-mapview

 However, I'd like to be able to generate the mapView at runtime, and
 assign it to a widget container. (rather then just having it as the
 route element in Main.xml as in the example).

 Is this possible?

 I tried just extending mapActivity as stated, and implementing the
 overrides.
 However, at the moment I'm getting this error;

 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):
 java.lang.IllegalAccessError: Class ref in pre-verified class resolved
 to unexpected implementation
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 dalvik.system.DexFile.defineClass(Native Method)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 dalvik.system.DexFile.loadClassBinaryName(DexFile.java:209)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:573)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 java.lang.ClassLoader.loadClass(ClassLoader.java:532)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.Instrumentation.newActivity(Instrumentation.java:1021)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2489)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2621)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.ActivityThread.access$2200(ActivityThread.java:126)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.os.Handler.dispatchMessage(Handler.java:99)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.os.Looper.loop(Looper.java:123)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 android.app.ActivityThread.main(ActivityThread.java:4595)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 java.lang.reflect.Method.invoke(Method.java:521)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:860)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 06-26 21:31:20.946: ERROR/AndroidRuntime(1845):     at
 dalvik.system.NativeStart.main(Native Method)
 

 Which I think might be because theres no where in my code or xml at
 the moment that defines where the mapView actually goes.
 I can't figure out how to assign it. (in this case to a page in my
 tabHost)

-- 
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] Download and install application

2010-06-26 Thread Nando Android
Hello all,

Is there any howto on donwloading via HTTP an application package and
installing it afterwards?

Thanks.

-- 
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: is this a bug in android OS

2010-06-26 Thread Bob Kerns
If you are in onCreate(), then you HAVE NOT BOUND THE SERVICE.

The call to bindService() just *starts* the process of creating and
binding the service. It does not complete until after you return from
onCreate(), at which point the service will be actually created, it's
onCreate() and onStart() methods will be called, and then, when it is
finally ready, only then will your onServiceConnected() callback be
called.

The code that you want to run that needs to access the service can be
placed in your onServiceConnected() method.

onServiceConnected() is NOT CALLED  from inside the bindService method
-- as I outlined above, it is called later, after your onCreate method
exits.

Otherwise, there would be no reason to even have the
onServiceConnected() method. You could just do that work right after,
and the IBinder could be the return value.

On Jun 25, 5:06 am, vineet ma...@vineetyadav.com wrote:
  are you calling it after you have binded ?

 YES, i have binded

  You are mentioning onCreate(), I just hope the code-sequence is the

 Please find my code a below..
 ---
 Activity Code
 public class Launcher extends Activity {
       private IMainService mService = null;
       TextView tView1 = null;
       String testvar1 = ;
       /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.status_display);
         tView1 = (TextView)findViewById(R.id.feed_service_status);

         bindService(new Intent(IMainService.class.getName()), serCon,
 Context.BIND_AUTO_CREATE);
             Button refresh_button =
 (Button)findViewById(R.id.refresh_button);
             refresh_button.setOnClickListener(new
 View.OnClickListener() {

                   @Override
                   public void onClick(View v) {
                         // TODO Auto-generated method stub
                         fill_vals();  ---Can access from here
                   }
             });
              fill_vals();   Cannot Access from here...
 mService goes null and throw nullpointerexception.
     }

     private void fill_vals() {
       String tets = ;
       try {
                   tets = mService.ServiceStatus();
             } catch (RemoteException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   tets = e.getMessage();
             }
     }

     public ServiceConnection serCon = new ServiceConnection() {

             @Override
             public void onServiceDisconnected(ComponentName name) {
                   // TODO Auto-generated method stub
             }

             @Override
             public void onServiceConnected(ComponentName name, IBinder
 service) {
                   // TODO Auto-generated method stub
                   mService = MainServiceImpl.asInterface(service);

             }
       };

 }

 --

  myServiceIntent = new Intent(this,service.class);
  this.bindService(myServiceIntent, mConnection,
  Context.BIND_AUTO_CREATE);

 I have tried setting intents all the ways, by this method, by method
 as i mentioned in code, tried by calling setClassName. but i dont
 think that does make difference.

 On Jun 25, 4:57 pm, MobDev developm...@mobilaria.com wrote:



  Well,
  are you calling it after you have binded ?
  You are mentioning onCreate(), I just hope the code-sequence is the
  right one, thus something like :

  myServiceIntent = new Intent(this,service.class);
  this.bindService(myServiceIntent, mConnection,
  Context.BIND_AUTO_CREATE);

  On 25 jun, 11:40, vineet ma...@vineetyadav.com wrote:

   i am usign a very simple scenario.
   i have a remote service created and binded properly.
   I can access service methods as described in the aidl interface but
   only from the click listener, and can never access using it using
   onCreate or other functions.

   i have tried 3 different approaches as available on books or net to
   consume service. however result is same.

   for instance if i create mSercvice as my Service class variable and in
   the interface i have method getStatus() which returns boolean.

   now after binding service if i call mService.getStatus() from
   onClickListener or ServiceConnection Stub, ican access very easily
   without a error.
   but if i try to get from onCreate (my app fetches parameter status
   from service), the value of mService gets null and system exits with
   Force Close (due to nullpointexception as from log).

   Now can somone please help, as i dont think the value should be null
   since the variable is declared globally. so how does the stuff goes..

   One of my friend on this group told, if you dont get output all times,
   its a bug.

   sorry for bad english...

-- 
You received this message because you are 

[android-developers] Re: Android libraries

2010-06-26 Thread deg
Will do.

I did try to duplicate this on a second machine, but no luck. I think
I've already trained myself in the right order of operations.

I'll try to remember what I did differently the first times.

David

On Jun 26, 2:30 am, Xavier Ducrohet x...@android.com wrote:
 that's really strange.

 If this happens again, can you check if you have the corresponding
 .class files in the bin folder of your project?

 Xav





 On Fri, Jun 25, 2010 at 2:10 AM, deg d...@degel.com wrote:
  I mean that it did not include the library classes at all. Somehow,
  even though all classes were visible at compile time (so the referring
  classes in the main app compiled without error), the library classes
  were not found at runtime, nor were they present when I spelunked into
  the .apk file.

  This presumably caused by some form of my operator error. But, it's
  not clear what I did wrong nor how I fixed it. (I'm still very much an
  Eclipse newbie).

  (That said, thanks for the auto-refresh tip. That will eliminate some
  other nagging annoyances I've had).

  David

  On Jun 25, 1:06 am, Xavier Ducrohet x...@android.com wrote:
  What do you mean by does not include the library classes?

  Does it not include the code at all, or does it seem to include an
  older version of it?

  If it the later, I think this may be due to how Eclipse handles the
  linked folder. For eclipse, the files inside src/ in the library is a
  different file from the one in the main project in the linked folder
  coming from the library.

  If you edit the one from the library, you have to refresh the main
  project so that it picks it up.

  I would change your workspace to automatically refresh, it's a lot
  safer/better/easier. It's in the preferences under General 
  Workspace.

  On Thu, Jun 24, 2010 at 6:07 AM, deg d...@degel.com wrote:
   Thanks.

   It would be great if you could publish a roadmap of how the library
   feature will look in the future.
   For example, it would be great if library project could depend on
   another library project. (Yes, I know I can use an external jar
   instead. I'm doing that now, but the experience is not as smooth as
   I'd like).

   Also, per my original message, above, I sometimes see cases where
   an .apk compiles without errors but does not include the library
   classes.

   David

   On Jun 23, 8:03 pm, Xavier Ducrohet x...@android.com wrote:
   That's correct.

   At the moment the manifest of the library is only used to compile the
   resource of the library and figure out its package name, so it doesn't
   need to contain permissions, activities, services, etc... used by the
   library.

   However, all projects using the library must include those in their
   own manifest.

   In the future (hopefully not too distant) we'll be able to merge the
   content of the library manifest so that you don't have to do it
   manually for all projects using the library.

   Xav

   On Wed, Jun 23, 2010 at 8:52 AM, String sterling.ud...@googlemail.com 
   wrote:
On Jun 23, 11:06 am, deg d...@degel.com wrote:

Also, what are the rules for AndroidManifest elements?
- Does the main package or an Android library (or both) need to
declare a uses-permission for something that happens in library code?
- If a library implements a BroadcastReceiver should it be declared 
in
its manifest, or that of the application (or both)?
- etc.

The library's manifest ONLY needs a manifest element with a
package=com.mylibrary.packagename attribute. This isn't in the docs
AFAIK, but was stated in a post on this group by the Android platform
dev responsible for libraries. I can attest that I've done mine this
way and it works fine.

String

--
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

   --
   Xavier Ducrohet
   Android SDK Tech Lead
   Google Inc.

   Please do not send me questions directly. Thanks!- Hide quoted text -

   - Show quoted text -

   --
   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

  --
  Xavier Ducrohet
  Android SDK Tech Lead
  Google Inc.

  Please do not send me questions directly. Thanks!

  --
  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] Re: Picking up contacts: difference in behaviour between HTC and NexusOne - SDK 2.1-update1

2010-06-26 Thread Jens Finkhaeuser
Hi!

Yeah, it helps, thanks. The Android docs contain a more detailed
recipe for maintaining support for older Android versions too (http://
developer.android.com/resources/articles/contacts.html). What gets me
is that on my stock 2.1-update1 (N1) everything works fine with the
deprecated URI, but on my user's Hero (HTC's version of 2.1-update1)
it doesn't. Seems that HTC misread deprecated as unsupported. Ugh.

Ah, well, if you solved your problem that way, I can do too. Thanks!

Jens

-- 
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: Download and install application

2010-06-26 Thread Lance Nanek
Do you mean doing it via code? Or do you mean how to explain to a user
how to do it manually?

On Jun 26, 4:47 pm, Nando Android nando.andr...@gmail.com wrote:
 Hello all,

 Is there any howto on donwloading via HTTP an application package and
 installing it afterwards?

 Thanks.

-- 
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] How to capture game screens on device

2010-06-26 Thread qwesthead
We write a game application where we load bitmaps continuously. I
would like to capture the content as video. I know through DDMS, I can
capture the screen shot, but how do I capture series of bitmaps
loaded?

-- 
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: How to fetch phone's phone number or unique ID

2010-06-26 Thread Indicator Veritatis
First of all, you should keep in mind that in the GSM world, the phone
number identifies the SIM, the user's account; it does not identify
the phone.

There is, however, in the android.telephony package, an method of the
TelephonyManager class called getDeviceId() that returns a unique ID
for the phone: IMEI for a GSM phone and MEID for CDMA.

There is also a getLine1Number() that returns the phone number, which
is probably not what you really want on a GSM phone. It might not even
be what you want on a CDMA phone, since there are obsure models with
two lines, and even more obscure models that take a SIM even on CDMA.

On Jun 25, 2:36 pm, Nando Android nando.andr...@gmail.com wrote:
 Hello,

 I wonder how could I fetch the phone's phone number or an unique id
 to identify it?

 Thanks.

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread Lance Nanek
I have to uncheck Show compatible hardware before Windows 7 will
offer Android ADB Interface for the Droid. Not that I know the
difference between the Android Composite ADB Interface driver I'm
using and the Android ADB Interface one you are using.

Is your USB driver that comes with the SDK up to date? I'm using Usb
Driver package, revision 3 according to the Android SDK and AVD
Manager. You can update it from the same in the available packages
section if yours is earlier. Then you have to go use the update
driver option in the device manager again to switch over to the
updated one.

On Jun 26, 3:25 pm, pcm2a reeeye...@gmail.com wrote:
 When I choose Dont search I will choose the driver to install I only
 get two things listed:
 - Android ADB Interface
 - USB Compisite Interface

 After installing and reinstalling the Motorola drivers 100 times I was
 hoping to see something extra in this list but nothing ever changes.

 On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:

  I ran into the same problem connecting both the Evo 4G and Droid to my
  Windows 7 Tablet PC. After installing the HTC software off the Evo's
  SD card, the Droid stopped working. I guess I did update a lot of SDK
  stuff around then too, so that's also a potential factor.

  I did eventually get both phones working at once. Basically I just
  tried lots of combinations of removing everything HTC/Motorola in
  remove programs, reinstalling them, connecting and disconnecting
  devices, and the star of the show: right clicking on devices in the
  device manager and choosing to update their drivers and picking a
  different one from the list of applicable drivers. You can use this,
  for example, to change a Mot Composite ADB Interface to an Android
  Composite ADB Interface by choosing the Android drivers instead of
  Motorola's.

  My currently working setup doesn't even have Motorola's software
  installed, but does have HTC's. There are several Android Composite
  ADB Interface for the Droid and other phones, and one My HTC, no
  Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
  but I had to uninstall Motorola, but whatever. Although if you have
  something pointing to a removed directory somehow I'd try fixing that
  first via similar right-clicking on devices and updating methods.
  Although I suspect what you are talking about there might just be a
  helpful last used location for something copied into system32/drivers
  anyway.

  On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:

   Still have no resolution for this issue.

   I have tried uninstalling and removing every single DLL that hte
   Android SDK USB Drivers comes with from my system.  Afterwards I
   installed the Motorola USB Drivers.  Next I plug in the Droid and all
   it does it keep erroring out looking for the old sdk usb folder, which
   I removed.

   On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

I have owned my Droid since day 1 and I have been doing Android
development, with ADB working, on my Windows 2003 Server laptop all
this time.  I'll try to be as detailed as possible.

Things to note right off the bat:
- Motorola Droid 2.1
- Windows Server 2003 laptop
- ADB has worked perfectly with this for ~ 8 months

My work gave me a HTC Evo to do some development on. I installed the
HTC drivers, ADB worked fine, did my development and now I am done
with the Evo. The problem is my Droid no longer works with ADB.

Here are some steps that I have tried:

Attempt A:
1. In device manager I have listed Android Phone-Android ADB
Interface
2. Right click-Uninstall
3. Scan for new hardware-Device shows up
4. Select this device, pick the usb drivers that come with the SDK
5. Various items install like ADB and Moto A855
6. Device manager looks exactly as it did in step 1.
7. ADB Doesnt work

Attempt B:
1. Start up USBDeview
2. Delete the HTC entry, Delete all the Motorola A855 entries
3. Go through the steps in Attempt A.
4. ADB Doesnt work

Attempt C:
1. Download Motorola 4.6.0 driver package and install it
2. Uninstall the current driver in device manager
3. Scan for drivers automatically
4. Drivers from SDK are automatically used
5. ADB not working
6. Go back and pick have disk for the driver. Tried every driver
than came with Mtorola 4.6.0 driver package and none would install.

Now I'm just stumped. Also important to note that the phone and ADB
still work fine on other computers that I never installed the HTC
drivers on.

Thanks for any tips!- Hide quoted text -

  - Show quoted text -

-- 
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 

[android-developers] Re: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread pcm2a
When I uncheck the Show compatible hardware box the ADB selection
disappears.

My ADK drivers are also revision 3.  However, that hasn't stopped me
from deleting them and download them several additional times through
the SDK.
I have also gone as far as to download random other SDK versions I
found floating about the internet.

I still can't find the one single place that tells it to keep looking
at the SDK for the drivers.  Somewhere in some registry setting or
file it's telling it hey go look in this usb_driver folder for
files.  I've deleted a billion things out of my registry but so far
no success.

On Jun 26, 5:49 pm, Lance Nanek lna...@gmail.com wrote:
 I have to uncheck Show compatible hardware before Windows 7 will
 offer Android ADB Interface for the Droid. Not that I know the
 difference between the Android Composite ADB Interface driver I'm
 using and the Android ADB Interface one you are using.

 Is your USB driver that comes with the SDK up to date? I'm using Usb
 Driver package, revision 3 according to the Android SDK and AVD
 Manager. You can update it from the same in the available packages
 section if yours is earlier. Then you have to go use the update
 driver option in the device manager again to switch over to the
 updated one.

 On Jun 26, 3:25 pm, pcm2a reeeye...@gmail.com wrote:



  When I choose Dont search I will choose the driver to install I only
  get two things listed:
  - Android ADB Interface
  - USB Compisite Interface

  After installing and reinstalling the Motorola drivers 100 times I was
  hoping to see something extra in this list but nothing ever changes.

  On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:

   I ran into the same problem connecting both the Evo 4G and Droid to my
   Windows 7 Tablet PC. After installing the HTC software off the Evo's
   SD card, the Droid stopped working. I guess I did update a lot of SDK
   stuff around then too, so that's also a potential factor.

   I did eventually get both phones working at once. Basically I just
   tried lots of combinations of removing everything HTC/Motorola in
   remove programs, reinstalling them, connecting and disconnecting
   devices, and the star of the show: right clicking on devices in the
   device manager and choosing to update their drivers and picking a
   different one from the list of applicable drivers. You can use this,
   for example, to change a Mot Composite ADB Interface to an Android
   Composite ADB Interface by choosing the Android drivers instead of
   Motorola's.

   My currently working setup doesn't even have Motorola's software
   installed, but does have HTC's. There are several Android Composite
   ADB Interface for the Droid and other phones, and one My HTC, no
   Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
   but I had to uninstall Motorola, but whatever. Although if you have
   something pointing to a removed directory somehow I'd try fixing that
   first via similar right-clicking on devices and updating methods.
   Although I suspect what you are talking about there might just be a
   helpful last used location for something copied into system32/drivers
   anyway.

   On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:

Still have no resolution for this issue.

I have tried uninstalling and removing every single DLL that hte
Android SDK USB Drivers comes with from my system.  Afterwards I
installed the Motorola USB Drivers.  Next I plug in the Droid and all
it does it keep erroring out looking for the old sdk usb folder, which
I removed.

On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

 I have owned my Droid since day 1 and I have been doing Android
 development, with ADB working, on my Windows 2003 Server laptop all
 this time.  I'll try to be as detailed as possible.

 Things to note right off the bat:
 - Motorola Droid 2.1
 - Windows Server 2003 laptop
 - ADB has worked perfectly with this for ~ 8 months

 My work gave me a HTC Evo to do some development on. I installed the
 HTC drivers, ADB worked fine, did my development and now I am done
 with the Evo. The problem is my Droid no longer works with ADB.

 Here are some steps that I have tried:

 Attempt A:
 1. In device manager I have listed Android Phone-Android ADB
 Interface
 2. Right click-Uninstall
 3. Scan for new hardware-Device shows up
 4. Select this device, pick the usb drivers that come with the SDK
 5. Various items install like ADB and Moto A855
 6. Device manager looks exactly as it did in step 1.
 7. ADB Doesnt work

 Attempt B:
 1. Start up USBDeview
 2. Delete the HTC entry, Delete all the Motorola A855 entries
 3. Go through the steps in Attempt A.
 4. ADB Doesnt work

 Attempt C:
 1. Download Motorola 4.6.0 driver package and install it
 2. Uninstall the current driver in device manager
 3. Scan for drivers automatically

[android-developers] has any1 tried hsqldb

2010-06-26 Thread vineet
As boasted by site http://hsqldb.org

this is a full rdbms completely java based and also most sql commands.

it is lightweight and full security with user right managements..

Please reply if any1 has tried it...

Thanx

-- 
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: Moto Droid ADB Drivers no longer work after HTC Evo was used.

2010-06-26 Thread schwiz
when it detects the device goto the properties and select install
driver and then pick from existing installed drivers and pick adb from
another android phone.

On Jun 26, 5:54 pm, pcm2a reeeye...@gmail.com wrote:
 When I uncheck the Show compatible hardware box the ADB selection
 disappears.

 My ADK drivers are also revision 3.  However, that hasn't stopped me
 from deleting them and download them several additional times through
 the SDK.
 I have also gone as far as to download random other SDK versions I
 found floating about the internet.

 I still can't find the one single place that tells it to keep looking
 at the SDK for the drivers.  Somewhere in some registry setting or
 file it's telling it hey go look in this usb_driver folder for
 files.  I've deleted a billion things out of my registry but so far
 no success.

 On Jun 26, 5:49 pm, Lance Nanek lna...@gmail.com wrote:



  I have to uncheck Show compatible hardware before Windows 7 will
  offer Android ADB Interface for the Droid. Not that I know the
  difference between the Android Composite ADB Interface driver I'm
  using and the Android ADB Interface one you are using.

  Is your USB driver that comes with the SDK up to date? I'm using Usb
  Driver package, revision 3 according to the Android SDK and AVD
  Manager. You can update it from the same in the available packages
  section if yours is earlier. Then you have to go use the update
  driver option in the device manager again to switch over to the
  updated one.

  On Jun 26, 3:25 pm, pcm2a reeeye...@gmail.com wrote:

   When I choose Dont search I will choose the driver to install I only
   get two things listed:
   - Android ADB Interface
   - USB Compisite Interface

   After installing and reinstalling the Motorola drivers 100 times I was
   hoping to see something extra in this list but nothing ever changes.

   On Jun 26, 1:47 pm, Lance Nanek lna...@gmail.com wrote:

I ran into the same problem connecting both the Evo 4G and Droid to my
Windows 7 Tablet PC. After installing the HTC software off the Evo's
SD card, the Droid stopped working. I guess I did update a lot of SDK
stuff around then too, so that's also a potential factor.

I did eventually get both phones working at once. Basically I just
tried lots of combinations of removing everything HTC/Motorola in
remove programs, reinstalling them, connecting and disconnecting
devices, and the star of the show: right clicking on devices in the
device manager and choosing to update their drivers and picking a
different one from the list of applicable drivers. You can use this,
for example, to change a Mot Composite ADB Interface to an Android
Composite ADB Interface by choosing the Android drivers instead of
Motorola's.

My currently working setup doesn't even have Motorola's software
installed, but does have HTC's. There are several Android Composite
ADB Interface for the Droid and other phones, and one My HTC, no
Mot Composite ADB Interface. Kind of sad HTC screwed everything up,
but I had to uninstall Motorola, but whatever. Although if you have
something pointing to a removed directory somehow I'd try fixing that
first via similar right-clicking on devices and updating methods.
Although I suspect what you are talking about there might just be a
helpful last used location for something copied into system32/drivers
anyway.

On Jun 26, 12:52 pm, pcm2a reeeye...@gmail.com wrote:

 Still have no resolution for this issue.

 I have tried uninstalling and removing every single DLL that hte
 Android SDK USB Drivers comes with from my system.  Afterwards I
 installed the Motorola USB Drivers.  Next I plug in the Droid and all
 it does it keep erroring out looking for the old sdk usb folder, which
 I removed.

 On Jun 25, 11:52 am, pcm2a reeeye...@gmail.com wrote:

  I have owned my Droid since day 1 and I have been doing Android
  development, with ADB working, on my Windows 2003 Server laptop all
  this time.  I'll try to be as detailed as possible.

  Things to note right off the bat:
  - Motorola Droid 2.1
  - Windows Server 2003 laptop
  - ADB has worked perfectly with this for ~ 8 months

  My work gave me a HTC Evo to do some development on. I installed the
  HTC drivers, ADB worked fine, did my development and now I am done
  with the Evo. The problem is my Droid no longer works with ADB.

  Here are some steps that I have tried:

  Attempt A:
  1. In device manager I have listed Android Phone-Android ADB
  Interface
  2. Right click-Uninstall
  3. Scan for new hardware-Device shows up
  4. Select this device, pick the usb drivers that come with the SDK
  5. Various items install like ADB and Moto A855
  6. Device manager looks exactly as it did in step 1.
  7. ADB Doesnt work

  Attempt B:
  1. Start up USBDeview
  

Re: [android-developers] Re: How to fetch phone's phone number or unique ID

2010-06-26 Thread Nando Android
Exactly, I want an unique ID to it.

How can I call it? Do I have to instantiate something?

Thanks,

On Sat, Jun 26, 2010 at 4:25 PM, Indicator Veritatis mej1...@yahoo.comwrote:

 First of all, you should keep in mind that in the GSM world, the phone
 number identifies the SIM, the user's account; it does not identify
 the phone.

 There is, however, in the android.telephony package, an method of the
 TelephonyManager class called getDeviceId() that returns a unique ID
 for the phone: IMEI for a GSM phone and MEID for CDMA.

 There is also a getLine1Number() that returns the phone number, which
 is probably not what you really want on a GSM phone. It might not even
 be what you want on a CDMA phone, since there are obsure models with
 two lines, and even more obscure models that take a SIM even on CDMA.

 On Jun 25, 2:36 pm, Nando Android nando.andr...@gmail.com wrote:
  Hello,
 
  I wonder how could I fetch the phone's phone number or an unique id
  to identify it?
 
  Thanks.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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

Re: [android-developers] Re: Download and install application

2010-06-26 Thread Nando Android
I would like to do it via code. Do a HTTP request, get the package and then
install it. Is there any example out there for it?

Thanks.

On Sat, Jun 26, 2010 at 4:10 PM, Lance Nanek lna...@gmail.com wrote:

 Do you mean doing it via code? Or do you mean how to explain to a user
 how to do it manually?

 On Jun 26, 4:47 pm, Nando Android nando.andr...@gmail.com wrote:
  Hello all,
 
  Is there any howto on donwloading via HTTP an application package and
  installing it afterwards?
 
  Thanks.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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: Retrieve Image size for HTC devices

2010-06-26 Thread joebowbeer
Is inputStream.available() guaranteed to work in this case?  I read
that input streams for assets and resources are defined to work in
this way, but I wouldn't assume that this also applies to sdcard
files.

The alternative I'd try is:

  ParcelFileDescriptor fd = contentResolver.openFileDescriptor(uri,
mode);
  try {
fileSize = fd.getStatSize();
  } finally {
fd.close();
  }

Joe

On Jun 15, 3:17 pm, sazilla sazi...@gmail.com wrote:
 Hi all,

 In my application I need to read Images filesizebefore reading and
 send them through the network.
 Actually it uses the MediaStore provider in order to read theSIZE
 field of the Images.
 All works as expected except for someHTCdevices (e.g. Legend and
 Desire) where the returnedSIZEvalue is not correct (it seems that
 only after a device reboot it stores the correct sizes).
 For that reason I applied a workaround for such devices that makes use
 of the InputStream.available() method in order to get the realImagesize.
 I know that it is not the best way to do that but I didn't find
 alternatives.

 Can somebody help me on that issue?
 Carlo

-- 
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


Re: [android-developers] Re: Mapping (x,y) to (latitude,longitude)

2010-06-26 Thread Brad Gies

I hope it's generic for all zoom levels.. it should be :).

How it works is that Google Maps at a zoom level of 1 displays the 
entire world in 256 pixels... When you go to zoom level 2 you get half 
the world in 256 pixels, zoom level 3 is 1/4 the world in 256 pixels... 
which is the same as 1 divided by 2 (to the power of zoom level - 
1), so the Math.pow(2, zoomLevel - 1) just gets the number that 
corresponds to what you need to adjust by for the zoom level.


All these functions could be (and will be) combined into about 3 lines 
for production.. but I just needed to step through it one step at a time 
to test it out.


The double entireWorld = zoomToPower * 256;  just calculates how many 
pixels it would take to show the entire world (height or width)


and then I just brought it down to 1 degree so I could check the 
calculations against a map and see what I was doing :).

double OneDegree = entireWorld / 360;

This calculates how much of a degree your screen will show for both the 
height and width of your screen. I subtracted 40 pixels from the height 
because that's roughly what my activity uses... and I didn't care if I 
was exact.. I only want very close. I use it to call a web service and I 
pass the Map Center latitude and longitude to the web service along with 
the screen size (in degrees),

double heightSpan = (display.getHeight() - 40) / OneDegree;
double widthSpan = display.getWidth() / OneDegree;



and this is how I used it. Because my function returns the fraction of a 
degree that will show on the screen, I adjust the getLatitudeSpan() 
function to pass the same value by dividing it by 1E6. Again that should 
be combined for production.


LatLonSpans latLonSpans = getSpans();
 if (mapView.getLatitudeSpan() == 0)
 {
 nvps.add(new BasicNameValuePair(latitudespan, 
String.valueOf(latLonSpans.LatSpan)));

 }
 else
 {
 double latSpan = mapView.getLatitudeSpan() / 1E6;
 nvps.add(new BasicNameValuePair(latitudespan, 
String.valueOf(latSpan)));

 }
  also do the Longitude
 and latLonSpans = null;


My function returns the percentage of a degree that your entire screen 
will show, so I pass the map center lat and lon to the server with the 
latLonSpan values and then on the server end, I use almost the same 
calculation you do:


int topLatitude = mapCenter (latitude) + (latSpanPassed /2);
int bottomLatitude = mapCenter (latitude) - (latSpanPassed/2);
int leftLongitude = mapCenter (longitude) - (lonSpanPassed /2);
int rightLongitude = mapCenter (longitude) + (lonSpanPassed /2);




On 26/06/2010 8:47 AM, Pedro Teixeira wrote:

Hi Brad,

Thanks for your solution. I'm trying to understand how it works.
Is this generic for all zoom levels?
I don't know how to implement the if condition snippet of your code. 
Something is missing me or I'm not understanding it right.

Can you explain this value:
latSpan/1E6, is this the simple getLatitudeSpan?

I'm sorry, I'm a little bit overwhelmed with this problem for some 
days and I've been really confused.


On Jun 26, 2010, at 3:53 AM, Brad Gies wrote:


Pedro,

I've been working on roughly the same thing today... see the thread  
MapView.getLatitudeSpan..


All you're running into is that the map isn't ready when you are 
asking for the getLatitudeSpan, so you need to wait until it is 
ready...OR...

the formula I've come up with to calculate it is this :

Note that I don't expect this formula is perfect.. and I can 
certainly make it more compact and faster by reworking it, but for 
working on it I wanted to do it step by step :).


   private class LatLonSpans
   {
   @SuppressWarnings(unused)
   public double LatSpan = 0.0;
   @SuppressWarnings(unused)
   public double LonSpan = 0.0;
   }

   private LatLonSpans getSpans()
   {
   LatLonSpans latLonSpans = new LatLonSpans();
   Display display = getWindowManager().getDefaultDisplay();
   int width = display.getWidth();
   int height = display.getHeight();


   int zoomLevel = mapView.getZoomLevel();
   // zoomToPower times 256 should be equal to the pixels 
required to view the entire world

   // at the resolution I've set.
   double zoomToPower = Math.pow(2, zoomLevel - 1);
   // it takes 256 pixels to view the entire world at resolution 
1, so this should be the pixels required to view the entire world

   // at the resolution I've set.
   double entireWorld = zoomToPower * 256;
   // Now I need to scale the zoomToPower to my screen size to 
figure

   // out what I'm really going to see.
   //
   // this is how many pixels to see 1 degree.
   double OneDegree = entireWorld / 360;
   // and for height we have x pixels minus 40 to account for 
top bars. so we will see this much of a degree.

   double heightSpan = (height - 40) / OneDegree;
   double widthSpan = width / OneDegree;

   

[android-developers] Re: AIDL, Binder, ResultReceiver, and Performance

2010-06-26 Thread john brown
While reading this thread, I mistakenly clicked report as spam. I
immediately hoped for a confirmation dialog but none appeared. I only
got the notice that it had indeed been reported as spam.

It was done in error. I apologize for my error.

Thanks, John Brown

On Jun 26, 10:36 am, Jeff Sharkey jshar...@android.com wrote:
  If the purpose of this code (and I haven't looked at it to know) is to send
  a command to the service and get told later when it is done, then this is a
  reasonable approach.

 Yep, that's exactly what I'm using it for.  I'm kicking off a heavy
 background sync, and use an optional ResultReceiver to pass back
 success/failure along with any Exception text for Toast'ing to the
 user.

  Not my team's app...  I've not looked at the code, either. :}

 The app was written by two engineers on the Android team, but not
 anyone specifically working on the framework.

 --
 Jeff Sharkey
 jshar...@android.com

-- 
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: How to capture game screens on device

2010-06-26 Thread Lance Nanek
I've been trying to find a good way myself, although for Android
OpenGL games. Some options I've considered:

1 - There's a utility called dr...@screen which can do continuous
captures. It's useless for real-time OpenGL, however, because it ends
up with parts of different frames.

2 - The emulator is low frame rate and low graphics quality besides,
so I haven't tried capturing it via any screen recording software.

3 - I haven't convinced Android x86 running in a VM to run at Android
standard resolution yet. It should be easy to capture video from it
similarly if I ever do.

4 - I picked up a document camera, but it can only output video, not
capture it. Guess an extra capture card or USB dongle would do the job
there.

5 - Some Android phones can supposedly output apps to TV output, which
could also do the job combined with a capture device.

6 - I don't know about what you're doing, but there are a few
frameworks for running OpenGL games on both Android and PC, which
could handle the game screens at least, although not the Android UI
ones. Screen capture software would work again there.

7 - I tried pointing a video camera at the phone, but didn't like the
quality. Could try a different camera/lighting/settings, I guess.

Maybe one of those would work for you.

On Jun 26, 6:14 pm, qwesthead qwesth...@gmail.com wrote:
 We write a game application where we load bitmaps continuously. I
 would like to capture the content as video. I know through DDMS, I can
 capture the screen shot, but how do I capture series of bitmaps
 loaded?

-- 
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: OpenGL EGL 1.0 Context sharing does not work

2010-06-26 Thread Lance Nanek
Does the G1 driver support that?
http://groups.google.com/group/android-framework/browse_thread/thread/49dd4346c3324c53

On Jun 23, 4:51 pm, OpenG openg.andr...@gmail.com wrote:
 Hello,

 I have problems sharing texture resource between two OGL contexts.

 I have created two OGL contexts using
 EGL10.eglCreateContext(EGLDisplay display, EGLConfig config,
 EGLContext share_context, int[] attrib_list) method. Then creating
 second context I pass the first OGL Context as parameter
 share_context. By OpenGL specs this means that resource (like
 textures, VBO's) should be shared by these two contexts.

 After I do makeCurrent with these contexts in two separate threads
 (one using windowSurface, another - pbufferSurface).

 But the problem is if i load texture into the first OGL context I can
 not access this resource from the second context. It looks like these
 contexts do not share resources at all.

 Can somebody confirm this is a bug in OpenGL implementation?

 Tested on Emulator, G1 and Milestone.

 Context creation code:
 mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT,
 null);
 if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) {
   throw new RuntimeException(createContext failed);

 }

 mSecEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig,
 mEglContext, null);
 if (mSecEglContext == null || mSecEglContext == EGL10.EGL_NO_CONTEXT)
 {
    throw new RuntimeException(Secondary createContext failed);

 }

-- 
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: Package com.google.android.gtalkservice importing problem

2010-06-26 Thread Lance Nanek
The GTalk classes have been removed from the public API and the bug
report declined:
http://code.google.com/p/android/issues/detail?id=201

On Jun 23, 8:19 am, madhusudhan reddy madhusdu...@gmail.com wrote:
 Hi,

 I am not able to import com.google.android.gtalkservice package
 application in version 1.5(level 3).Actually that gtalkservice.jar
 file is under /sytem/frmaework/ is there.If i copy as external jar
 into prject even showing errors.

 If i do Gtalk application in Android 1.5 will it work on 2.2 or 2.1?
 Please give me any suggestion to implement Gtalk app in android.

 Thanks and Regards,
 madhusudhan

-- 
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: Opening local URLs using the emulator browser

2010-06-26 Thread kypriakos
Hi Mike,

super - yes I was referring to such pages ...

Now, if I want the user to be able to open the web page (that includes
a
set of javascript scripts) how would the user address the page from
the browser?

On Jun 24, 3:34 pm, mike enervat...@gmail.com wrote:
 On 06/24/2010 12:29 PM, kypriakos wrote:

  Is it possible for the emulator's browser to read the local disk on
  the machine it is running
  on and read/execute javascript code? All I was able to achieve was to
  open public URLs
  - even though I have not managed yet to get it to connect to the
  public Net.

 Assuming you mean a html page coming from the local file system
 that is in your app bundle, the answer is yes.

 yourwebview.loadDataWithBaseURL (file:///android_asset/, page,
 text/html, utf-8, null);

 where page is something like R.raw.yourwebpage. All you need to do is put
 your html files in res/raw and it works like a charm.

 Mike

-- 
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