[android-developers] Re: Where are the HTC dev phone 1 image package links?

2010-01-07 Thread Noah Tilton
Hi,

On Dec 21 2009, 7:02 am, Andreas Lundgren
 wrote:
> Hi!
>
> I've just got this answer from HTC office:
>
> Question:
> "The links under "Download the Image Packages" on the 
> pagehttp://developer.htc.com/adp.html#s3are still missing. When do HTC
> plan to support upgrate to Android 1.6 for the developers phone (HTC
> Dream)? Do you plan to support upgrate to Android 2.0 for the Dev
> Phone in the future?"
>
> Answer (Nordics Support (Tech))
> "Thanks for your email. We are aware of this issue and are awaiting
> our US office to reinstate these links and download files. We have
> requested it but as it is now the holdiays, it may take a few days
> before it is fixed. As for 2.0, i do not know. Only the US office
> would be able to answer this question, as i know there were issues
> with the memory on the ADP1/Dream, and it may not physically be able
> to run 2.0/2.1 Best regards, HTC Technical Support"
>
> FYI,
> Andreas L
> Sweden

As of today the links are still non-functioning; I'm giving up.

Thanks,
Noah
-- 
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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread Nymann
Hi

Maybe something like the following ... (i havent tried the code)

Timer timer = new Timer( true);

timer.scheduleAtFixedRate(new TimerTask() {

@Override
public void run() {
Toast t = new Toast(context);
t.makeText(context, "Test Toast",
Toast.LENGTH_SHORT);
t.show();

}
}, new Date(),3000);


Kind regards Per

On Jan 7, 7:28 am, Manoj  wrote:
> Hi,
>
> Please help me out on the issue as I want to make a Toast to promt
> again and again on screen by a service running in background. Please
> suggest me the way how to make this done.
>
> manoj chauhan
-- 
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: Problems with the JavaBinder (!!! FAILED BINDER TRANSACTION!!!)

2010-01-07 Thread Moritzz
Looks like I finally solved it. It was linked to some variables I kept
for the whole runtime of the service (context and stuff like that).
Now that I'm not using them as class variables but local ones in the
functions it works.

Cheers

Moritz

On Jan 6, 11:14 am, Moritzz  wrote:
> I tried it but it didn't change a thing. The images are pretty small
> (just a few kilobyte as they are application icons) anyway. But I
> figured something new out: If I continue to load them, I finally get
> an OutOfMemoryException as mentioned in some sources and threads I
> already read, including yours. Thing is, I have no clue how to find my
> mistake(s) in the code and fix them. So here's some of my code:
>
> First the function to get the images:
>
> private Bitmap getIconFormServer(String url) {
>         Bitmap bm = null;
>         HttpClient httpClient = new DefaultHttpClient();
>         HttpGet getMethod = new HttpGet(url);
>         HttpResponse response;
>         getMethod.setHeader("Accept", "application/json");
>         getMethod.setHeader("Content-type", "application/json");
>         getMethod.setHeader("Accept-Encoding", "gzip");
>         try {
>                 response = httpClient.execute(getMethod);
>                 InputStream inputStream = response.getEntity().getContent();
>                 Header contentEncoding = response.getFirstHeader("Content-
> Encoding");
>                 if (contentEncoding != null && contentEncoding.getValue
> ().equalsIgnoreCase("gzip")) {
>                         inputStream = new GZIPInputStream(inputStream);
>                 }
>                 bm = new BitmapDrawable(inputStream).getBitmap();
>         } catch (Exception e) {
>                 return null;
>         } finally {
>                 getMethod.abort();
>                 inputStream.close();
>         }
>         return bm;
>
> }
>
> This one is called inside the service that's supposed to update the
> widget. So I'm getting my pictures and update the widget out of the
> service with
>
> context = getApplicationContext();
> thisWidget = new ComponentName(context, XWidget.class);
> widgetManager = AppWidgetManager.getInstance(context);
> widgetView = new RemoteViews(context.getPackageName(),
> R.layout.widget);
>
> and then later:
>
> widgetView.setImageViewBitmap(id.getButton(), bitmap);
> widgetManager.updateAppWidget(thisWidget, widgetView);
>
> Cheers
>
> Moritz
>
> On Jan 5, 6:43 pm, Albert  wrote:
>
> > The problem is probably that the images are too big and android cant
> > handle it. Try this solution I used when I had the same problem:
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > Hope it helps,
>
> > Alberto
>
> > On Jan 5, 4:17 pm, Moritzz  wrote:
>
> > > I now tried to get some more information but nothing I found helped so
> > > far. I also tried to encircle it some more but it won't work. Does
> > > nobody have an idea or sthg?
>
> > > Cheers
>
> > > Moritz
>
> > > On Jan 4, 9:51 pm, Moritzz  wrote:
>
> > > > I forgot to add that after this message, the widget is not updated
> > > > anymore. It stays the way it looks like in the moment the message
> > > > appears and even when I force another update, it's not changed
> > > > anymore. If I remove and add it again, it works for a while, until the
> > > > message appears again.
>
> > > > On Jan 4, 9:41 pm, Moritzz  wrote:
>
> > > > > Hello,
>
> > > > > I currently have a lot of problems with this error. I programmed a
> > > > > widget and a service that runs in the background. This service is
> > > > > updating the widget on different occasions (position changed, screen
> > > > > turned on, timer based...) with images and text it's loading from a
> > > > > server. After a couple of updates I always get an error from the
> > > > > JavaBinder, at least that's what DDMS says. Reproducing the problem
> > > > > with my app is quite easy but I just can't figure out what's going on
> > > > > there. Can someone please give me some help or hints with that? That'd
> > > > > be really cool!
>
> > > > > Cheers
>
> > > > > Moritz- 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] Re: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread Nymann
I Just searched this, it would not work, u need to use a Handler to
update the GUI.


On Jan 7, 9:15 am, Nymann  wrote:
> Hi
>
> Maybe something like the following ... (i havent tried the code)
>
> Timer timer = new Timer( true);
>
>         timer.scheduleAtFixedRate(new TimerTask() {
>
>             @Override
>             public void run() {
>                 Toast t = new Toast(context);
>                 t.makeText(context, "Test Toast",
> Toast.LENGTH_SHORT);
>                 t.show();
>
>             }
>         }, new Date(),3000);
>
> Kind regards Per
>
> On Jan 7, 7:28 am, Manoj  wrote:
>
>
>
> > Hi,
>
> > Please help me out on the issue as I want to make a Toast to promt
> > again and again on screen by a service running in background. Please
> > suggest me the way how to make this done.
>
> > manoj chauhan
-- 
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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread Manoj
ya you are right but in my code in doServiceWork() method its not
working


public class TestService extends Service
{

public static FileScanner MAIN_ACTIVITY;

private Timer timer=new Timer();

private static long UPDATE_INTERVAL = 1*60*10;  //default

private static long DELAY_INTERVAL = 0;


// hooks main activity here
public static void setMainActivity(FileScanner activity)
{
  MAIN_ACTIVITY = activity;
}

/*
 * not using ipc...but if we use in future
 */
public IBinder onBind(Intent intent) {
  return null;
}

@Override
public void onCreate()
{
  super.onCreate();

  _startService();

  if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
"FileScannerService started");
}

@Override
public void onDestroy()
{
  super.onDestroy();

  _shutdownService();

  if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
"FileScannerService stopped");
}


/*
 * starting the service
 */
private void _startService()
{
  timer.scheduleAtFixedRate(

  new TimerTask() {

public void run() {

try{

doServiceWork();

Thread.sleep(UPDATE_INTERVAL);

}catch(InterruptedException ie){

Log.e(getClass().getSimpleName(),
"FileScannerService InterruptedException"+ie.toString());
}

}
  },
  DELAY_INTERVAL,
  UPDATE_INTERVAL);

  Log.i(getClass().getSimpleName(), "FileScannerService Timer
started");
}

/*
 * start the processing, the actual work, getting config params,
get data from network etc
 */
private void doServiceWork()
{


///code for work to be done



}

/*
 * shutting down the service
 */
private void _shutdownService()
{
  if (timer != null) timer.cancel();
  Log.i(getClass().getSimpleName(), "Timer stopped...");
}
}







On Jan 7, 1:15 pm, Nymann  wrote:
> Hi
>
> Maybe something like the following ... (i havent tried the code)
>
> Timer timer = new Timer( true);
>
>         timer.scheduleAtFixedRate(new TimerTask() {
>
>             @Override
>             public void run() {
>                 Toast t = new Toast(context);
>                 t.makeText(context, "Test Toast",
> Toast.LENGTH_SHORT);
>                 t.show();
>
>             }
>         }, new Date(),3000);
>
> Kind regards Per
>
> On Jan 7, 7:28 am, Manoj  wrote:
>
> > Hi,
>
> > Please help me out on the issue as I want to make a Toast to promt
> > again and again on screen by a service running in background. Please
> > suggest me the way how to make this done.
>
> > manoj chauhan
-- 
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: Nine patch pre-scaling on Hdpi

2010-01-07 Thread Romain Guy
Both are scaled using the same techniques, it might be something in
the original image.

On Wed, Jan 6, 2010 at 11:41 PM, Pixie  wrote:
> Thanks for your responses.
> I know I can fix this by creating a high density image, but in the
> first place, the reason I didn’t do it is because my application is
> working on version 1.5, which, as you probably know, does not support
> density-specific resources.
> I have more than one way to solve this problem, one of them is as you
> suggested, but I’m still interested to know the difference between a
> regular PNG and a 9-patch PNG, when it comes to scaling up.
>
> Thanks again
>
>
> On Jan 6, 12:41 am, Dianne Hackborn  wrote:
>> I would strongly recommend making density-specific resources.  Graphics
>> scaled from one density to another (especially going up) are never going to
>> look as good as ones designed for the density.
>>
>> Plus doing the pre-scaling on 9-patch images is...  interesting. :)  It's
>> actually amazing to me that it works as well as it does, but it is certainly
>> far from perfect.
>>
>>
>>
>> On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey  wrote:
>> > The easiest thing I can think of is to make high density images and
>> > see if that fixes the problem. I know that fix isn't the best but it
>> > might work.
>>
>> > On Jan 5, 7:31 am, Pixie  wrote:
>> > > Hello everyone,
>>
>> > > I have some 9-patch images on my app, and they work great on the
>> > > medium density.
>> > > When I load the app on a High density emulator/device, these images
>> > > look grainy.
>> > > It happens only to 9-patch images. The others look great after the pre-
>> > > scaling.
>> > > Is there a way to make them look good after the scaling, like the
>> > > non-9-patch images?
>>
>> > > 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
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them
-- 
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 Nexus One as a development phone: Problem with USB driver under windows 7 64 bit

2010-01-07 Thread SoftwareForMe.com SoftwareForMe.com
Interesting.

I downloaded rev 3 of the driver pack, but could not find the proper driver.

I eventually downloaded it from a forum, here:
http://forum.xda-developers.com/showthread.php?t=613054

SoftwareForMe.com
Makers of PhoneMyPC
& Imagine Multi-touch

On Wed, Jan 6, 2010 at 7:59 PM, Xavier Ducrohet  wrote:

> Yesterday, we've pushed a new USB driver on the SDK updater repository
> (rev 3) to support the Nexus One, did you download it?
>
> Xav
>
> On Wed, Jan 6, 2010 at 7:51 PM, Streets Of Boston
>  wrote:
> > Hi everyone,
> >
> > I've been using my G1 under Windows 7 64-bit and Eclipse just fine.
> >
> > However, when using my new Nexus One instead - and making sure that
> > 'Use Debugging' is enabled - the Nexus One is not recognized and
> > debugging on this phone is not possible.
> >
> > Usig the Nexus One as a removable-drive (by mounting it) works fine.
> >
> > How can I start using the Nexus one as a development device (on
> > Eclipse)?
> >
> > 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
> >
>
>
>
> --
> 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@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
>
-- 
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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread Nymann
Hi

final Context context = getApplicationContext();
final Handler handler = new Handler(new Callback() {

public boolean handleMessage(Message msg) {
final Toast t = new Toast(context);
Toast makeText = t.makeText(context, "Test Toast",
Toast.LENGTH_SHORT);
makeText.show();

return true;
}
});
Timer timer = new Timer( true);

timer.scheduleAtFixedRate(new TimerTask() {

@Override
public void run() {
Log.d("Timertask", "Tick");
handler.sendMessage(new Message());
}
}, new Date(),2000);


This works .. haven't tried it in a service though.. but work in an
activity (so i think it works also)



On Jan 7, 9:35 am, Manoj  wrote:
> ya you are right but in my code in doServiceWork() method its not
> working
>
> public class TestService extends Service
> {
>
>     public static FileScanner MAIN_ACTIVITY;
>
>     private Timer timer=new Timer();
>
>     private static long UPDATE_INTERVAL = 1*60*10;  //default
>
>     private static long DELAY_INTERVAL = 0;
>
>     // hooks main activity here
>     public static void setMainActivity(FileScanner activity)
>     {
>       MAIN_ACTIVITY = activity;
>     }
>
>     /*
>      * not using ipc...but if we use in future
>      */
>     public IBinder onBind(Intent intent) {
>       return null;
>     }
>
>     @Override
>     public void onCreate()
>     {
>       super.onCreate();
>
>       _startService();
>
>       if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
> "FileScannerService started");
>     }
>
>     @Override
>     public void onDestroy()
>     {
>       super.onDestroy();
>
>       _shutdownService();
>
>       if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
> "FileScannerService stopped");
>     }
>
>     /*
>      * starting the service
>      */
>     private void _startService()
>     {
>       timer.scheduleAtFixedRate(
>
>               new TimerTask() {
>
>                     public void run() {
>
>                         try{
>
>                         doServiceWork();
>
>                         Thread.sleep(UPDATE_INTERVAL);
>
>                         }catch(InterruptedException ie){
>
>                             Log.e(getClass().getSimpleName(),
> "FileScannerService InterruptedException"+ie.toString());
>                         }
>
>                     }
>                   },
>                   DELAY_INTERVAL,
>                   UPDATE_INTERVAL);
>
>       Log.i(getClass().getSimpleName(), "FileScannerService Timer
> started");
>     }
>
>     /*
>      * start the processing, the actual work, getting config params,
> get data from network etc
>      */
>     private void doServiceWork()
>     {
>
> ///code for work to be done
>
>     }
>
>     /*
>      * shutting down the service
>      */
>     private void _shutdownService()
>     {
>       if (timer != null) timer.cancel();
>       Log.i(getClass().getSimpleName(), "Timer stopped...");
>     }
>
> }
>
> On Jan 7, 1:15 pm, Nymann  wrote:
>
>
>
> > Hi
>
> > Maybe something like the following ... (i havent tried the code)
>
> > Timer timer = new Timer( true);
>
> >         timer.scheduleAtFixedRate(new TimerTask() {
>
> >             @Override
> >             public void run() {
> >                 Toast t = new Toast(context);
> >                 t.makeText(context, "Test Toast",
> > Toast.LENGTH_SHORT);
> >                 t.show();
>
> >             }
> >         }, new Date(),3000);
>
> > Kind regards Per
>
> > On Jan 7, 7:28 am, Manoj  wrote:
>
> > > Hi,
>
> > > Please help me out on the issue as I want to make a Toast to promt
> > > again and again on screen by a service running in background. Please
> > > suggest me the way how to make this done.
>
> > > manoj chauhan
-- 
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] Need Help : canvas.drawtext() for a lengthy string

2010-01-07 Thread Latha Shivanna
Hi All

I am stuck in a very simple problem.

I have one lengthy string & I need to draw that on the device display.

My code is as follows:

void ShowText(String text) {
                canv = thread.mSurfaceHolder.lockCanvas();

                       if (text!= null) {

                               canv.drawColor(Color.WHITE); //background color
                               mPaint.setColor(Color.BLACK); //font color
                               mPaint.setTextSize(15);         //font size
                               canv.drawText(text, 10, 200, mPaint);
                        //startign at some
(10,200) coordinates , dratext
                       }

            unlockCanvasAndPost(canv);
       }

But the problem here is, the string is going out of the screen. I want
it to break down into multiple lines if it is too big for the screen
width.

Can anybody show me some example to do this? Is there any other better
way than using canvas class? please do suggest.

Thanks
Latha
-- 
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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread MrChaz
If you want to notify the user of something from the service you'll
want to use the NotificationManger to create and show a Notification

On Jan 7, 6:28 am, Manoj  wrote:
> Hi,
>
> Please help me out on the issue as I want to make a Toast to promt
> again and again on screen by a service running in background. Please
> suggest me the way how to make this done.
>
> manoj chauhan
-- 
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] Reduce the Boot up time

2010-01-07 Thread Nilly
Hi All,

I want to reduce the boot up time of android.
I have tried removing some stuff such as not required .apk from the /
system/apps folder.
from init.rc file some services which is not required.

my kernel uncompressing is taking 11 sec almost.how can reduce
that.one thing is that i can remove the drivers which are not needed
but i am not finding any .config file to remove it?

>From where can i remove the not required driver from kernel code?


What all other stuff can i remove to reduce boot up time?

Regards,
Nilly
-- 
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 2.1 SDK

2010-01-07 Thread Rob Franz
Soo... no Android 2.1 SDK yet.  That's cool.  Let's hope everyone's
app works with 2.1.  Best of luck everybody!

I'll remain a Google fanboy but come on guys, this isn't really that
well planned...

On Jan 7, 5:41 am, Carl Whalley  wrote:
> Fx: Waiting to exhale.
> The Nexus One has been out for almost a day now and *still* no 2.1
> SDK ;-)
>
> --
> Android Academyhttp://www.androidacademy.com
>
> On Dec 16 2009, 10:04 am, String 
> wrote:
>
>
>
> > There's been no public announcement of Android2.1, remember, so
> > there's noSDKbeen released. No doubt Google has one internally, but
> > that's it.
>
> > The *rumor* is that Android2.1will release on January 5 with the
> > Nexus One handset, but right now, that release date is just rumor.
> > While I find the prospect exciting as an Android enthusiast, as a
> > developer I'm hoping that it's not true, because it would be a repeat
> > of the fiasco with 2.0 - where theSDKonly dropped a couple of weeks
> > before live handsets hit the market. I *hope* that Google learned from
> > the failures of that experience, that the developer community needs
> > more lead time than that to test against a new version, but I *fear*
> > that they have not, and will just hang us out to dry again.
>
> > String
>
> > On Dec 15, 9:45 pm, sazilla  wrote:
>
> > > Hi everyone,
>
> > > does anybody have been able to get/build the Android2.1SDK?
>
> > > I was wondering if the following issues was fixed 
> > > there:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > Thanks
>
> > > 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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread manoj k
can you send the code snippet to use notificationmanager

On Thu, Jan 7, 2010 at 3:01 PM, MrChaz  wrote:

> If you want to notify the user of something from the service you'll
> want to use the NotificationManger to create and show a Notification
>
> On Jan 7, 6:28 am, Manoj  wrote:
> > Hi,
> >
> > Please help me out on the issue as I want to make a Toast to promt
> > again and again on screen by a service running in background. Please
> > suggest me the way how to make this done.
> >
> > manoj chauhan
>
> --
> 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
>
-- 
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: I want to make a Toast to prompt again and again on screen after every 5minutes.

2010-01-07 Thread Manoj
Thanks buddy i have got it done

On Jan 7, 1:58 pm, Nymann  wrote:
> Hi
>
> final Context context = getApplicationContext();
>         final Handler handler = new Handler(new Callback() {
>
>             public boolean handleMessage(Message msg) {
>                 final Toast t = new Toast(context);
>                 Toast makeText = t.makeText(context, "Test Toast",
> Toast.LENGTH_SHORT);
>                 makeText.show();
>
>                 return true;
>             }
>         });
>         Timer timer = new Timer( true);
>
>         timer.scheduleAtFixedRate(new TimerTask() {
>
>             @Override
>             public void run() {
>                 Log.d("Timertask", "Tick");
>                 handler.sendMessage(new Message());
>             }
>         }, new Date(),2000);
>
> This works .. haven't tried it in a service though.. but work in an
> activity (so i think it works also)
>
> On Jan 7, 9:35 am, Manoj  wrote:
>
> > ya you are right but in my code in doServiceWork() method its not
> > working
>
> > public class TestService extends Service
> > {
>
> >     public static FileScanner MAIN_ACTIVITY;
>
> >     private Timer timer=new Timer();
>
> >     private static long UPDATE_INTERVAL = 1*60*10;  //default
>
> >     private static long DELAY_INTERVAL = 0;
>
> >     // hooks main activity here
> >     public static void setMainActivity(FileScanner activity)
> >     {
> >       MAIN_ACTIVITY = activity;
> >     }
>
> >     /*
> >      * not using ipc...but if we use in future
> >      */
> >     public IBinder onBind(Intent intent) {
> >       return null;
> >     }
>
> >     @Override
> >     public void onCreate()
> >     {
> >       super.onCreate();
>
> >       _startService();
>
> >       if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
> > "FileScannerService started");
> >     }
>
> >     @Override
> >     public void onDestroy()
> >     {
> >       super.onDestroy();
>
> >       _shutdownService();
>
> >       if (MAIN_ACTIVITY != null)  Log.d(getClass().getSimpleName(),
> > "FileScannerService stopped");
> >     }
>
> >     /*
> >      * starting the service
> >      */
> >     private void _startService()
> >     {
> >       timer.scheduleAtFixedRate(
>
> >               new TimerTask() {
>
> >                     public void run() {
>
> >                         try{
>
> >                         doServiceWork();
>
> >                         Thread.sleep(UPDATE_INTERVAL);
>
> >                         }catch(InterruptedException ie){
>
> >                             Log.e(getClass().getSimpleName(),
> > "FileScannerService InterruptedException"+ie.toString());
> >                         }
>
> >                     }
> >                   },
> >                   DELAY_INTERVAL,
> >                   UPDATE_INTERVAL);
>
> >       Log.i(getClass().getSimpleName(), "FileScannerService Timer
> > started");
> >     }
>
> >     /*
> >      * start the processing, the actual work, getting config params,
> > get data from network etc
> >      */
> >     private void doServiceWork()
> >     {
>
> > ///code for work to be done
>
> >     }
>
> >     /*
> >      * shutting down the service
> >      */
> >     private void _shutdownService()
> >     {
> >       if (timer != null) timer.cancel();
> >       Log.i(getClass().getSimpleName(), "Timer stopped...");
> >     }
>
> > }
>
> > On Jan 7, 1:15 pm, Nymann  wrote:
>
> > > Hi
>
> > > Maybe something like the following ... (i havent tried the code)
>
> > > Timer timer = new Timer( true);
>
> > >         timer.scheduleAtFixedRate(new TimerTask() {
>
> > >             @Override
> > >             public void run() {
> > >                 Toast t = new Toast(context);
> > >                 t.makeText(context, "Test Toast",
> > > Toast.LENGTH_SHORT);
> > >                 t.show();
>
> > >             }
> > >         }, new Date(),3000);
>
> > > Kind regards Per
>
> > > On Jan 7, 7:28 am, Manoj  wrote:
>
> > > > Hi,
>
> > > > Please help me out on the issue as I want to make a Toast to promt
> > > > again and again on screen by a service running in background. Please
> > > > suggest me the way how to make this done.
>
> > > > manoj chauhan
-- 
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] Back ground of List View

2010-01-07 Thread Ali Murtaza
Hi

I want to know how to change background color of List View using XML
command... Thanks in advance

please tell me in steps

-- 
Ali Murtaza

BCSF06M021
Research Assistant
Data Virtulization Ware House
PUCIT, Lahore, Pakistan
ali.murt...@pucit.edu.pk
-- 
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: Need Help : canvas.drawtext() for a lengthy string

2010-01-07 Thread skink


On Jan 7, 9:25 am, Latha Shivanna  wrote:
> Hi All
>
> I am stuck in a very simple problem.
>
> I have one lengthy string & I need to draw that on the device display.
>
> My code is as follows:
>
> void ShowText(String text) {
>                 canv = thread.mSurfaceHolder.lockCanvas();
>
>                        if (text!= null) {
>
>                                canv.drawColor(Color.WHITE); //background color
>                                mPaint.setColor(Color.BLACK); //font color
>                                mPaint.setTextSize(15);         //font size
>                                canv.drawText(text, 10, 200, mPaint);
>                         //startign at some
> (10,200) coordinates , dratext
>                        }
>
>             unlockCanvasAndPost(canv);
>        }
>
> But the problem here is, the string is going out of the screen. I want
> it to break down into multiple lines if it is too big for the screen
> width.
>
> Can anybody show me some example to do this? Is there any other better
> way than using canvas class? please do suggest.
>
> Thanks
> Latha

use android.text.StaticLayout and one of its draw method

pskink
-- 
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: Using an image in a listview

2010-01-07 Thread Patrick Plaatje
Hi,

i've tried the list13 implementation, but although scrolling seems
smoother then it ever was, i'm kinda displeased with the time it takes
to fill the rows with content. I think my main concern is related to
the reuse of the rows, rather then how to fill them. I am wondering if
there isn't a way to prefill the listview and don;t reuse anything?

Regards,

Patrick


2010/1/6 Patrick Plaatje :
> Hi Brion,
>
> if this arraylist would be a rather big list, it would be costly
> indeed, and it is a good suggestion. This list consists of just 10
> items (feedmessage objects) though. These feedmessages are just a set
> of getters and setters (of just small String objects) and are not doin
> any costly operations internally.
>
> I will try your suggestion though to see if this will help. I'm kinda
> clueless on what is so costly
>
> Thanx for the suggestions, and will let you know tomorrow!
>
> Best,
>
> Patrick
>
> 2010/1/6 Brion Emde :
>> I see some problems here:
>>
>> // Bind the data efficiently with the holder.
>> holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get
>> (position)).g etTitle()));
>> holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get
>> (positi on)).getDescription()));
>> Drawable d = null;
>> FeedMessage fm = (FeedMessage) Items.get(position);
>>
>> if that Items.get(position) is costly, you're wasting it, above. How
>> about:
>>
>>                // Bind the data efficiently with the holder.
>>                Drawable d = null;
>>                FeedMessage fm = (FeedMessage) Items.get(position);
>>                holder.titleText.setText(Html.fromHtml(fm.getTitle
>> ()));
>>                holder.descriptionText.setText(Html.fromHtml
>> (fm.getDescription()));
>>
>>
>>
>> On Jan 6, 12:57 pm, Patrick Plaatje  wrote:
>>> Hi,
>>>
>>> i've used the holder method, but adding or omitting this didn;t give
>>> me an increase or decrease in performance, my getView method is below:
>>>
>>>         @Override
>>>         public View getView(int position, View convertView, ViewGroup 
>>> parent) {
>>>
>>>                 // A ViewHolder keeps references to children views to avoid 
>>> unneccessary calls
>>>                 // to findViewById() on each row.
>>>                 ViewHolder holder;
>>>
>>>                 holder = new ViewHolder();
>>>
>>>                 // When convertView is not null, we can reuse it directly, 
>>> there is no need
>>>                 // to reinflate it. We only inflate a new View when the 
>>> convertView supplied
>>>                 // by ListView is null.
>>>                 if (convertView == null){
>>>                         convertView = 
>>> mInflater.inflate(R.layout.article_row, null);
>>>
>>>                 // Creates a ViewHolder and store references to the two 
>>> children views
>>>                 // we want to bind data to.
>>>                         holder.titleText = (TextView) 
>>> convertView.findViewById(R.id.article_title);
>>>                         holder.descriptionText = (TextView)
>>> convertView.findViewById(R.id.article_description);
>>>                         holder.icon = (ImageView) 
>>> convertView.findViewById(R.id.article_thumb);
>>>
>>>                         convertView.setTag(holder);
>>>                 } else {
>>>                         // get holder back...much faster than inflate
>>>                         holder = (ViewHolder) convertView.getTag();
>>>                 }
>>>
>>>                 // Bind the data efficiently with the holder.
>>>                 
>>> holder.titleText.setText(Html.fromHtml(((FeedMessage)Items.get(position)).g 
>>> etTitle()));
>>>                 
>>> holder.descriptionText.setText(Html.fromHtml(((FeedMessage)Items.get(positi 
>>> on)).getDescription()));
>>>
>>>                 Drawable d = null;
>>>                 FeedMessage fm = (FeedMessage) Items.get(position);
>>>
>>>         if(fm.getEnclosures().size() > 0){
>>>                 String urlString = fm.getEnclosures().get(0);
>>>             dm.fetchDrawableOnThread(urlString, holder.icon);
>>>         } else {
>>>                 d = 
>>> _context.getResources().getDrawable(R.drawable.thumb_holder);
>>>                 holder.icon.setImageDrawable(d);
>>>         }
>>>         if(fm.getGuid() != null){
>>>                 convertView.setId(position);
>>>         }
>>>
>>>                 return convertView;
>>>         }
>>>
>>>         static class ViewHolder {
>>>                 TextView descriptionText;
>>>                 TextView titleText;
>>>                 ImageView icon;
>>>         }
>>>
>>> regards,
>>>
>>> Patrick
>>>
>>> 2010/1/6 Vince :
>>>
>>>
>>>
>>>
>>>
>>> > What does your getView code look like. Are re-inflating your row view
>>> > every time it's called, are there multiple views for the rows etc?
>>>
>>> > Vince
>>>
>>> > On Jan 6, 10:18 am, Patrick Plaatje  wrote:
>>> >> Hi all,
>>>
>>> >> for my app i'm using a listview to display rss news articles. All goes
>>> >> wel

[android-developers] Intent Call Action

2010-01-07 Thread Sasikumar.S
Hi,,

How to invoke call in android using ntent?...

-- 
Thanks & Regards
Sasikumar.S
-- 
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: Nine patch pre-scaling on Hdpi

2010-01-07 Thread Dianne Hackborn
You can build with a newer SDK and still be compatible with older devices;
you just need to be careful about the APIs you use.  For example with
resources, suffix your new resources type dirs (such as drawable-hdpi) with
"-v4" so that older devices don't see them.

On Wed, Jan 6, 2010 at 11:41 PM, Pixie  wrote:

> Thanks for your responses.
> I know I can fix this by creating a high density image, but in the
> first place, the reason I didn’t do it is because my application is
> working on version 1.5, which, as you probably know, does not support
> density-specific resources.
> I have more than one way to solve this problem, one of them is as you
> suggested, but I’m still interested to know the difference between a
> regular PNG and a 9-patch PNG, when it comes to scaling up.
>
> Thanks again
>
>
> On Jan 6, 12:41 am, Dianne Hackborn  wrote:
> > I would strongly recommend making density-specific resources.  Graphics
> > scaled from one density to another (especially going up) are never going
> to
> > look as good as ones designed for the density.
> >
> > Plus doing the pre-scaling on 9-patch images is...  interesting. :)  It's
> > actually amazing to me that it works as well as it does, but it is
> certainly
> > far from perfect.
> >
> >
> >
> > On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey  wrote:
> > > The easiest thing I can think of is to make high density images and
> > > see if that fixes the problem. I know that fix isn't the best but it
> > > might work.
> >
> > > On Jan 5, 7:31 am, Pixie  wrote:
> > > > Hello everyone,
> >
> > > > I have some 9-patch images on my app, and they work great on the
> > > > medium density.
> > > > When I load the app on a High density emulator/device, these images
> > > > look grainy.
> > > > It happens only to 9-patch images. The others look great after the
> pre-
> > > > scaling.
> > > > Is there a way to make them look good after the scaling, like the
> > > > non-9-patch images?
> >
> > > > 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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: Nexus 2.1 on sale, WHERE is the SDK!

2010-01-07 Thread String
On Jan 5, 10:25 pm, David Sauter  wrote:

> Does it raise the hard coded heap limit?

FYI, heap limit has had the potential to go beyond 16MB since 2.0.
It's being set on a device basis, and the theory is that it's tied to
screen/camera size: devices with more pixels on the screen or camera
need more memory to work with larger images, so they get more heap. I
believe the Droid has 24MB, for example; don't know about the N1 (I
can't afford one on what I make from Android apps).

Still waiting for the 2.1 SDK as well, and hoping that my apps aren't
too badly broken...

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

[android-developers] Re: Multitouch code examples?

2010-01-07 Thread niko20
I have to say the way Multitouch was implemented pretty much sucks big
time. Pain in the ass, doesn't seem to work well on the DROID, and
could have been done easier in my opinion.

-niko

On Dec 26 2009, 1:49 pm, rageman  wrote:
> Trying once more, all replies seems to end up in the void :-(
>
> Unfortunately the design of the multi touch api requires new api calls
> introduced in 2.0.
> In my opinion it would be nicer to have added a index for the move
> event in the same way as on the up/down event.
> This would have leave the api fully backwards compatible.
>
> We would like to support platform 1.5 - 2.x with the same SKU and
> support multi-touch on the 2.x devices and single touch on the other.
> Is this still possible when using function calls introduced in 2.0?
> In C/C++ even objective C you could use weak pointers, is this also
> possible in Java on Android?
>
> Any help would be very appreciated :-).
>
> Cheers,
>
> On Dec 26, 7:33 pm, Dianne Hackborn  wrote:
>
> > There is currently no official sample code, but you can look at the
> > PointerLocation (from Dev Tools) code:
>
> >http://android.git.kernel.org/?p=platform/development.git;a=blob;f=ap...
>
> > On Thu, Dec 24, 2009 at 10:30 PM, pcm2a  wrote:
> > > Are there anymultitouchcode examples that Google provides for SDK
> > > levels 2.0 or higher?  I do searches on here and on google and come up
> > > empty.
>
> > > --
> > > 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
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
-- 
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] Reduce the Boot up time

2010-01-07 Thread David Turner
You should send this to android-porting. android-developers is for
application developers.

On Thu, Jan 7, 2010 at 1:33 AM, Nilly  wrote:

> Hi All,
>
> I want to reduce the boot up time of android.
> I have tried removing some stuff such as not required .apk from the /
> system/apps folder.
> from init.rc file some services which is not required.
>
> my kernel uncompressing is taking 11 sec almost.how can reduce
> that.one thing is that i can remove the drivers which are not needed
> but i am not finding any .config file to remove it?
>
> From where can i remove the not required driver from kernel code?
>
>
> What all other stuff can i remove to reduce boot up time?
>
> Regards,
> Nilly
>
> --
> 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
>
-- 
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: Multitouch support in Android 2.0

2010-01-07 Thread niko20
I can't seem to get any consistent results trying to use the
multitouch on my droid.

Even if i put both fingers down I don't get two pointers, If I put one
down, then the other, it still says one pointer. Then if I lift the
first one, and put it down again, then it says two.

Multitouch API SUCKS

My test code:


View.OnTouchListener onTouchMain = new View.OnTouchListener() {

@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub

Integer tempint = new Integer(event.getPointerCount());
int action = event.getAction();

if (action == MotionEvent.ACTION_DOWN)
{

//statustext.setText("touched with " + 
tempint.toString() +
"pointers");
Log.i("POINTER", "There are " + 
tempint.toString() + " pointers");

}

if (action == MotionEvent.ACTION_POINTER_DOWN)
{


Log.i("POINTER", "There are " + 
tempint.toString() + " pointers");
}

if (action == MotionEvent.ACTION_UP)
{
statustext.setText("ready");

}


return true;
}
};



-niko

On Dec 8 2009, 9:45 pm, Peter Kirn  wrote:
> Possibly worth adding -- while trying to analyze size is unwise with
> touchscreens as Dianne rightfully says, what some iPhone platform
> developers are doing is to determine pressure by analyzing the
> microphone input. This will work with Android, too (it's an old trick,
> pre-dating iPhone), especially Android phones. It's a bit tricky to
> code, and obviously this is more of an expressive thing than it is
> something you'd consider as fundamental to UI design, but I've tried
> some experiments that were pretty effective.
>
> Peter
>
> On Dec 1, 4:34 pm, Dianne Hackborn  wrote:
>
> > On Tue, Dec 1, 2009 at 1:25 PM, patrick  wrote:
> > > ->for the pressure, when i use 2 fingers, the size 'detected' is
> > > sometimes suddenly enormous.
>
> > That is exactly how the G1 and myTouch screen works -- when two fingers are
> > down, the size is essentially seeing them as a large touch area.
>
> > So please keep in mind: even the x and y location during multi-touch can be
> > somewhat inaccurate in some various ways, that depend on the exact screen
> > hardware.  The size and pressure are already not so accurate and vary in
> > their response with just one finger; for two or more fingers you will see
> > widely different behavior across different screens.
>
> > As I have said many times before: size and pressure are really not too
> > useful for driving the UI.  This goes even more so for multi-touch.  You
> > just need to accept that.
>
> > > about the finger limit, do you know if it will be the same for the htc
> > > hero when it will receive the 2.1 firmware update?
>
> > As I said, the framework has no finger limit.  I don't know what screen htc
> > uses on whatever devices the ship, so I can't answer this question.  Sorry.
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
-- 
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] Reg: Not able to get address from Longitude and Latitude

2010-01-07 Thread sathya subbiah
Hi,

I am trying to get address from Longitude and latitude using the following
code


  Geocoder geoCoder = new
Geocoder(mContext,Locale.getDefault());

List addresses = geoCoder.getFromLocation(
mCurrentLatitude,
mCurrentLongitude, 1);

But the address size is always 0. I am trying this in Android SDK 2.0 using
eclipse. Can anyone help me to resolve the issue?.


Thanks & Regards,
Sathya
-- 
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] open all blocked sites in your country now

2010-01-07 Thread alagmy
open all blocked sites in your country now


Browse the internet securely using Your Proxy

 You can unblock popular social networking sites such as myspace,
bebo, facebook and many other sites.

يمكنك الآن فتح المواقع المحجوبه فى بلدك من هذا الرابط

http://alagmyproxy.zxq.net/proxy/index.php

-- 
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: Multitouch support in Android 2.0

2010-01-07 Thread Dianne Hackborn
Run Pointer Location and make sure it works, and you can see the code here:

http://android.git.kernel.org/?p=platform/development.git;a=blob;f=apps/Development/src/com/android/development/PointerLocation.java;h=38b4af2dcd97625e6fef2c1bddcb9362a127352e;hb=HEAD

Note that ACTION_POINTER_DOWN encodes the number of the pointer that went
down, so you shouldn't be using it by itself.  And, you know, you could just
print out the action of each of the events to see what you are getting.

Multitouch API SUCKS
>

Good way to discourage people from helping you. :p

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: Multitouch code examples?

2010-01-07 Thread Dianne Hackborn
If the move event had the pointer index encoded in it, then we would need to
deliver separate events for each pointer, which is a lot less efficient and
I think ultimately a lot harder to deal with (vs. having all of the data
available in one event).

Anyway, this is really not an issue.  Please read Andy McFadden's blog post
on using newer API while being compatible with older platforms.  You'll
probably want to follow the latter part, where you have a separate class in
your app that calls the new APIs and you make sure to not try to use on
older platforms.

http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

On Sat, Dec 26, 2009 at 11:49 AM, rageman  wrote:

> Trying once more, all replies seems to end up in the void :-(
>
> Unfortunately the design of the multi touch api requires new api calls
> introduced in 2.0.
> In my opinion it would be nicer to have added a index for the move
> event in the same way as on the up/down event.
> This would have leave the api fully backwards compatible.
>
> We would like to support platform 1.5 - 2.x with the same SKU and
> support multi-touch on the 2.x devices and single touch on the other.
> Is this still possible when using function calls introduced in 2.0?
> In C/C++ even objective C you could use weak pointers, is this also
> possible in Java on Android?
>
> Any help would be very appreciated :-).
>
> Cheers,
>
> On Dec 26, 7:33 pm, Dianne Hackborn  wrote:
> > There is currently no official sample code, but you can look at the
> > PointerLocation (from Dev Tools) code:
> >
> > http://android.git.kernel.org/?p=platform/development.git;a=blob;f=ap...
> >
> > On Thu, Dec 24, 2009 at 10:30 PM, pcm2a  wrote:
> > > Are there any multitouch code examples that Google provides for SDK
> > > levels 2.0 or higher?  I do searches on here and on google and come up
> > > empty.
> >
> > > --
> > > 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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: No route to host issue, but Browser application works fine

2010-01-07 Thread g...@devicedriven
yup..you can refer to the localhost by this ip-->10.0.2.2
This is because when you are specifying localhost to the device/
emulator it is a reference to the phone\emulator itself and not the
local machine
read this too-->http://developer.android.com/guide/appendix/faq/
commontasks.html#localhostalias

On Jan 7, 7:15 am, Kenn Min Chong  wrote:
> OKOK, I think I found out what the issue is, but can't explain why. I
> was trying to connect to a webservice located on the same machine as
> the emulator was running. I tried referring to the local machine by IP
> and by name, but I always get the "no route to host" error. But when I
> connect to the same webservice, but hosted on a different machine
> altogether, it works fine! So, what am I missing here?
>
> On Jan 6, 8:55 pm, Kenn Min Chong  wrote:
>
> > I don't get it. I'm having this issue in the emulator. Is this an
> > emulator only issue or  it affects real devices too? This used to not
> > do this, did a recent SDK update break this functionality?
>
> > On Jan 6, 8:28 pm, Wayne Wenthin  wrote:
>
> > > You are not alone.   I have this every once in awhile,  I know that they
> > > have already logged in due to where it generates the error.   It's 
> > > annoying
> > > to say the least.  I'm now working on catching the exception and retrying
> > > since it is just trying to put a json object to my server
>
> > > On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong  wrote:
>
> > > > Hey guys!
> > > >   So, this is very frustrating. I already have
>
> > > >  > > > permission>
>
> > > > in my manifest, but when my application tries to make a webservice
> > > > call (I'm using a HttpURLConnection object to do this via connect()
> > > > method), I'm getting an exception of "No route to host".
>
> > > > The built-in Browser application is able to access the internet
> > > > properly, so I'm guessing it's something in my project. Any ideas?
>
> > > > Kenn.
>
> > > > --
> > > > 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
>
> > > --
> > > Writing code is one of few things
> > > that teaches me I don't know everything.
>
> > > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
>
>
-- 
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: Initiating a GPRS connection

2010-01-07 Thread Android Development
Hello,

Any feedback on how to achieve this task?

On 1/4/10, Android Development  wrote:
> Hello,
>
> If I wish to initiate a GPRS data connection programatically through a
> configured access point on the device, how do I go about it ?
>
> Any ideas are appreciated.
>
> Thanks in advance
>
> Indodroid.
>
-- 
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: Where to get a Samsung Moment for development

2010-01-07 Thread Don
Hello,
I'm now having the exact same problem, a customer is reporting an
issue with my application on their Samsung Moment, but I can't debug
the issue as I don't have the device!
I've tried the test services perfectomobile & deviceanywhere, but
neither has a Samsung Moment!

I can see this fragmentation becoming one of the major issues for
Android development.

Don

On Dec 3 2009, 5:28 am, "SoftwareForMe.com" 
wrote:
> Hi,
>
> We have a G1, MyTouch, Hero and Droid. However, we've been getting odd
> reports from our Moment customers, and it's time we get one.
>
> Anybody know where to do this, and whether there are any issues getting the
> thing acitvated without a phone plan to go with it?
>
> SoftwareForMe.com
> Makers of PhoneMyPC
> & Imagine Multi-touch
-- 
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 Bouncycastle in Android

2010-01-07 Thread Pawel Kapala
I've sucessfully written an application using Bouncy Castle (AES256 +
SHA1).
AFAIK the Bouncy Castle provider is the default Android provider.
So you can use it without importing any external libraries.

Try initializing Cipher object with as described here:

http://developer.android.com/reference/javax/crypto/Cipher.html

On Jan 6, 5:17 pm, Arnnei  wrote:
> Hi,
>
> I'm converting a J2ME application to Android using Eclipse + SDK.
>
> The J2ME is using Bouncycastle SHA1.
> I understand that Android now includes Bouncycastle ?
>
> How do I use the Bouncycastle functions.
> What do I have to Import or how do I add the BC libraries to the
> Eclipse.
>
> 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: Reg: Not able to get address from Longitude and Latitude

2010-01-07 Thread Nithin

Check the latitude and longitude value, that you are passing to
getFromLocation(). Then try, giving the number of results a bigger
value than 1.

Nithin

On Jan 7, 3:58 pm, sathya subbiah  wrote:
> Hi,
>
> I am trying to get address from Longitude and latitude using the following
> code
>
>               Geocoder geoCoder = new
> Geocoder(mContext,Locale.getDefault());
>
>                 List addresses = geoCoder.getFromLocation(
>                         mCurrentLatitude,
>                         mCurrentLongitude, 1);
>
> But the address size is always 0. I am trying this in Android SDK 2.0 using
> eclipse. Can anyone help me to resolve the issue?.
>
> Thanks & Regards,
> Sathya
-- 
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: Nine patch pre-scaling on Hdpi

2010-01-07 Thread Mariano Kamp
Why is that? I didn't do that (drawable-hdpi sans -v4) and it seems it still
works fine on an 1.5 device.

On Thu, Jan 7, 2010 at 8:41 AM, Pixie  wrote:

> Thanks for your responses.
> I know I can fix this by creating a high density image, but in the
> first place, the reason I didn’t do it is because my application is
> working on version 1.5, which, as you probably know, does not support
> density-specific resources.
> I have more than one way to solve this problem, one of them is as you
> suggested, but I’m still interested to know the difference between a
> regular PNG and a 9-patch PNG, when it comes to scaling up.
>
> Thanks again
>
>
> On Jan 6, 12:41 am, Dianne Hackborn  wrote:
> > I would strongly recommend making density-specific resources.  Graphics
> > scaled from one density to another (especially going up) are never going
> to
> > look as good as ones designed for the density.
> >
> > Plus doing the pre-scaling on 9-patch images is...  interesting. :)  It's
> > actually amazing to me that it works as well as it does, but it is
> certainly
> > far from perfect.
> >
> >
> >
> > On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey  wrote:
> > > The easiest thing I can think of is to make high density images and
> > > see if that fixes the problem. I know that fix isn't the best but it
> > > might work.
> >
> > > On Jan 5, 7:31 am, Pixie  wrote:
> > > > Hello everyone,
> >
> > > > I have some 9-patch images on my app, and they work great on the
> > > > medium density.
> > > > When I load the app on a High density emulator/device, these images
> > > > look grainy.
> > > > It happens only to 9-patch images. The others look great after the
> pre-
> > > > scaling.
> > > > Is there a way to make them look good after the scaling, like the
> > > > non-9-patch images?
> >
> > > > 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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> 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
>
-- 
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 show Progress Bar in Tab Activity

2010-01-07 Thread NoraBora
Try TabHost.TabSpec.setIndicator(View view)

and access the indicator view.

On Jan 6, 2:29 pm, RamaMohan  wrote:
> Hi,
> I am having a tab Activity with 5 tabs with intents.the classes are
> used to load data from internet source.I need to show display progress
> bar while clicking each tab until it completes the data loading. or
> how to show a progress bar for a finite time after clicking the tab .
>
> If any one Knows this solution ,please send me the answer.
>
> Thanks in Advance,
> Ram
-- 
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] TabActivity access

2010-01-07 Thread arnouf
Hi all,

I've a tabactivity containing 4 activity.

can I call method or attributes present in TabActivity from an
activity displayed ?

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

Re: [android-developers] Re: Reg: Not able to get address from Longitude and Latitude

2010-01-07 Thread sathya subbiah
Hi Nithin,

Thanks for the reply. The Lat. and Long. values are not 0. I am checking
with values like
37.422006 - Lat
-122.084095 - Long

But still the address read is 0. Can you pls let me know if some thing else
is to be set. I am also providing permission like

  
  
  
  

But still it is not able to decode the address.

Rgs,
Sathya

On Thu, Jan 7, 2010 at 8:01 AM, Nithin  wrote:

>
> Check the latitude and longitude value, that you are passing to
> getFromLocation(). Then try, giving the number of results a bigger
> value than 1.
>
> Nithin
>
> On Jan 7, 3:58 pm, sathya subbiah  wrote:
> > Hi,
> >
> > I am trying to get address from Longitude and latitude using the
> following
> > code
> >
> >   Geocoder geoCoder = new
> > Geocoder(mContext,Locale.getDefault());
> >
> > List addresses = geoCoder.getFromLocation(
> > mCurrentLatitude,
> > mCurrentLongitude, 1);
> >
> > But the address size is always 0. I am trying this in Android SDK 2.0
> using
> > eclipse. Can anyone help me to resolve the issue?.
> >
> > Thanks & Regards,
> > Sathya
>
> --
> 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
>
-- 
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] Shall we need to start from scratch

2010-01-07 Thread saikiran n
Hi
I have informed that android supporting wap push
But i didn't find any apis which we can use for sending wap push
I want to write an application to send wap push instead of SMS
Do i need to start from scratch if so
Can anybody help me how to start or give me any relavent documents.
I have seen the difference between SMS and WAP push
But How can we practically acheive this
Please help me
Thanks 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

[android-developers] Fullscreen (no title & no status bar) - UI bug in Android?

2010-01-07 Thread Marc Reichelt
Hi there!

I am using the fullscreen mode in my application and noticed a small,
but very annoying bug. After hours of testing I tracked it down to a
very simple piece of code (see below).

This is how the UI looks like after running it:
http://i47.tinypic.com/2jfac6v.png

The problem: As soon as the button is selected, a header in the size
of the status bar will appear and all views will be scrolled down by
the appropriate height.

My code looks like this:

-snip-

package com.example.android.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;

public class FullscreenTest extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// set background color to white to see what is going on

getWindow().setBackgroundDrawableResource(android.R.color.white);

// hide title and status bar
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );


// create a simple layout with a button
LinearLayout contentView = new LinearLayout(this);

Button button = new Button(this);
button.setText("Look above!   WTF?");

contentView.addView(button);

setContentView(contentView);
}

}

-snap-

The problem does not occur if the status bar or the title bar is
shown. As far as I tested, all SDK versions 1.5, 1.6 and 2.0.1 are
affected.

Can anyone verify this problem? Is this fixed in feature versions of
the Android SDK (e.g. 2.1)?


Thanks in advance & regards

Marc Reichelt   ||   http://www.marcreichelt.de/
-- 
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] A problem of drawing on WVGA screen

2010-01-07 Thread chaozh
Hi all:
I wrote a reading software. I implemented the page turning effect when
user tap the screen to turn to next/pre page. The display is ok on G1
(320X200 size) but it can not works well on Droid(480*854 size), the
font looks a litter fuzzy, not clear as G1.
I explain my codes for page turning:
1) create a canvas A
2) create bitmap.
3) set bitmap on canvas A
4) draw the new page content on canvas A
5) the current showing page has been saved in bitmap before since we
do from step 1) to setp 4),
6) In order to implement the turning effect of scrolling from left to
right, I draw the old bitmap part and draw the new bitmap part until
the whole new bitmap has been drawn. all of bitmaps are drawing by
canvas.drawBitmap() in onDraw() function.
7) when step 6) is done, it means the new page has been shown on
screen, and the bitmap has been saved to use in next page turning.

The above is the whole actions for my page turning. On G1, no problem.
But on Droid phone, the font is not clear,
I tried if I directly draw text by canvas in OnDraw() not through
bitmap, It is ok, but it can not implement the page turning effect
that I need. I don't know why, could you please help me to take a look
and tell me where is wrong or miss some steps?
Thanks a lot!
-- 
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] Chinese company offers translation for right to publish app on their market

2010-01-07 Thread Ilya Shinkarenko
hi all,

recently i have got an offer from one chinese company to translate my app
for tennis statistics tracking (www.tennis-math.com). they have already
translated the strings.xml (though i can't be sure they havent put some porn
it it :)) and the want a right to publish my (free) app on their market. i'm
sure one can find the answer in the developer agreement with google but
since i am pretty stressed now, maybe some of you fellow devs know certain
answer with regards to this topic? would it be legal to allow these guys to
publish my apps taking in account that it is free?

thanks and best regards to everybody
ilya
-- 
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: Reg: Not able to get address from Longitude and Latitude

2010-01-07 Thread Nithin
In my application, I am doing like this and its working fine for me,

// Geocoding
Geocoder geoCoder = new 
Geocoder(getBaseContext(), Locale
.getDefault());
try {
List addresses = geoCoder

.getFromLocation(p.getLatitudeE6() / 1E6, p

.getLongitudeE6() / 1E6, 1);

String add = "";
if (addresses.size() > 0) {
for (int i = 0; i < 
addresses.get(0)

.getMaxAddressLineIndex(); i++)
add += 
addresses.get(0).getAddressLine(i) + "\n";
}
}

And the permissions I gave are,





check this,
http://code.google.com/p/locationfinder/downloads/list

but this is for SDK 1.1... Anyway, you can have a look at it.

Nithin

On Jan 7, 6:22 pm, sathya subbiah  wrote:
> Hi Nithin,
>
> Thanks for the reply. The Lat. and Long. values are not 0. I am checking
> with values like
> 37.422006 - Lat
> -122.084095 - Long
>
> But still the address read is 0. Can you pls let me know if some thing else
> is to be set. I am also providing permission like
>
>       
>        android:name="android.permission.ACCESS_FINE_LOCATION"/>
>        android:name="android.permission.ACCESS_COARSE_LOCATION"/>
>        android:name="android.permission.ACCESS_MOCK_LOCATION"/>
>
> But still it is not able to decode the address.
>
> Rgs,
> Sathya
>
> On Thu, Jan 7, 2010 at 8:01 AM, Nithin  wrote:
>
> > Check the latitude and longitude value, that you are passing to
> > getFromLocation(). Then try, giving the number of results a bigger
> > value than 1.
>
> > Nithin
>
> > On Jan 7, 3:58 pm, sathya subbiah  wrote:
> > > Hi,
>
> > > I am trying to get address from Longitude and latitude using the
> > following
> > > code
>
> > >               Geocoder geoCoder = new
> > > Geocoder(mContext,Locale.getDefault());
>
> > >                 List addresses = geoCoder.getFromLocation(
> > >                         mCurrentLatitude,
> > >                         mCurrentLongitude, 1);
>
> > > But the address size is always 0. I am trying this in Android SDK 2.0
> > using
> > > eclipse. Can anyone help me to resolve the issue?.
>
> > > Thanks & Regards,
> > > Sathya
>
> > --
> > 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
-- 
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: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Nathan
Have you published it?

Nathan
-- 
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: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Dianne Hackborn
Well I would really like to see this, given that prior to 2.0 there was no
multitouch information propagated through the framework at all, and
applications do not have permission to open the raw driver.

On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
softwareforme@gmail.com> wrote:

> Our solution is software only, works on production phones (i.e., no rooting
> or modding required).
>
> Scott
> SoftwareForMe.com
> Makers of PhoneMyPC
>
>
> On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>
>> I'm curious about this. Does multi-touch require hardware changes? Or
>> am I reading this right that it can all be done through software?
>>
>> Nathan
>>
>> --
>> 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
>
>
>
>
> --
> Warm regards,
> The PhoneMyPC Team
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: Nine patch pre-scaling on Hdpi

2010-01-07 Thread Dianne Hackborn
Just to be sure. :)   1.5 had some early implementation of the density
scaling, so I'm not sure what it will do with the new resources.  If it
works, cool.  You'll definitely need the version part for new things like
"long".

On Thu, Jan 7, 2010 at 5:10 AM, Mariano Kamp  wrote:

> Why is that? I didn't do that (drawable-hdpi sans -v4) and it seems it
> still works fine on an 1.5 device.
>
> On Thu, Jan 7, 2010 at 8:41 AM, Pixie  wrote:
>
>> Thanks for your responses.
>> I know I can fix this by creating a high density image, but in the
>> first place, the reason I didn’t do it is because my application is
>> working on version 1.5, which, as you probably know, does not support
>> density-specific resources.
>> I have more than one way to solve this problem, one of them is as you
>> suggested, but I’m still interested to know the difference between a
>> regular PNG and a 9-patch PNG, when it comes to scaling up.
>>
>> Thanks again
>>
>>
>> On Jan 6, 12:41 am, Dianne Hackborn  wrote:
>> > I would strongly recommend making density-specific resources.  Graphics
>> > scaled from one density to another (especially going up) are never going
>> to
>> > look as good as ones designed for the density.
>> >
>> > Plus doing the pre-scaling on 9-patch images is...  interesting. :)
>>  It's
>> > actually amazing to me that it works as well as it does, but it is
>> certainly
>> > far from perfect.
>> >
>> >
>> >
>> > On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey 
>> wrote:
>> > > The easiest thing I can think of is to make high density images and
>> > > see if that fixes the problem. I know that fix isn't the best but it
>> > > might work.
>> >
>> > > On Jan 5, 7:31 am, Pixie  wrote:
>> > > > Hello everyone,
>> >
>> > > > I have some 9-patch images on my app, and they work great on the
>> > > > medium density.
>> > > > When I load the app on a High density emulator/device, these images
>> > > > look grainy.
>> > > > It happens only to 9-patch images. The others look great after the
>> pre-
>> > > > scaling.
>> > > > Is there a way to make them look good after the scaling, like the
>> > > > non-9-patch images?
>> >
>> > > > 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
>> >
>> > --
>> > Dianne Hackborn
>> > Android framework engineer
>> > hack...@android.com
>> >
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support, and so won't reply to such e-mails.  All such
>> > questions should be posted on public forums, where I and others can see
>> and
>> > answer them.
>>
>> --
>> 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
>>
>
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: Nine patch pre-scaling on Hdpi

2010-01-07 Thread Dianne Hackborn
Btw, it may just be luck, that when your resources were build it did the
generic ones first, so those are the ones 1.5 sees.  I would add the -v4 on
the directories just to be sure there are no future problems.  (Really aapt
should be doing this automatically for you.)

On Thu, Jan 7, 2010 at 6:35 AM, Dianne Hackborn  wrote:

> Just to be sure. :)   1.5 had some early implementation of the density
> scaling, so I'm not sure what it will do with the new resources.  If it
> works, cool.  You'll definitely need the version part for new things like
> "long".
>
>
> On Thu, Jan 7, 2010 at 5:10 AM, Mariano Kamp wrote:
>
>> Why is that? I didn't do that (drawable-hdpi sans -v4) and it seems it
>> still works fine on an 1.5 device.
>>
>> On Thu, Jan 7, 2010 at 8:41 AM, Pixie  wrote:
>>
>>> Thanks for your responses.
>>> I know I can fix this by creating a high density image, but in the
>>> first place, the reason I didn’t do it is because my application is
>>> working on version 1.5, which, as you probably know, does not support
>>> density-specific resources.
>>> I have more than one way to solve this problem, one of them is as you
>>> suggested, but I’m still interested to know the difference between a
>>> regular PNG and a 9-patch PNG, when it comes to scaling up.
>>>
>>> Thanks again
>>>
>>>
>>> On Jan 6, 12:41 am, Dianne Hackborn  wrote:
>>> > I would strongly recommend making density-specific resources.  Graphics
>>> > scaled from one density to another (especially going up) are never
>>> going to
>>> > look as good as ones designed for the density.
>>> >
>>> > Plus doing the pre-scaling on 9-patch images is...  interesting. :)
>>>  It's
>>> > actually amazing to me that it works as well as it does, but it is
>>> certainly
>>> > far from perfect.
>>> >
>>> >
>>> >
>>> > On Tue, Jan 5, 2010 at 1:48 PM, Jeffrey 
>>> wrote:
>>> > > The easiest thing I can think of is to make high density images and
>>> > > see if that fixes the problem. I know that fix isn't the best but it
>>> > > might work.
>>> >
>>> > > On Jan 5, 7:31 am, Pixie  wrote:
>>> > > > Hello everyone,
>>> >
>>> > > > I have some 9-patch images on my app, and they work great on the
>>> > > > medium density.
>>> > > > When I load the app on a High density emulator/device, these images
>>> > > > look grainy.
>>> > > > It happens only to 9-patch images. The others look great after the
>>> pre-
>>> > > > scaling.
>>> > > > Is there a way to make them look good after the scaling, like the
>>> > > > non-9-patch images?
>>> >
>>> > > > 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
>>> >
>>> > --
>>> > Dianne Hackborn
>>> > Android framework engineer
>>> > hack...@android.com
>>> >
>>> > Note: please don't send private questions to me, as I don't have time
>>> to
>>> > provide private support, and so won't reply to such e-mails.  All such
>>> > questions should be posted on public forums, where I and others can see
>>> and
>>> > answer them.
>>>
>>> --
>>> 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
>>>
>>
>>
>> --
>> 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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 gro

[android-developers] Re: scaling game images according display sizes

2010-01-07 Thread Andrea
Hi Jason,

On 7 Gen, 05:11, Jason Arora  wrote:
> Are you drawing in a separate thread (like the LunarLander example)?
> If not and your game is real-time, I seriously recommend switching to
> that model.

I don't use a SurfaceView (like LunarLander) but a normal view because
in my tests I found it much more stable then the surfaceView. Keep in
mind that android was 1.5. With 1.6/2.* things maybe changed, I have
to test it. There are no threads in the game apart the one used for
loading all the images before the game starts.

>
> Also, I don't believe you should be seeing a slow-down in
> compatibility mode... In my experience, it has worked pretty well.

Trust me, with the code structure explained before the frame rate
slows down, I tested it on the DROID device at last london android
lab.

Andrea

> On Jan 6, 11:56 am, Andrea  wrote:
>
> > Hi Robert, thanks for the reply.
> > Ok the images are loaded as Bitmaps (not drawable) and drawed on the
> > onDraw(Canvas c) method of a view. Inside that method I invalidate()
> > all the view. So the game runs as fast as it can. The game is using
> > dirty rects technique to redraw only the portions of the screen that
> > need to be changed. Here is the simply code structure:
>
> > //on a view
> > private void onDraw(Canvas c){
>
> >        //do staff
>
> >        invalidate();
>
> > }
>
> > if you need some other info, tell me it.
>
> > a.p.
>
> > Robert Green ha scritto:
>
> > > What's your design like?  How are you drawing everything?  If you tell
> > > me that, I can offer some suggestions.
>
> > > On Jan 6, 9:02 am, Andrea  wrote:
> > > > Hi
> > > > I developed a game with the g1 in my mind. Now I want to support large
> > > > screen sizes but I don't want to add in the apk different images for
> > > > different screen sizes because now the apk is 3mb and when installed
> > > > trought market it became 6mb (due to protection on). If i have to
> > > > double the images to support new screens, the apk would be too heavy
> > > > (about 13mb, i think) so I'm wondering to know if scaling images at
> > > > runtime by myself (without compatibility mode) maybe the best way for
> > > > supporting larger screens. Someone tried this solution? Compatbility
> > > > mode does a great work in scaling images but it slows down drastically
> > > > the framerate (i think because the scale operation is made every time
> > > > an image is used/moved and not only once on the load of the image
> > > > itself).
>
> > > > 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: Using Nexus One as a development phone: Problem with USB driver under windows 7 64 bit

2010-01-07 Thread Streets Of Boston
I got them from that forum as well, after a bit of searching.

I haven't tried the newly download rev 3 versions.

On Jan 7, 3:53 am, "SoftwareForMe.com SoftwareForMe.com"
 wrote:
> Interesting.
>
> I downloaded rev 3 of the driver pack, but could not find the proper driver.
>
> I eventually downloaded it from a forum, 
> here:http://forum.xda-developers.com/showthread.php?t=613054
>
> SoftwareForMe.com
> Makers of PhoneMyPC
> & Imagine Multi-touch
>
>
>
> On Wed, Jan 6, 2010 at 7:59 PM, Xavier Ducrohet  wrote:
> > Yesterday, we've pushed a new USB driver on the SDK updater repository
> > (rev 3) to support the Nexus One, did you download it?
>
> > Xav
>
> > On Wed, Jan 6, 2010 at 7:51 PM, Streets Of Boston
> >  wrote:
> > > Hi everyone,
>
> > > I've been using my G1 under Windows 7 64-bit and Eclipse just fine.
>
> > > However, when using my new Nexus One instead - and making sure that
> > > 'Use Debugging' is enabled - the Nexus One is not recognized and
> > > debugging on this phone is not possible.
>
> > > Usig the Nexus One as a removable-drive (by mounting it) works fine.
>
> > > How can I start using the Nexus one as a development device (on
> > > Eclipse)?
>
> > > 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
>
> > --
> > 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@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- 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] Re: Nexus 2.1 on sale, WHERE is the SDK!

2010-01-07 Thread Streets Of Boston
I tried a whole bunch of apps on the Nexus One.
So far, all of them worked fine!

On Jan 7, 5:39 am, String  wrote:
> On Jan 5, 10:25 pm, David Sauter  wrote:
>
> > Does it raise the hard coded heap limit?
>
> FYI, heap limit has had the potential to go beyond 16MB since 2.0.
> It's being set on a device basis, and the theory is that it's tied to
> screen/camera size: devices with more pixels on the screen or camera
> need more memory to work with larger images, so they get more heap. I
> believe the Droid has 24MB, for example; don't know about the N1 (I
> can't afford one on what I make from Android apps).
>
> Still waiting for the 2.1 SDK as well, and hoping that my apps aren't
> too badly broken...
>
> 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

[android-developers] Android 2.0: Why does my transparent background turn white while scrolling??

2010-01-07 Thread Flying Coder

Hi,
I'm using a ListView with a transparent background.  It works fine
in Android 1.5 & 1.6, but in Android 2.0 and later, the ListView
background turns white while scrolling.  I want it to stay
transparent, just like in 1.5 & 1.6.

Does anyone know what's going on, or better yet, how I can get
this working correctly?

Thanks a bunch!

Steve
-- 
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: scaling game images according display sizes

2010-01-07 Thread tobias429
Hi Andrea,

I also wanted to avoid compatibility mode. More for the reason of
being able to actually use the higher resolution rather than out of
performance concerns.

For one of my games I applied a routine to scale the images myself
upon start-up of the application just like you describe (I used Bitmap
drawables). As the system then does not need to resize the drawables
any longer upon drawing them on the screen, this has speed up the
performance of the game quite drastically.

Best regards,

Tobias

On Jan 7, 3:38 pm, Andrea  wrote:
> Hi Jason,
>
> On 7 Gen, 05:11, Jason Arora  wrote:
>
> > Are you drawing in a separate thread (like the LunarLander example)?
> > If not and your game is real-time, I seriously recommend switching to
> > that model.
>
> I don't use a SurfaceView (like LunarLander) but a normal view because
> in my tests I found it much more stable then the surfaceView. Keep in
> mind that android was 1.5. With 1.6/2.* things maybe changed, I have
> to test it. There are no threads in the game apart the one used for
> loading all the images before the game starts.
>
>
>
> > Also, I don't believe you should be seeing a slow-down in
> > compatibility mode... In my experience, it has worked pretty well.
>
> Trust me, with the code structure explained before the frame rate
> slows down, I tested it on the DROID device at last london android
> lab.
>
> Andrea
>
> > On Jan 6, 11:56 am, Andrea  wrote:
>
> > > Hi Robert, thanks for the reply.
> > > Ok the images are loaded as Bitmaps (not drawable) and drawed on the
> > > onDraw(Canvas c) method of a view. Inside that method I invalidate()
> > > all the view. So the game runs as fast as it can. The game is using
> > > dirty rects technique to redraw only the portions of the screen that
> > > need to be changed. Here is the simply code structure:
>
> > > //on a view
> > > private void onDraw(Canvas c){
>
> > >        //do staff
>
> > >        invalidate();
>
> > > }
>
> > > if you need some other info, tell me it.
>
> > > a.p.
>
> > > Robert Green ha scritto:
>
> > > > What's your design like?  How are you drawing everything?  If you tell
> > > > me that, I can offer some suggestions.
>
> > > > On Jan 6, 9:02 am, Andrea  wrote:
> > > > > Hi
> > > > > I developed a game with the g1 in my mind. Now I want to support large
> > > > > screen sizes but I don't want to add in the apk different images for
> > > > > different screen sizes because now the apk is 3mb and when installed
> > > > > trought market it became 6mb (due to protection on). If i have to
> > > > > double the images to support new screens, the apk would be too heavy
> > > > > (about 13mb, i think) so I'm wondering to know if scaling images at
> > > > > runtime by myself (without compatibility mode) maybe the best way for
> > > > > supporting larger screens. Someone tried this solution? Compatbility
> > > > > mode does a great work in scaling images but it slows down drastically
> > > > > the framerate (i think because the scale operation is made every time
> > > > > an image is used/moved and not only once on the load of the image
> > > > > itself).
>
> > > > > 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] market doesn't refresh downloads?

2010-01-07 Thread Éva Lovrencsics
Hello,

My downloads and installs stopped two days ago, and I don't see any
changes on the market (developer console). They never stay the same,
so I think, market doesn't refresh them.
Anybody recognized this?

Evi
-- 
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: Multitouch support in Android 2.0

2010-01-07 Thread Mirmathrax
I posted this in its own topic before I found this post and read it
thouroughly.
I am still having problems with Multi-touch not working as documented
on the droid.
Please read the post below for detail:

I wanted to experiment with multi-touch, so I decided to
add the controls for LunarLander to the touchscreen.

Instead of adding buttons, I defined regions on the screen that when
touched, would act like the buttons on the keyboard (for example, the
gas fires as long as you press the screen in the area defined for the
gas button, and stops firing when you release.)

To do this, I added the onTouchEvent override to the LunarView class
as follows:

   /**
 * Standard override to get Touch Screen Events.
 */
@Override
public boolean onTouchEvent(MotionEvent event) {
return thread.doTouchScreen(event);
}

Then, I added a function to the LunarThread called doTouchScreen.  I
also added variables to define the boundaries of the touch areas on
the screen for the "buttons" The boundaries are defined as follows and
placed in the variable declaration location of the LunarThread:

//* Y boundary of left and right turn button **/
private float TurnButton_Y;

//* X Boundary of the fire Button (left side of button)
private float fireButton_X;

//* X boundary of left turn button **/
private float leftTurnButton_X = 100;

//* X boundary of right turn button **/
private float rightTurnButton_X = 200;

The doTouchScreen code is the following:

 boolean doTouchScreen(MotionEvent event) {

boolean handled = true;

synchronized (mSurfaceHolder) {

  int numevents = event.getPointerCount();
  int action = event.getAction();
  int ptrId = event.getPointerId(0);

  if(numevents > 1)
 ptrId = (action & MotionEvent.ACTION_POINTER_ID_MASK)


MotionEvent.ACTION_POINTER_ID_SHIFT;
 action = action & MotionEvent.ACTION_MASK;

  int ptrIndex = event.findPointerIndex(ptrId);

  float X = event.getX(ptrIndex);
  float Y = event.getY(ptrIndex);

if(action == event.ACTION_DOWN || action ==
event.ACTION_MOVE)
{
if(Y > TurnButton_Y)
{
if(X < leftTurnButton_X)
{
mRotating = -1;
turnButtonID = ptrId;
}
else if (X <
rightTurnButton_X)
{
mRotating = 1;
turnButtonID = ptrId;
}
else if (X > fireButton_X)
{
setFiring(true);
gasButtonID = ptrId;
}

handled =  true;
}
handled = true;
}
else if(action == event.ACTION_UP || action ==
event.ACTION_CANCEL)
{

if(gasButtonID == ptrId)
{
setFiring(false);
gasButtonID = -1;
handled = true;
}
if(turnButtonID == ptrId)
{
mRotating = 0;
turnButtonID = -1;
handled = true;
}
handled = true;
}

}
return handled;
}

During testing I found consistent problems when performing the
following pattern:

1) Touch finger 1 down on gas button area
2) Touch finger 2 down on turn button area
3) Lift finger 1 off of gas button
4) Touch finger 1 back on to gas button

The problem is that after performing this pattern, the gas button
fails to work.  Lifting the gas button and then placing it down a
third time causes the button to work again.  This is consistent every
time I try this. Debugging yielded the following strange results:

1) Finger 1 goes down at location X, Y.
 X = X
 Y = Y
 action = ACTION_DOWN,
 ptrID = 0
 ptrIndex = 0
 numEvents = 1
2) Finger 2 goes down at location X2, Y2.
 X = X2
 Y = Y2
 action = ACTION_POINTER_DOWN
 ptrID = 1
 ptrIndex = 1
 numEvents = 2
3) Finger 1 goes up
X = X
Y = Y
action = ACTION_POINTER_UP
ptrID = 0
ptrIndex = 0
num

[android-developers] Re: Android 2.0: Why does my transparent background turn white while scrolling??

2010-01-07 Thread Flying Coder
never mind, I found the answer:  
http://developer.android.com/resources/articles/listview-backgrounds.html

On Jan 7, 10:08 am, Flying Coder  wrote:
> Hi,
>     I'm using a ListView with a transparent background.  It works fine
> in Android 1.5 & 1.6, but in Android 2.0 and later, the ListView
> background turns white while scrolling.  I want it to stay
> transparent, just like in 1.5 & 1.6.
>
>     Does anyone know what's going on, or better yet, how I can get
> this working correctly?
>
> Thanks a bunch!
>
> Steve
-- 
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] market doesn't refresh downloads?

2010-01-07 Thread Wayne Wenthin
I actually came to look if anyone else has seen this so yes.  I am stuck on
yesterday for market stats.   Was hoping to break 5k on downloads but may
never know now.   Hopefully this means they are making the market stats
better???  One can always hope.


2010/1/7 Éva Lovrencsics 

> Hello,
>
> My downloads and installs stopped two days ago, and I don't see any
> changes on the market (developer console). They never stay the same,
> so I think, market doesn't refresh them.
> Anybody recognized this?
>
> Evi
>
> --
> 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
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums
-- 
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: market doesn't refresh downloads?

2010-01-07 Thread jeffro
I see the same issue.

Jeff
___
Trackaroo.com
Trackmaster - Motorsports Lap Timer http://trackmaster.trackaroo.com
Dynomaster - Performance Dyno http://dynomaster.trackaroo.com

On Jan 7, 7:30 am, Éva Lovrencsics  wrote:
> Hello,
>
> My downloads and installs stopped two days ago, and I don't see any
> changes on the market (developer console). They never stay the same,
> so I think, market doesn't refresh them.
> Anybody recognized this?
>
> Evi
-- 
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: No route to host issue, but Browser application works fine

2010-01-07 Thread Wayne Wenthin
Mine is happening on Live devices so I guess I spoke too soon.

On Thu, Jan 7, 2010 at 3:27 AM, g...@devicedriven wrote:

> yup..you can refer to the localhost by this ip-->10.0.2.2
> This is because when you are specifying localhost to the device/
> emulator it is a reference to the phone\emulator itself and not the
> local machine
> read this too-->http://developer.android.com/guide/appendix/faq/
> commontasks.html#localhostalias
>
> On Jan 7, 7:15 am, Kenn Min Chong  wrote:
> > OKOK, I think I found out what the issue is, but can't explain why. I
> > was trying to connect to a webservice located on the same machine as
> > the emulator was running. I tried referring to the local machine by IP
> > and by name, but I always get the "no route to host" error. But when I
> > connect to the same webservice, but hosted on a different machine
> > altogether, it works fine! So, what am I missing here?
> >
> > On Jan 6, 8:55 pm, Kenn Min Chong  wrote:
> >
> > > I don't get it. I'm having this issue in the emulator. Is this an
> > > emulator only issue or  it affects real devices too? This used to not
> > > do this, did a recent SDK update break this functionality?
> >
> > > On Jan 6, 8:28 pm, Wayne Wenthin  wrote:
> >
> > > > You are not alone.   I have this every once in awhile,  I know that
> they
> > > > have already logged in due to where it generates the error.   It's
> annoying
> > > > to say the least.  I'm now working on catching the exception and
> retrying
> > > > since it is just trying to put a json object to my server
> >
> > > > On Wed, Jan 6, 2010 at 3:07 PM, Kenn Min Chong 
> wrote:
> >
> > > > > Hey guys!
> > > > >   So, this is very frustrating. I already have
> >
> > > > >  > > > > permission>
> >
> > > > > in my manifest, but when my application tries to make a webservice
> > > > > call (I'm using a HttpURLConnection object to do this via connect()
> > > > > method), I'm getting an exception of "No route to host".
> >
> > > > > The built-in Browser application is able to access the internet
> > > > > properly, so I'm guessing it's something in my project. Any ideas?
> >
> > > > > Kenn.
> >
> > > > > --
> > > > > 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
> >
> > > > --
> > > > Writing code is one of few things
> > > > that teaches me I don't know everything.
> >
> > > > Join the Closed Beta of Call Girl Managerhttp://
> www.fuligin.com/forums
> >
> >
>
> --
> 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
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums
-- 
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: Multitouch support in Android 2.0

2010-01-07 Thread Dianne Hackborn
On Thu, Jan 7, 2010 at 7:37 AM, Mirmathrax  wrote:

> 4) Finger 1 goes back down at location X, Y
> X = X2
> Y = Y2
> action = ACTION_POINTER_DOWN
> ptrID = 0
> ptrIndex = 0
> numEvents = 2
>
> ** Here is the first problem:   The X and Y coordinates returned
> are incorrect, they are the coordinates for the other finger (finger
> 2).  When finger 1 was removed, finger 2's data moved to the 0 index,
> but it still retained ID 1.  When finger 1 went back down, it
> correctly was identified as ID 0, but instead of adding a new index
> for finger 1 data, it just returns index 0, which is finger 2's
> data!
>

You are only listing one coordinate for this event, but in fact there are
two for both fingers.  It is really hard to understand what you are seeing
when you are not showing all of the data in the event.


> 5) Lift Finger 1 back up again from location X, Y
> X = X2
> Y= Y2
> action = ACTION_POINTER_UP
> ptrIndex = 1
> ptrID = 1
> numEvents = 2
>
> *** WHATWHAT?!?  I lifted finger 1 up, which should be ID 0,  why is
> ID 1 reporting that it goes up.  Also, why is it given data index 1,
> which I would assume should be finger 1's data, but the coordinates
> are still those of finger 2.  Yes, I have a headache too...
>

Again, when the up occurs, the motion event contains the points for the
finger going up as well as any other fingers that are currently down.

I am not going to respond in detail to the remaining stuff, because I can't
really understand what you are seeing due to not showing all of the data.  I
would also again please ask that you look at Pointer Location -- you should
 see when using it that the correct data is actually generated, and you can
look at the code to see how the different event transitions are processed.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: scaling game images according display sizes

2010-01-07 Thread Dianne Hackborn
If you are loading your images as drawables, the framework will pre-scale
the bitmap for you so it shouldn't need to be scaled at draw time.  If you
are  using the lower-level APIs to load bitmaps, you will need to use these
appropriately to have them scaled for you.  You can look at the various APIs
introduced in 1.6 for controlling the scaling.

Fwiw, there are no "stability" problems I know of with SurfaceView in 1.5.
 It is used quite a bit throughout the system.

On Thu, Jan 7, 2010 at 6:38 AM, Andrea  wrote:

> Hi Jason,
>
> On 7 Gen, 05:11, Jason Arora  wrote:
> > Are you drawing in a separate thread (like the LunarLander example)?
> > If not and your game is real-time, I seriously recommend switching to
> > that model.
>
> I don't use a SurfaceView (like LunarLander) but a normal view because
> in my tests I found it much more stable then the surfaceView. Keep in
> mind that android was 1.5. With 1.6/2.* things maybe changed, I have
> to test it. There are no threads in the game apart the one used for
> loading all the images before the game starts.
>
> >
> > Also, I don't believe you should be seeing a slow-down in
> > compatibility mode... In my experience, it has worked pretty well.
>
> Trust me, with the code structure explained before the frame rate
> slows down, I tested it on the DROID device at last london android
> lab.
>
> Andrea
>
> > On Jan 6, 11:56 am, Andrea  wrote:
> >
> > > Hi Robert, thanks for the reply.
> > > Ok the images are loaded as Bitmaps (not drawable) and drawed on the
> > > onDraw(Canvas c) method of a view. Inside that method I invalidate()
> > > all the view. So the game runs as fast as it can. The game is using
> > > dirty rects technique to redraw only the portions of the screen that
> > > need to be changed. Here is the simply code structure:
> >
> > > //on a view
> > > private void onDraw(Canvas c){
> >
> > >//do staff
> >
> > >invalidate();
> >
> > > }
> >
> > > if you need some other info, tell me it.
> >
> > > a.p.
> >
> > > Robert Green ha scritto:
> >
> > > > What's your design like?  How are you drawing everything?  If you
> tell
> > > > me that, I can offer some suggestions.
> >
> > > > On Jan 6, 9:02 am, Andrea  wrote:
> > > > > Hi
> > > > > I developed a game with the g1 in my mind. Now I want to support
> large
> > > > > screen sizes but I don't want to add in the apk different images
> for
> > > > > different screen sizes because now the apk is 3mb and when
> installed
> > > > > trought market it became 6mb (due to protection on). If i have to
> > > > > double the images to support new screens, the apk would be too
> heavy
> > > > > (about 13mb, i think) so I'm wondering to know if scaling images at
> > > > > runtime by myself (without compatibility mode) maybe the best way
> for
> > > > > supporting larger screens. Someone tried this solution?
> Compatbility
> > > > > mode does a great work in scaling images but it slows down
> drastically
> > > > > the framerate (i think because the scale operation is made every
> time
> > > > > an image is used/moved and not only once on the load of the image
> > > > > itself).
> >
> > > > > 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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] A problem of drawing on WVGA screen

2010-01-07 Thread Dianne Hackborn
You need to update to support different densities.  You are probably
creating a bitmap in compatibility mode that would thus be the size of an
HVGA screen, so when you draw it to your window it needs to be scaled up for
the higher density screen.  Once you use android:targetSdkVersion="4", the
compatibility code will be turned off, so you will be working in the true
pixel density of the screen.  Of course your app needs to be able to deal
with this.

On Thu, Jan 7, 2010 at 5:52 AM, chaozh  wrote:

> Hi all:
> I wrote a reading software. I implemented the page turning effect when
> user tap the screen to turn to next/pre page. The display is ok on G1
> (320X200 size) but it can not works well on Droid(480*854 size), the
> font looks a litter fuzzy, not clear as G1.
> I explain my codes for page turning:
> 1) create a canvas A
> 2) create bitmap.
> 3) set bitmap on canvas A
> 4) draw the new page content on canvas A
> 5) the current showing page has been saved in bitmap before since we
> do from step 1) to setp 4),
> 6) In order to implement the turning effect of scrolling from left to
> right, I draw the old bitmap part and draw the new bitmap part until
> the whole new bitmap has been drawn. all of bitmaps are drawing by
> canvas.drawBitmap() in onDraw() function.
> 7) when step 6) is done, it means the new page has been shown on
> screen, and the bitmap has been saved to use in next page turning.
>
> The above is the whole actions for my page turning. On G1, no problem.
> But on Droid phone, the font is not clear,
> I tried if I directly draw text by canvas in OnDraw() not through
> bitmap, It is ok, but it can not implement the page turning effect
> that I need. I don't know why, could you please help me to take a look
> and tell me where is wrong or miss some steps?
> Thanks a lot!
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.
-- 
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: APK not visible in market for HTC Tattoo Android Phone ?

2010-01-07 Thread Mark Wyszomierski
Hi,

I'm trying to verify this - my app has the following in its manifest:

 

 
 

but it still does not appear for tattoo. Is there something else we
need to add? It does have a camera, right?

Thanks

On Dec 30 2009, 11:15 am, Sena Gbeckor-Kove  wrote:
> Hi,
>
> It does indeed only show apps which are compatible with the device.
>
> S
> On 30 Dec 2009, at 17:13, croco wrote:
>
>
>
> > moneytoo thanks,
>
> > You exactly answered what i want to know!! because android would have
> > been the first software to not ensure ascending compatibility if i had
> > to have to build  ;)
>
> > I just hope is the unique reason why it does not appear on tattoo.
> > Saying that just because i would be surprised that the market search
> > done by users check on the fly only the apk compatible with device. If
> > it is able to do that on the fly WoW  this is the god OS.
>
> > Thank you.
>
> > Croco
>
> > On Dec 30, 12:40 pm, moneytoo  wrote:
> >> Just build your app using 1.6 SDK and add the supports-screens tag.
> >> Your app will be visible on devices 1.5 and later if you use  >> android:minSdkVersion="3" /> and will work as long you don't use 1.6
> >> specific API.
>
> >> On Dec 30, 12:23 pm, croco  wrote:
>
> >>> Thank you Sena for your hint,
>
> >>> i developped my app on version 3 
> >>> the  >>>                 android:normalScreens="true" android:largeScreens="true"
> >>>                 android:anyDensity="true" />
>
> >>> is for 1.6 + sdk 
>
> >>> Does it mean a 1.5 based APK is not visible on market for low density
> >>> device?
>
> >>> If the device are 1.6 + android based no problem i will update the APK
> >>> sdk but if some remain on 1.5 does it mean i need to version of my app
> >>> which i think it is impossible for package name rule on Android
> >>> Market.
>
> >>> Thank you.
>
> >>> Croco
>
> >>> On Dec 30, 10:54 am, Sena Gbeckor-Kove  wrote:
>
>  The tattoo has a low density screen if I remember correctly. Your 
>  application would have to support low density screens explicitly for it 
>  to show up in the market.
>
>  Regards
>  S
>
>  On 30 Dec 2009, at 10:38, croco wrote:
>
> > Hi all,
>
> > I'm reporting by Tattoo users than my game World of Bombs author
> > zeugame is not available on Tattoo + Android Market 1.6?
>
> > I really don't have idea what's wrong with this configuration?
>
> > Personally i've HTC magic + Android Market 1.6 and it rocks like for
> > severals thousands registered account on the game.
>
> > If some other Tattoo users could confirm please? And over all why it
> > is not visible in the market and how to solve this? Need to contact
> > Google?
>
> > Thank you for your help.
>
> > Best Regards
>
> > Croco
>
> > --
> > 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
>
>  ---
>
>  Sena Gbeckor-Kove
>  CTO/Founder - imKon
>
>  UK : +44 7788 146652
>  NL : +31 62 434 1290
>  s...@imkon.com    |    www.imkon.com
>
>  Asia (Singapore) :
>  35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, 
>  Singapore
>
>  Europe (London) :
>  145-157 St John's St, EC1V 4PY London, UK
>
>   smime.p7s
>  3KViewDownload
>
> > --
> > 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
>
> ---
>
> Sena Gbeckor-Kove
> CTO/Founder - imKon
>
> UK : +44 7788 146652
> NL : +31 62 434 1290
> s...@imkon.com    |    www.imkon.com
>
> Asia (Singapore) :
> 35 Selegie Road, #09-14/15 Parklane Shopping Mall, 188307 Singapore, Singapore
>
> Europe (London) :
> 145-157 St John's St, EC1V 4PY London, UK
>
>  smime.p7s
> 3KViewDownload
-- 
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: Redirect in WebView

2010-01-07 Thread nikhil
Any clue guys?

On Jan 5, 10:20 am, nikhil  wrote:
> I am trying to open a URL using a webview. This URL redirects itself
> to another page. For some reason theredirectdoesnot open up inside
> the webview. It just opens up into a new browser. Is there some
> setting in the webview control that can prevent this from happening?
-- 
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: market doesn't refresh downloads?

2010-01-07 Thread Maps.Huge.Info (Maps API Guru)
My guess is that a market upgrade is in progress. It would seem to be
timed with the N1 release, however, it may be that the market people
are slightly behind the curve and are still testing.

I could be wrong of course, but it seems like the entire market is
frozen, stats, movement of apps in the popularity index, etc. To me,
this could only be rationally explained as a database freeze to allow
for an upgrade.

-John Coryat

"Radar Now!"

"What Zip Code?"
-- 
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: Performance issue: Dalvik VM is >20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
The Dalvik JIT appears to result in a 1.7x improvement when run on an
armv7.

Here's the post from the Android team:
http://groups.google.com/group/android-platform/browse_thread/thread/331d5f5636f5f532/dee6e0a81ae72264?#dee6e0a81ae72264

The Android team's independent benchmark results are here (done by
0xlab): 
http://groups.google.com/group/0xlab-devel/browse_thread/thread/1edef26f4e5b7427


-- 
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] Setting preferred home activity from application code

2010-01-07 Thread kristianlm


Hi folks!

I'm trying to have my home-screen application register itself as the
default home-screen so the user is not prompted with the
IntentResolver's list of all the available home-activities.

this is my code:

private void makePreferred() {
PackageManager pm = getPackageManager();
IntentFilter f = new IntentFilter("android.intent.action.MAIN");
f.addCategory("android.intent.category.HOME");
f.addCategory("android.intent.category.DEFAULT");
ComponentName cn = new ComponentName("com.example.android.home",
"com.example.android.home.Home");
pm.addPreferredActivity(f, IntentFilter.MATCH_CATEGORY_EMPTY, 
null,
cn);

I have the android.permission.SET_PREFERRED_APPLICATIONS set in the
manifest. After executing the code above, the logs claim things have
been added like expected (same logs as when I tick off "Make default"
from IntentResolver's list). However, when I proceed by clicking home,
the list still shows up and the logs say:

INFO/PackageManager(52): Result set changed, dropping preferred
activity for Intent { act=android.intent.action.MAIN cat=
[android.intent.category.HOME] flg=0x1020 } type null

So it seems the resolver deletes the default entry. Am I doing
something wrong, or is this a security measure? What are the ideas
behind this?

Thanks folks!
Kris
-- 
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: Image not dithering

2010-01-07 Thread abhi
Has anyone got dithering to work?

On Jan 6, 3:42 pm, abhi  wrote:
> BTW  I am using a 320x640 device.
>
> On Jan 6, 3:03 pm, abhi  wrote:
>
> > Hi,
>
> > I am using this 
> > imagehttp://android.amberfog.com/wp-content/uploads/2009/11/001.png
> > from this page:http://android.amberfog.com/?p=247totest dithering
> > on my android phone. However, when I used the android:dither="true"
> > option in my XML file and when I added android:tileMode="repeat" as
> > well, it did not make any difference and the image did not change at
> > all. Any idea as to why this is happening? Does dithering depend on
> > the device being used or something like that?
>
> > 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: Performance issue: Dalvik VM is >20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
Hi dm1973,

Actually these tests are not useless.  Of course good modern compilers
should optimize away the code above.  The reality is that the Android
compiler is not a good compiler so it does not optimize the above
code.  This allows the simple example above to show the performance
limitations of the Dalvik compiler.

The point of my sample code above is to quickly show the Dalvik vs C
performance without showing all the extraneous supporting code for
running the test.  It's easy enough to subtly change the example
posted above so it doesn't get optimized away though even by a good
compiler.  I.e. simply return the value from the method above and post
it to a text field in Android or log it in in C.  I actually ran the
tests that way (where the processing is not optimized away) to get the
results that I posted above.
-- 
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: Performance issue: Dalvik VM is >20x slower than most modern Java VMs

2010-01-07 Thread Biosopher
Just following up to my initial post, I have implemented the above
look in native code using Android's SDK.  The native code performs in
a few milliseconds as hoped.  This goes to confirm that for compute
intensive tasks, Dalvik can be hundreds of times slower than native.
-- 
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 Market Ranking Error

2010-01-07 Thread polyclefsoftware
As of this writing, the market rankings are messed up again. At least
viewing them on my Droid.

Could someone else confirm that the listings for Top Paid in
Cards&Casino is double listing apps ranked 11-20 as 1-10 and 11-20,
rather than showing the actual 1-10?

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

Re: [android-developers] Re: market doesn't refresh downloads?

2010-01-07 Thread Wayne Wenthin
I had something all typed out but it sounded too snarky.   Sound like Google
is getting so big that one department doesn't talk to the other.

On Thu, Jan 7, 2010 at 8:36 AM, Maps.Huge.Info (Maps API Guru) <
cor...@gmail.com> wrote:

> My guess is that a market upgrade is in progress. It would seem to be
> timed with the N1 release, however, it may be that the market people
> are slightly behind the curve and are still testing.
>
> I could be wrong of course, but it seems like the entire market is
> frozen, stats, movement of apps in the popularity index, etc. To me,
> this could only be rationally explained as a database freeze to allow
> for an upgrade.
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"
>
> --
> 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
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums
-- 
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: Who wants Multi-touch in all Android versions?

2010-01-07 Thread Dan Sherman
I'd love to see this as well :)


On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn  wrote:

> Well I would really like to see this, given that prior to 2.0 there was no
> multitouch information propagated through the framework at all, and
> applications do not have permission to open the raw driver.
>
>
> On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
> softwareforme@gmail.com> wrote:
>
>> Our solution is software only, works on production phones (i.e., no
>> rooting or modding required).
>>
>> Scott
>> SoftwareForMe.com
>> Makers of PhoneMyPC
>>
>>
>>  On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>>
>>> I'm curious about this. Does multi-touch require hardware changes? Or
>>> am I reading this right that it can all be done through software?
>>>
>>> Nathan
>>>
>>> --
>>> 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
>>
>>
>>
>>
>> --
>> Warm regards,
>> The PhoneMyPC Team
>>
>> --
>> 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> --
> 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
>
-- 
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] converting ycbcr 420 to rgb

2010-01-07 Thread tdom...@googlemail.com
Hi,
I want to display the preview frames of an android smartphone on an
opengl texture. As opengl es only support RGB and the preview frame is
encoded with YCbCr 4:2:0. Therefor I have to convert from one to the
other. Though I wasn't successful in doing so, so far. Maybe someone
can help me with it. I found some sources/example code here:

http://groups.google.de/group/android-developers/browse_thread/thread/c85e829ab209ceea/adca218ec3555c81?lnk=gst&q=ycbcr+420+rgb#adca218ec3555c81
http://www.netmite.com/android/mydroid/donut/development/tools/yuv420sp2rgb/yuv420sp2rgb.c
http://blog.tomgibara.com/post/132956174/yuv420-to-rgb565-conversion-in-android

my code can be found here:
http://code.google.com/p/andar/source/browse/#svn/trunk/AndOpenGLCam/src/edu/dhbw/andopenglcam
especially the classes CameraPreviewHandler.java and
OpenGLCamRenderer.java are important.

When using the example from the android project(http://tinyurl.com/
y9l36tl) it results in this:
http://picfront.de/d/Saj1pYfo4/IMG_7715.jpg

I can get the best result from using the outcommented formula from
(http://tinyurl.com/y9l36tl) and inverting RGB in BGR:
http://picfront.de/d/x4iMqes9/IMG_7717.jpg
it shows red planes in green and some blue edges around everything...

any help is appreciated :D
-- 
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] Enhancement to Emulator

2010-01-07 Thread Thisara Rupasinghe
Hi all,

Im trying to write an application using bluetooth. But using the android
emulator, can i try that out. I mean is it emulated that feature(bluetooth).
Or even the camera feature. And also if i would like to enhance the
capabilities of this emulator can i contribute? Where can i find the source
of that emulator?

I would like to use computers web cam and the bluetooth devices as
emulators, if there are those features in the running machine. Is that
pissble or can u gv any comments on this to my self.

Thanks

-- 
Thanks & Regards,
Thisara.
-- 
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 2.1 SDK

2010-01-07 Thread Dinesh Harjani

Have faith, guys; I'm sure it's coming.
-- 
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: Enhancement to Emulator

2010-01-07 Thread David Turner
On Thu, Jan 7, 2010 at 10:36 AM, Thisara Rupasinghe wrote:

> Hi all,
>
> Im trying to write an application using bluetooth. But using the android
> emulator, can i try that out. I mean is it emulated that feature(bluetooth).
> Or even the camera feature. And also if i would like to enhance the
> capabilities of this emulator can i contribute? Where can i find the source
> of that emulator?
>
>
These features are not emulated and are planned for 2010, if not preempted
by more important stuff.
You can have a look at the emulator sources under external/qemu in the
Android repository.


> I would like to use computers web cam and the bluetooth devices as
> emulators, if there are those features in the running machine. Is that
> pissble or can u gv any comments on this to my self.
>
>
Note that being able to do that will require at the very least changes to
the kernel configuration used for the emulator, plus some changes to the
system itself.


> Thanks
>
> --
> Thanks & Regards,
> Thisara.
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To post to this group, send email to android-platf...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/android-platform?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: Who wants Multi-touch in all Android versions?

2010-01-07 Thread theSmith
Scott,

Please publish your code, I would love to take a look at it :-)

-theSmith

On Jan 7, 12:48 pm, Dan Sherman  wrote:
> I'd love to see this as well :)
>
> On Thu, Jan 7, 2010 at 9:30 AM, Dianne Hackborn  wrote:
> > Well I would really like to see this, given that prior to 2.0 there was no
> > multitouch information propagated through the framework at all, and
> > applications do not have permission to open the raw driver.
>
> > On Thu, Nov 12, 2009 at 11:03 PM, SoftwareForMe.com SoftwareForMe.com <
> > softwareforme@gmail.com> wrote:
>
> >> Our solution is software only, works on production phones (i.e., no
> >> rooting or modding required).
>
> >> Scott
> >> SoftwareForMe.com
> >> Makers of PhoneMyPC
>
> >>  On Thu, Nov 12, 2009 at 11:02 PM, Nathan wrote:
>
> >>> I'm curious about this. Does multi-touch require hardware changes? Or
> >>> am I reading this right that it can all be done through software?
>
> >>> Nathan
>
> >>> --
> >>> 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
>
> >> --
> >> Warm regards,
> >> The PhoneMyPC Team
>
> >> --
> >> 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
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see and
> > answer them.
>
> > --
> > 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
-- 
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: Enhancement to Emulator

2010-01-07 Thread theSmith
Noting what David said, you are better off using a development device
like the google dev phone 1.

-theSmith

On Jan 7, 1:49 pm, David Turner  wrote:
> On Thu, Jan 7, 2010 at 10:36 AM, Thisara Rupasinghe 
> wrote:
>
> > Hi all,
>
> > Im trying to write an application using bluetooth. But using the android
> > emulator, can i try that out. I mean is it emulated that feature(bluetooth).
> > Or even the camera feature. And also if i would like to enhance the
> > capabilities of this emulator can i contribute? Where can i find the source
> > of that emulator?
>
> These features are not emulated and are planned for 2010, if not preempted
> by more important stuff.
> You can have a look at the emulator sources under external/qemu in the
> Android repository.
>
> > I would like to use computers web cam and the bluetooth devices as
> > emulators, if there are those features in the running machine. Is that
> > pissble or can u gv any comments on this to my self.
>
> Note that being able to do that will require at the very least changes to
> the kernel configuration used for the emulator, plus some changes to the
> system itself.
>
> > Thanks
>
> > --
> > Thanks & Regards,
> > Thisara.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-platf...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platform+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/android-platform?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: How to use the "Object android.widget.AdapterView.getItemAtPosition(int position)"

2010-01-07 Thread theSmith
If the CheckBox is inside an AdapterView then you can cast
the Object returned by getItemAtPosition() to a CheckBox, other wise
if it is a view then you really should be using view holders to cut
down on execution times.

I am NOT here to read the android docs to you. Go do it yourself. Read
the docs, the blog, watch the google I/O videos, then maybe I'll
answer some more intelligent questions.

-theSmith

On Jan 7, 2:30 am, Manoj  wrote:
> Sir I am doing the same thing what you are tell but i am not getting
> the way tousethe returned object by getItemAtPosition() to get the
> checkbox which is a item in list.
>
> On Jan 7, 10:53 am, theSmith  wrote:
>
> > Manoj,
>
> > I'm not sure if I understood you correctly, but I believe you are
> > looking for getViewById(R.id.whatever);
> > cast the result to a ListView, then call getItemAtPosition.
>
> > also there is a group for android 
> > beginners.http://groups.google.com/group/android-beginners
>
> > P.S. Please brush up on your knowledge of the android 
> > documentationhttp://developer.android.com/guide/index.html
> > There are plenty of examples that will help you get started.
>
> > -theSmith
>
> > On Jan 6, 3:47 am, Manoj  wrote:
>
> > > Hi,
> > > I am new for Android development. I want touse"Object> > 
> > > android.widget.AdapterView.getItemAtPosition(int position)" method for
> > > getting the items from ListView. But I am not getting the way to make
> > > it happen.
> > > Please help me out on this topic.
-- 
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: Enhancement to Emulator

2010-01-07 Thread Disconnect
Dev phone 2 - dev phone 1 firmware is still hidden/removed.

Also, for the "planned for 2010" features, where can we see a list of such
items?

On Thu, Jan 7, 2010 at 1:58 PM, theSmith  wrote:

> Noting what David said, you are better off using a development device
> like the google dev phone 1.
>
> -theSmith
>
> On Jan 7, 1:49 pm, David Turner  wrote:
> > On Thu, Jan 7, 2010 at 10:36 AM, Thisara Rupasinghe <
> thisara...@gmail.com>wrote:
> >
> > > Hi all,
> >
> > > Im trying to write an application using bluetooth. But using the
> android
> > > emulator, can i try that out. I mean is it emulated that
> feature(bluetooth).
> > > Or even the camera feature. And also if i would like to enhance the
> > > capabilities of this emulator can i contribute? Where can i find the
> source
> > > of that emulator?
> >
> > These features are not emulated and are planned for 2010, if not
> preempted
> > by more important stuff.
> > You can have a look at the emulator sources under external/qemu in the
> > Android repository.
> >
> > > I would like to use computers web cam and the bluetooth devices as
> > > emulators, if there are those features in the running machine. Is that
> > > pissble or can u gv any comments on this to my self.
> >
> > Note that being able to do that will require at the very least changes to
> > the kernel configuration used for the emulator, plus some changes to the
> > system itself.
> >
> > > Thanks
> >
> > > --
> > > Thanks & Regards,
> > > Thisara.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "android-platform" group.
> > > To post to this group, send email to android-platf...@googlegroups.com
> .
> > > To unsubscribe from this group, send email to
> > > android-platform+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-platform?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
>
-- 
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 2.1 SDK

2010-01-07 Thread Greg Donald
On Thu, Jan 7, 2010 at 12:38 PM, Dinesh Harjani
 wrote:
> Have faith, guys; I'm sure it's coming.

Of course it's coming, faith is not required to believe that.  It's
the time offset that is the problem.

Phones are being sold with software we developers haven't had a chance
to evaluate our apps on.  Our lead time is now not just zero but days
into the negative.  It's completely inconsiderate of developer
reputations, it's just flat out wrong.

This isn't the first time, so the faith Google has instilled in me is
that it will continue to consider developers to be not very important.

And again, look at how this is being handled here:

http://www.google.com/support/forum/p/Android+Market/thread?fid=4c5752ca3e5af4ff00047c96e4a64107&hl=en

Three weeks now the stats have been broken.


-- 
Greg Donald
http://destiney.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: Enhancement to Emulator

2010-01-07 Thread David Turner
On Thu, Jan 7, 2010 at 11:12 AM, Disconnect  wrote:

> Dev phone 2 - dev phone 1 firmware is still hidden/removed.
>
> Also, for the "planned for 2010" features, where can we see a list of such
> items?
>
>
You can't, it's in my head :-)


> On Thu, Jan 7, 2010 at 1:58 PM, theSmith  wrote:
>
>> Noting what David said, you are better off using a development device
>> like the google dev phone 1.
>>
>> -theSmith
>>
>> On Jan 7, 1:49 pm, David Turner  wrote:
>> > On Thu, Jan 7, 2010 at 10:36 AM, Thisara Rupasinghe <
>> thisara...@gmail.com>wrote:
>> >
>> > > Hi all,
>> >
>> > > Im trying to write an application using bluetooth. But using the
>> android
>> > > emulator, can i try that out. I mean is it emulated that
>> feature(bluetooth).
>> > > Or even the camera feature. And also if i would like to enhance the
>> > > capabilities of this emulator can i contribute? Where can i find the
>> source
>> > > of that emulator?
>> >
>> > These features are not emulated and are planned for 2010, if not
>> preempted
>> > by more important stuff.
>> > You can have a look at the emulator sources under external/qemu in the
>> > Android repository.
>> >
>> > > I would like to use computers web cam and the bluetooth devices as
>> > > emulators, if there are those features in the running machine. Is that
>> > > pissble or can u gv any comments on this to my self.
>> >
>> > Note that being able to do that will require at the very least changes
>> to
>> > the kernel configuration used for the emulator, plus some changes to the
>> > system itself.
>> >
>> > > Thanks
>> >
>> > > --
>> > > Thanks & Regards,
>> > > Thisara.
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "android-platform" group.
>> > > To post to this group, send email to
>> android-platf...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > android-platform+unsubscr...@googlegroups.com
>> 
>> >
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-platform?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
>>
>
>
> --
> 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
>
-- 
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: Multitouch support in Android 2.0

2010-01-07 Thread Mirmathrax
Thank you Dianne,

>From the following code:

  if(numevents > 1)
 ptrId = (action & MotionEvent.ACTION_POINTER_ID_MASK)
 
MotionEvent.ACTION_POINTER_ID_SHIFT;

  action = action & MotionEvent.ACTION_MASK;

  int ptrIndex = event.findPointerIndex(ptrId);

  float X = event.getX(ptrIndex);
  float Y = event.getY(ptrIndex);

I thought that when multiple fingers are down,  the X and Y returned
from the above code would be the ones associated with the event that
was generated, but I am getting the X and Y associated with the other
finger from the above code.

I will take a good thorough look at the pointerLocation sample and if
I still have problems, I will post more detail with all the points I
can find!


Thanks!

-Colin

On Jan 7, 11:15 am, Dianne Hackborn  wrote:
> On Thu, Jan 7, 2010 at 7:37 AM, Mirmathrax  wrote:
> > 4) Finger 1 goes back down at location X, Y
> >     X = X2
> >     Y = Y2
> >     action = ACTION_POINTER_DOWN
> >     ptrID = 0
> >     ptrIndex = 0
> >     numEvents = 2
>
> > ** Here is the first problem:   The X and Y coordinates returned
> > are incorrect, they are the coordinates for the other finger (finger
> > 2).  When finger 1 was removed, finger 2's data moved to the 0 index,
> > but it still retained ID 1.  When finger 1 went back down, it
> > correctly was identified as ID 0, but instead of adding a new index
> > for finger 1 data, it just returns index 0, which is finger 2's
> > data!
>
> You are only listing one coordinate for this event, but in fact there are
> two for both fingers.  It is really hard to understand what you are seeing
> when you are not showing all of the data in the event.
>
> > 5) Lift Finger 1 back up again from location X, Y
> >     X = X2
> >     Y= Y2
> >     action = ACTION_POINTER_UP
> >     ptrIndex = 1
> >     ptrID = 1
> >     numEvents = 2
>
> > *** WHATWHAT?!?  I lifted finger 1 up, which should be ID 0,  why is
> > ID 1 reporting that it goes up.  Also, why is it given data index 1,
> > which I would assume should be finger 1's data, but the coordinates
> > are still those of finger 2.  Yes, I have a headache too...
>
> Again, when the up occurs, the motion event contains the points for the
> finger going up as well as any other fingers that are currently down.
>
> I am not going to respond in detail to the remaining stuff, because I can't
> really understand what you are seeing due to not showing all of the data.  I
> would also again please ask that you look at Pointer Location -- you should
>  see when using it that the correct data is actually generated, and you can
> look at the code to see how the different event transitions are processed.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
-- 
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: Enhancement to Emulator

2010-01-07 Thread Disconnect
I do have a can opener.. :P

On Thu, Jan 7, 2010 at 2:25 PM, David Turner  wrote:

>
>
> On Thu, Jan 7, 2010 at 11:12 AM, Disconnect wrote:
>
>> Dev phone 2 - dev phone 1 firmware is still hidden/removed.
>>
>> Also, for the "planned for 2010" features, where can we see a list of such
>> items?
>>
>>
> You can't, it's in my head :-)
>
>
>> On Thu, Jan 7, 2010 at 1:58 PM, theSmith wrote:
>>
>>> Noting what David said, you are better off using a development device
>>> like the google dev phone 1.
>>>
>>> -theSmith
>>>
>>> On Jan 7, 1:49 pm, David Turner  wrote:
>>> > On Thu, Jan 7, 2010 at 10:36 AM, Thisara Rupasinghe <
>>> thisara...@gmail.com>wrote:
>>> >
>>> > > Hi all,
>>> >
>>> > > Im trying to write an application using bluetooth. But using the
>>> android
>>> > > emulator, can i try that out. I mean is it emulated that
>>> feature(bluetooth).
>>> > > Or even the camera feature. And also if i would like to enhance the
>>> > > capabilities of this emulator can i contribute? Where can i find the
>>> source
>>> > > of that emulator?
>>> >
>>> > These features are not emulated and are planned for 2010, if not
>>> preempted
>>> > by more important stuff.
>>> > You can have a look at the emulator sources under external/qemu in the
>>> > Android repository.
>>> >
>>> > > I would like to use computers web cam and the bluetooth devices as
>>> > > emulators, if there are those features in the running machine. Is
>>> that
>>> > > pissble or can u gv any comments on this to my self.
>>> >
>>> > Note that being able to do that will require at the very least changes
>>> to
>>> > the kernel configuration used for the emulator, plus some changes to
>>> the
>>> > system itself.
>>> >
>>> > > Thanks
>>> >
>>> > > --
>>> > > Thanks & Regards,
>>> > > Thisara.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups
>>> > > "android-platform" group.
>>> > > To post to this group, send email to
>>> android-platf...@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> > > android-platform+unsubscr...@googlegroups.com
>>> 
>>> >
>>> > > .
>>> > > For more options, visit this group at
>>> > >http://groups.google.com/group/android-platform?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
>>>
>>
>>
>> --
>> 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
>>
>
>
> --
> 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
>
-- 
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: Redirect in WebView

2010-01-07 Thread nikhil

Ok I got itNeed to add webviewclient to the webview so that the
redirect works..

On Jan 7, 10:28 am, nikhil  wrote:
> Any clue guys?
>
> On Jan 5, 10:20 am, nikhil  wrote:
>
> > I am trying to open a URL using a webview. This URL redirects itself
> > to another page. For some reason theredirectdoesnot open up inside
> > the webview. It just opens up into a new browser. Is there some
> > setting in the webview control that can prevent this from happening?
-- 
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 make any service running automatically when the phone is turned on.

2010-01-07 Thread Nymann
Hi

My best shot will be, U make a receiver and get the following intent.



 
 


The start u service from this receiver, and off course define the
receiver extending BroadCastReceiver

Hope this helps.

Per

On Jan 7, 7:01 am, Manoj  wrote:
> Hi
> Please tell me the way to make any service running automatically when
> the phone is turned on.
>
> Manoj Chauhan
-- 
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: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-07 Thread dadical
Did anyone else see this get fixed?  I saw a 10pt drop from about 45
percent installed to under 35 in less than a day.  Things are slowly
climbing back up, but I haven't seen any "fix" yet.

On Dec 22 2009, 8:52 pm, Justin Giles  wrote:
> Here's an official answer:
>
> http://www.google.com/support/forum/p/Android+Market/thread?tid=4c575...
>
>
>
> On Tue, Dec 22, 2009 at 4:55 PM, dadical  wrote:
> > Same thing with my application, Screebl.  Dropped by around 10% in one
> > night.  I've released lots of updates over the past few months,
> > averaging about one/week, and have never seen this happen.  Perhaps
> > Google has changed the definition of an active installation?
>
> > Disturbing as active install count is the most heavily weighted factor
> > in calculating ranking in the market.
>
> > pawpaw17 wrote:
> > > I released an upgrade to my app on Saturday night and since have
> > > noticed an unusual number of uninstalls. My app has been out for 8
> > > months, and this is very unusual. Has anyone else noticed this? I'm
> > > wondering if there is anything related to the market, or a new OS
> > > version hitting, or contracts with one of the phones coming up?
>
> > > Any thoughts would be very appreciated.
>
> > > Thanks!
>
> > > pawpaw17
>
> > --
> > 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- 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] Charting in Android?

2010-01-07 Thread to...@webpro.com
Hey, I was wondering how charting works with android. Can I use the
google chart api or would I have to use something like aiCharts
http://www.artfulbits.com/Android/aiCharts.aspx
-- 
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: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-07 Thread Greg Donald
On Thu, Jan 7, 2010 at 2:00 PM, dadical  wrote:
> Did anyone else see this get fixed?  I saw a 10pt drop from about 45
> percent installed to under 35 in less than a day.  Things are slowly
> climbing back up, but I haven't seen any "fix" yet.

There's been no fix from Google, just that one person confirming the
problem followed by weeks of silence.


-- 
Greg Donald
http://destiney.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] Android Monkey Testing.

2010-01-07 Thread satish
Hi All,

I am executing Monkey testing on a Android device.
The command i am using is "adb shell monkey -p com.android.calculator2
-v 5000 > monkey-calculator.txt"

When we execute this command i suppose it should send 5000 events
to the device.In my case after sending event #150900 it stopped and i
see a message:


":Dropped: keys=0 pointers=0 trackballs=0 flips=0"

What does this message tell me?

I would appreciate any help.

Thanks,
Satish.

-- 
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 access an item form ListView

2010-01-07 Thread zv
I think the easiest way is to keep track of the checked state in a
member array/list.

Something like this.

boolean[] selectedItems = new boolean[10];

void handleItemClick(View view, long rowId)
{
CompoundButton checkBox = (CompoundButton)
view.findViewById(android.R.id.checkbox);
selectedItems[rowId] = checkBox.isChecked();
}



On Jan 6, 7:57 pm, Manoj  wrote:
> Hi
> I am using ListView with checkbox as items and want to access the
> checkbox status.
> Would anybody help me on this topic.
>
> Manoj Chauhan
-- 
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] XMl Verification Failed while installing Android SDK

2010-01-07 Thread Lord
Hi I am getting this error while trying to install the available
packages.I have used the Force Https to Http setting.
 I am a windoz user.


XML verification failed for 
http://dl-ssl.google.com/android/repository/repository.xml.
Error: Content is not allowed in prolog.

Any pointers???

-- 
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: Reliable GPS location

2010-01-07 Thread nr1
thx!

On 5 Jan., 00:48, Daan  wrote:
> You can use Location.getTime() this returns the UTC time of this fix,
> in milliseconds since January 1, 1970. Then you could get the current
> time and compare it to see if you find it accurate enough.
>
> On Jan 4, 10:14 pm, Lance Nanek  wrote:
>
> > You can call Location#getTime to see when the fix returned by
> > LocationManager#getLastKnownLocation was taken. The
> > getLastKnownLocation method doesn't start theGPS, so the fix may be
> > from a long time ago, and not be a good indicator of the current
> > location.
>
> > The accuracy of the fix refers to the accuracy at the time the fix was
> > taken. I don't see how it could be easily updated to refer to the
> > accuracy with respect to the current location. That would require
> > starting theGPSand taking another fix to find the current location,
> > in which case the new fix would become the last known location and
> > there would be no point.
>
> > If you want current fixes, use the
> > LocationManager#requestLocationUpdates methods.
>
> > On Jan 4, 6:07 am, nr1  wrote:
>
> > > Hi,
>
> > > i know how to get the calculatedGPSposition via getLastKnownLocation
> > > (). As tests show, this function really always returns the last known
> > > location, so it doesn't matter if there is agpsfix available.
>
> > > How can i check if the returned location isreliable?
> > > I tried it with getAccurracy(), but this function even returns a
> > > accurracy although nogpsfix is availavle (anymore). Is there a
> > > possibility to getgpsdop values?
>
> > > Used SDK is 1.6,
> > > thx
>
>
-- 
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] trouble with OpenGL ES extension

2010-01-07 Thread mhorse
Our team is developing a 3D game engine based on Android NDK 1.6. The
target hardware is HTC G1. However, I had a trouble with using OpenGL
ES extension.
Although HTC G1 supporting GL_ARB_vertex_buffer_object extension, I
can not find any obvious improving performance after I uesd it in my
programe. Did any one encounter the same problem?
The other question is where can I find reference of
GL_QUALCOMM_vertex_buffer_objecta and GL_QUALCOMM_direct_texture.
Thank you!
-- 
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] Removing the stack of Activity

2010-01-07 Thread Beena
Hi All,
I have problem of removing activity.
I have 5 Activities in sequence Activity1,  Activity2, Activity3,
Activity4, Activity5.
When I am at Activity5 there is a button through I can go to
Activity2.
Means jump from 5 to 2 with removing the Activity3 & 4.
How can I do that?

Please help regarding 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] Reccomendation for phone with Bluetooth SPP?

2010-01-07 Thread silverfox
I am just beginning my first Android project and it involves using
Bluetooth SPP.  Since the emulator does not support Bluetooth, I
decided I need to bite the bullet and buy a phone.  Should I get an
ADP2 or a Droid or just be patient and wait for a Nexus One?
Advantages or disadvantages of one choice over another?   Also, does
anyone hold out any hope of a version of the emulator coming out any
time soon with Bluetooth capability?
-- 
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 use speech recongintion java classes for launching music player app

2010-01-07 Thread techietone
hi all,
there are some java classes exposed for speech recognition . How can
they be used for launching a music player app. or maybe control the
music player  using voice commands.

regards
techietone
-- 
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] locales supported for voice dialer app

2010-01-07 Thread techietone
hi all,
I have seen in the recognizer.java file that the default locale used
for voice recognition is Locale.US .
Which are the other locales supported ?


regards
pritesh
-- 
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 evaluate a javascript function

2010-01-07 Thread sathish chandra
hi,
   How to evaluate a javascript function loaded in a webview and get
the
return value


Regards
Sathish
-- 
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] User preference for background service

2010-01-07 Thread usml
Hi,
I have a background service which get started on power up, works fine.
Now I want to add preferences, and bring up the preferences editor
ONLY when user clicks the application icon from launch pad.Here's what
I have in manifest:















Problem is, when device is powered up, the preference editor get
invoked as well !
How to have the preference view NOT shown until user clicks on it from
launch pad? 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] Android applications using the Android framework

2010-01-07 Thread periyasamy mathes
bigchurch.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: PVMFFailure when using MediaPlayer for radio streams

2010-01-07 Thread HC
But if non-streamable video?


On 2009年12月14日, 下午5�r13分, YaushiIizuka  wrote:
> Hi.
>
> String url = "http://your.url";;
> MediaPlayer mp = new MediaPlayer();
> mp.setDataSource(url);
> mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
> mp.prepare();
> mp.start();
>
> On 10月23日, 午後3:28, dede  wrote:
>
> > Hi,
> > In 1.6,I also try to play stream through setDataSource(http://
> > xxx/.mp3),
> > but also it return IOException: prepare failed, status=0x1.
> > If set the url into windows media player, it can play correctly, I
> > wanna know your problem whether be resolved?
> > If yes, can u tell me the solution,thanks very much.
>
> > On 10月7日, 上午5时41分, iwhoyt  wrote:
>
> > > In 1.5 I was able to stream an mp3 over http by passing the url to
> > > setDataSource(). However I started gettingPVMFFailures in 1.6. For
> > > me the issue was the Content-Type http header. If the header was set
> > > correctly (Content-Type: audio/mpeg), the stream played. Otherwise if
> > > failed during PLAYER_INIT.
>
> > > On Sep 2, 2:32 am, siliconeagle  wrote:
>
> > > > Also the URl is a http (MP3) stream URL - as opposed tioo other opost
> > > > where RTSP is being tried. It looks like it should just work. Has
> > > > anyone else got streaming working via a streaming URL?
>
> > > > On Sep 1, 1:24 pm, siliconeagle  wrote:
>
> > > > > I am trying to build streaming radio into my app, which works fines
> > > > > streaming files over the internet, but when i try to use a shoutcast
> > > > > url in get the error below, which from the soruce code looks liek the
> > > > > mediaPlayer is looking for the duration in the header. Does anyone
> > > > > know if shoutcast urls will work withthe default media player? Or do i
> > > > > have to download chunks into a ping-pong buffer sor something? The url
> > > > > has no porblems downloading via the browser.
>
> > > > > the error is:-
>
> > > > > 09-01 11:53:25.634 E/MediaPlayer(16972): stop called in state 1
> > > > > 09-01 11:53:27.324 D/BatteryWidget(15623): Updating Views
> > > > > 09-01 11:53:30.445 E/PlayerDriver(   35): Command PLAYER_INIT
> > > > > completed with an error or infoPVMFFailure
> > > > > 09-01 11:53:30.445 E/MediaPlayer(16972): error (1, -1)
> > > > > 09-01 11:53:30.504 I/NotificationService(   55): enqueueToast
> > > > > pkg=net.robmunro.mypod 
> > > > > callback=android.app.ITransientNotification$Stub
> > > > > $pr...@4323b8f8 duration=1000
> > > > > 09-01 11:53:30.514 W/System.err(16972): java.io.IOException: Prepare
> > > > > failed.: status=0x1
> > > > > 09-01 11:53:30.644 W/System.err(16972): at
> > > > > android.media.MediaPlayer.prepare(Native Method)
> > > > > 09-01 11:53:30.644 W/System.err(16972): at
> > > > > net.robmunro.mypod.util.MediaPlayerWrapper.playMedia
> > > > > (MediaPlayerWrapper.java:111)
>
> > > > > the code i use is:-
> > > > > try {
> > > > > mPlayer.stop();
> > > > > mPlayer.reset();} catch (Exception e) {
>
> > > > > e.printStackTrace();}
>
> > > > > this.source=source;
> > > > > if (source.equals(Globals.SOURCE_LOCAL)) {
> > > > >  mPlayer.setDataSource(f.path);
> > > > >  buffered = 0;} else if 
> > > > > (source.equals(Globals.SOURCE_STREAM)) {
>
> > > > > mPlayer.setDataSource(f.remoteUrl);
> > > > >  buffered = 100;}
>
> > > > > mPlayer.prepare();
> > > > > mPlayer.start();
-- 
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

  1   2   >