[android-developers] Re: On screen orientation changes activity restarted.

2010-08-16 Thread pramod.deore
Hi, Martins. I had tried it by still activity restarted.

On Aug 16, 10:46 am, Martins Streņģis martin...@draugiem.lv wrote:
 add android:configChanges=orientation to your manifest in each activity

 activity android:name=Settings android:configChanges=orientation /

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Martins Streņģis
i dont know why but i doesn't work  on emulator on phones it works just fine
try it :)

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Tonny
you should remove keyboardHidden . Result:
android:configChanges=orientation


On Aug 16, 12:12 pm, pramod.deore deore.pramo...@gmail.com wrote:
 Hi everybody, I know on screen orientation changes activity restarted,
 but suppose i don't want to restart the activity then what should I
 do? I had tried it by adding in manifest.xml.
 android:configChanges=keyboardHidden|orientation

 and override   public void onConfigurationChanged(Configuration
 newConfig) {
         super.onConfigurationChanged(newConfig);
     }

 But still activity restarted each time when I change screen
 orientation. How to resolve this issue?

 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] Is there anyway to get to know, when an application has crashed or stopped completely?

2010-08-16 Thread Durg
Hi All,

I want to know, if there is any callback method/procedure to know when
a particular application has been crashed or stopped working
completely (thorugh code in any of the other applicaiton).

My use case :
First, i'm starting a watch dog application, which starts another
application internally (already installed application) by calling the
launcher activity of that.
Next, when the called application crashed/stopped due to some issue, I
want to start that application by calling it's launcher activity
again.

For this, could anyone please suggest me the correct procedure to do
this?

Thanks  Regards,
Durg

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread pramod.deore

Ok I had tried it but it doesn't work. Look I had developed one simple
application in that only I had print one line in onCreate method, but
each time when I change screen orientation that statement print (i.e.
which I had write in onCreate() method)

Here is my code

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;

public class ActivityTesting extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.out.println (Inside onCreate);
}

public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
}
}


and xml file is like

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.micro.activity
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon android:label=@string/
app_name
activity android:name=.ActivityTesting
  android:label=@string/app_name
  android:configChanges=orientation
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

/application
uses-sdk android:minSdkVersion=4 /

/manifest


and LogCat contains following output
08-16 12:04:05.338: DEBUG/dalvikvm(388): GC freed 142 objects / 5848
bytes in 294ms
08-16 12:04:08.068: INFO/ActivityManager(74): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.micro.activity/.ActivityTesting }
08-16 12:04:08.168: INFO/ActivityManager(74): Start proc
com.micro.activity for activity com.micro.activity/.ActivityTesting:
pid=846 uid=10051 gids={}
08-16 12:04:08.368: INFO/dalvikvm(846): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
08-16 12:04:08.438: INFO/dalvikvm(846): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=40)
08-16 12:04:08.548: INFO/System.out(846): Inside onCreate
08-16 12:04:08.698: INFO/ActivityManager(74): Displayed activity
com.micro.activity/.ActivityTesting: 557 ms (total 557 ms)
08-16 12:04:10.838: INFO/WindowManager(74): Setting rotation to 1,
animFlags=1
08-16 12:04:10.849: INFO/WindowManager(74): Config changed:
{ scale=1.0 imsi=0/0 loc=en_US touch=3 keys=2/1/1 nav=3 orien=2
layout=18}
08-16 12:04:10.978: INFO/System.out(846): Inside onCreate
08-16 12:04:11.078: DEBUG/StatusBar(74): updateResources


Here it prints two times Inside onCreate. One at the start of
application and another time when I close the keyboard of G1 mobile.

-- 
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] Google maps, Overlays and the shadow layer

2010-08-16 Thread oriharel
What can I do with the shadow layer of the the google maps overlays?
I tried, naively, to draw something (an arc) only when (shadow ==
true) and got nothing?

I'm interested in drawing arcs and arc shadows on a map.
is there a nice google-maps way to do this?

thanks,
Ori

-- 
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: Disappearing Alarms

2010-08-16 Thread mot12
I have seen this on a number of devices if the phone is idle for a
long time or if the display gets shut off manually. My app has
~100,000 users so I am quite sure I am not imagining it. My phones (N1
and Galaxy) are not affected, but I get a lot of these reports from
Droid users.

Here's a simple test I would recommend:
- tell your users to set the stock alarm. If you experience the same
situation that I talk about, you will find the stock alarm fails, too.
- tell your users to keep the phone plugged in. Your alarm will no
longer fail.

If these tests show my experience is relevant to your problem, I have
a number of suggestions what else you can do.

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


[android-developers] Re: Is anyone's active install % dropping like a rock lately?

2010-08-16 Thread Zsolt Vasvari
I noticed the same thing.  Let me share a few stats for my app.

The active rate from 40% to a 32%, but at the same time the overall
rating has gone up a little bit, from about 4.22 to 4.33 as shown by
AppBrain, so the overall rating is more 5 stars than 4.

There isn't a single bad comment posted, literally everything is = 4
stars since the early problematic days when I had a few FC bugs.  I
get one rating for about 1 in 36 downloads and one comment in probably
1 in 100.

So it's either that 2 out of 3 people download my app and they don't
like it and uninstall it, but don't bother giving it a low rating or
comment, or that the install count is shown to be too high.

As I have mentioned it previously, as I am having a problem with my
app buried so deep into cr*p on the Android Market, that I actually
very surprised that as many people would discover it daily as they
do.  My app is doing much better on AppBrain placement-wise and it's
actually one of the top apps in its category and would most likely be
evaluated by people who are doing comparission shopping in this
category.

My gut feeling is that the download numbers on the Android Market are
probably twice of the true number for whatever reason.  I just cannot
believe that 2 out of 3 users thought the app was bad enough where
even the free version was not worth keeping, but do not reflect this
in their rating. While, obviously, I am a bit biased, I still think
the app is extremely good and does exactly what it promises in its
description.

If you are curious about my app, I'd be happy to tell you its name in
a private e-mail, as I don't want to use this forum as marketing tool.




On Aug 15, 8:13 am, { Devdroid } webnet.andr...@gmail.com wrote:
 On 15 August 2010 09:40, Mark Carter mjc1...@googlemail.com wrote:

  Back to the original question... yes, I've also noticed a bit of a dip
  in the active install % for my paid apps, though can't be sure exactly
  when this happened. I also find it hard to believe that so many people
  buy the app, don't cancel/refund, and then uninstall.

 I did some checks on our stats and I tend to admit there's something
 wrong with that counter. I see downloads increasing on regular
 rate but installs go up smaller, at the same time i see no negative
 comments nor anything that would indicate app failures that could
 lead to mass uninstall.

-- 
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: persistence storage...........

2010-08-16 Thread A N K ! T
but  i need to store some secure informationthat will need to find is
perticular mobile used trial version of my app...so that mobile cant install
app again as a trial version

On Mon, Aug 16, 2010 at 10:54 AM, William Ferguson william.ferguson.au@
gmail.com wrote:

 Store the database on the external storage instead of as part of your
 app.

 On Aug 16, 2:46 pm, A N K ! T ankit.awasth...@gmail.com wrote:
  i wan,t my app database remains in phone even after uninstallation .for
  activation code or something like that...
  what should i use for that
  thanks
 
  --
 
   A N K ! T..

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




-- 

 A N K ! T..

-- 
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: Sharing data between (tab) activities

2010-08-16 Thread Zsolt Vasvari
The best way to share data between tabs is to NOT use activities.  I
am not sure what the API people were on (but I want some of it) when
they thought tabbed activities should make it into the final API.

On Aug 15, 4:29 pm, Filip Havlicek havlicek.fi...@gmail.com wrote:
 I went the database way if anyone else is interested in this matter in
 future.

-- 
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: persistence storage...........

2010-08-16 Thread pramod.deore
You can't create file or database outside the application. So if you
want to store information as  particular mobile used trial version of
your  app...so that mobile cant install then you have to store such
information on server. There is no any other way.

-- 
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: Best way to swap activities

2010-08-16 Thread Zsolt Vasvari
I think the built-in activity stack and flags are quite good for
simple app logic, but if you have a complicated app, I'd suggest just
use startActivity() and finish() on all your activities and manage the
app flow yourself.  This is what I do and it gives you more control
over what's going on and the user won't get stuck in back-button
hell where, if you have your app coded incorrectly, they have to
press the back button multiple times to exit the app.  The drawback of
managing your own flow is that if you have activities that are
reachable in different ways, you will have to extra complexity of
having to pass in some kind of next activity flag via the intent
extras.

On Aug 15, 3:35 pm, dm1973 david050...@gmail.com wrote:
 FLAG_ACTIVITY_NO_HISTORY doesn't do what I want since I want to be
 able to switch back.

 Before I posted I tried the finish and it wasn't working quite right.
 After thinking about it a bit more, I released that my problem was
 that the activity I was calling finish on was a Tab Content (not the
 tab activity) which was causing some issues. Switching it around to
 call finish on the TabActivity seems to make everything work
 correctly.

 On Aug 15, 11:25 am, Francois Masurel fm2...@mably.com wrote:



  Did you try the FLAG_ACTIVITY_NO_HISTORY intent flag ?

  Here is a nice article about intent flags :

 http://blog.akquinet.de/2010/04/15/android-activites-and-tasks-series...

  Francois

  On 15 août, 16:04, dm1973 david050...@gmail.com wrote:

   Right now I have 2 activities (A+B) and what I would like is for only
   1 of them ever to be on the stack (If A shows B, I want the back
   button from B to go to the home screen not A). Is their a good way of
   doing this with activities Or should I change my app to be a bunch of
   views?- 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


Re: [android-developers] Re: persistence storage...........

2010-08-16 Thread Kostya Vasilyev

 Huh?

Writing to the sdcard or sdcard-like internal storage is possible for 
any application.


You just need to have the right permission in the manifest.

-- Kostya

16.08.2010 11:24, pramod.deore пишет:

You can't create file or database outside the application. So if you
want to store information as  particular mobile used trial version of
your  app...so that mobile cant install then you have to store such
information on server. There is no any other way.




--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Strange Issue with Return String from Web Service

2010-08-16 Thread Bob Kerns
In addition to referring you to the thread Ed just referred you to,
I'll specifically highlight:

toString() does not do what you think it does. Yes, it returns a
string. No, it does not extract some string (just which string,
anyway???) from the response.

SOAP responses are complex XML structures. You are going to need to
study the KSOAP2 API, and the web service in question, and figure out
how you will obtain the specific information from the response that
represents 'hazards'.

It's not terribly difficult, but you're asking for it to magically
guess which string out of possibly many. And you're using
Object.toString() to do it.

On Aug 13, 9:39 am, Tommy droi...@gmail.com wrote:
 Hi everyone,

   I have a strange issue. I am using KSOAP2 to create a soap request
 to a .net webservice. I do this in a few other places and everything
 works fine.

 The webservice basically queries a data base and takes the values from
 the data reader and creates a string. This string is then returned.
 When I run the webservice on my local machine(Without using android)
 it works fine. When I run it from the webserver (still not android) it
 works fine. When I call it from my phone however the line:

 String hazards = (String)envelope.getResponse().toString(); //Get
 response from .net Web service

 Simply is filled with anyType{}.

 Now if I go to the webservice and I manually type in the contents from
 the database to represent what the string concatenation should be it
 works perfectly. The line:

 String hazards = (String)envelope.getResponse().toString(); //Get
 response from .net Web service

 Now returns the string value i need.

 Does anyone have any idea why this is happening or know a better place
 to ask this question?

 As always thanks for your time and help

 --
 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 
 athttp://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] Alarm manager for multiple pending intent are not working.

2010-08-16 Thread nomi
Hi all,

In my application i have created pending intent which calls another
activity (after 20mins of alarm off) with the help of alarm manger. It
should happen each time for each new pending intent or when I call
that activity.
But when i create one pending intent and after few mins again create
new pending intent ,then the last one overlap the other previous
pending intents and start specified activity only for ones for the
last pending intent.

I want  that each time i create any pending intent it should start
specified activity after 20 mins of it's alarm off time.How it can be
done ?
here is my code:--


Intent intent = new Intent(getApplicationContext(),AlarmCall.class);

intent.putExtra(PolicyNo3,policyNo2);

intent.putExtra(BarcodeNo,barcode_no);

Constants.pendingResultList.put(policyNo2, barcode_no);

System.out.println(Constants.pendingResultList.containsKey(policyNo2));

PendingIntent pendingIntent =
PendingIntent.getBroadcast(getApplicationContext(),
0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager alarmManager = 
(AlarmManager)
getSystemService(ALARM_SERVICE);

long timedely = System.currentTimeMillis() + 
(20*60*1000);

alarmManager.set(AlarmManager.RTC_WAKEUP,timedely,
pendingIntent);









// Below is the code of ALarmCall.class






manger = (NotificationManager)
context.getSystemService(Context.NOTIFICATION_SERVICE);
 Notification notification = new
Notification(R.drawable.icon,Please upload
result,System.currentTimeMillis());
 Intent startActivity1 = new Intent();
startActivity1.setClass(context, UploadTest.class);
startActivity1.setAction(UploadTest.class.getName());
startActivity1.putExtra( PolicyNo4,policyNo3);
startActivity1.putExtra(BarcodeNo1,barcodeNo);
startActivity1.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

 PendingIntent contentIntent = 
PendingIntent.getActivity(context,
0,startActivity1,Intent.FLAG_ACTIVITY_NEW_TASK);
 notification.setLatestEventInfo(context, HIV 
Pharmacy,Result of
Id- +policyNo3,contentIntent);
 notification.flags = Notification.FLAG_ONLY_ALERT_ONCE |
Notification.FLAG_SHOW_LIGHTS;
 notification.ledARGB = Color.GREEN;
 notification.ledOnMS = 1000;
 notification.ledOffMS = 500;
 notification.defaults = Notification.DEFAULT_SOUND |
Notification.DEFAULT_VIBRATE;
 manger.notify(32, notification);
 context.startActivity(startActivity1);




 Thanks to all.

-- 
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: Chilling news: Oracle sues Google over Android

2010-08-16 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/16/10 05:07 , DanH wrote:
 Having written 13 software patents, I'm well aware that many are
 very weak, or, if not weak, very narrow.  But proving all that in a
 court of law is the trick -- the presumption is that the patent,
 having been cleared by the patent office, is valid.  (I'd have
 several more patents if it weren't for the ones the PO rejected
 because of supposed prior art, even though the quoted prior art
 had no relation to the area of my applications.)

Exactly. I don't think that Oracle made such an obvious mistake, even
though the patents might be actually weak. They can anyway cause harm
to Google with the trial thing. This only consolidates the idea that
Oracle doesn't want to shut down Android, but come to a deal (maybe
I'm wrong, but note that even though Oracle officially asked to
withdraw and destroy Android, they didn't ask for a temporary
suspension of Android activities until the trial is finished). If the
deal is only money, it won't affect us in any way. If the deal is also
about changes in the way Android is, it will affect us. I think there
are both positive and negative outcomes - but until they come to a
deal, we really can't know.

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

iEYEARECAAYFAkxo7g0ACgkQeDweFqgUGxdKiACdEHWE9jpxcpbONq9SttNgs3tP
xZ4AnRyE3V5sQD2k5ASP4L3S9pLn2icg
=Y+xk
-END PGP SIGNATURE-

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


Re: [android-developers] Re: Chilling news: Oracle sues Google over Android

2010-08-16 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Suggested read:

http://blogs.forbes.com/taylorbuley/2010/08/13/android-lawsuit-is-really-just-oracle-flirting-with-google/

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

iEYEARECAAYFAkxo8dwACgkQeDweFqgUGxcXuQCcCiFY+IC2kXMsWzbejUXOtRqb
qjMAmQHJBRWpCQTOoCfjd00bLwMh+aMZ
=m91m
-END PGP SIGNATURE-

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


[android-developers] Re: persistence storage...........

2010-08-16 Thread pramod.deore

Actually i mean except the memory card. Ankit said that -
  i need to store some secure informationthat will need to find is
perticular mobile used trial version of my app...so that mobile cant install
app again as a trial version

and for this I think Memory card is not safe place, because it may
posiible user format card or remove card, so therefore I had suggest
him to store information on server. Please correct me if I am wrong in
the point- we can't create file or database outside the application.
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: Alarm manager for multiple pending intent are not working.

2010-08-16 Thread skink


nomi wrote:
 Hi all,

 In my application i have created pending intent which calls another
 activity (after 20mins of alarm off) with the help of alarm manger. It
 should happen each time for each new pending intent or when I call
 that activity.
 But when i create one pending intent and after few mins again create
 new pending intent ,then the last one overlap the other previous
 pending intents and start specified activity only for ones for the
 last pending intent.

 I want  that each time i create any pending intent it should start
 specified activity after 20 mins of it's alarm off time.How it can be
 done ?
 here is my code:--


 Intent intent = new Intent(getApplicationContext(),AlarmCall.class);

   intent.putExtra(PolicyNo3,policyNo2);

   intent.putExtra(BarcodeNo,barcode_no);
   
 Constants.pendingResultList.put(policyNo2, barcode_no);

 System.out.println(Constants.pendingResultList.containsKey(policyNo2));

   PendingIntent pendingIntent =
 PendingIntent.getBroadcast(getApplicationContext(),
 0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
   AlarmManager alarmManager = 
 (AlarmManager)
 getSystemService(ALARM_SERVICE);

   long timedely = System.currentTimeMillis() + 
 (20*60*1000);

 alarmManager.set(AlarmManager.RTC_WAKEUP,timedely,
   pendingIntent);









 // Below is the code of ALarmCall.class






 manger = (NotificationManager)
 context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new
 Notification(R.drawable.icon,Please upload
 result,System.currentTimeMillis());
Intent startActivity1 = new Intent();
   startActivity1.setClass(context, UploadTest.class);
   startActivity1.setAction(UploadTest.class.getName());
   startActivity1.putExtra( PolicyNo4,policyNo3);
   startActivity1.putExtra(BarcodeNo1,barcodeNo);
   startActivity1.addFlags(
   Intent.FLAG_ACTIVITY_NEW_TASK
   | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

PendingIntent contentIntent = 
 PendingIntent.getActivity(context,
 0,startActivity1,Intent.FLAG_ACTIVITY_NEW_TASK);
notification.setLatestEventInfo(context, HIV 
 Pharmacy,Result of
 Id- +policyNo3,contentIntent);
notification.flags = Notification.FLAG_ONLY_ALERT_ONCE |
 Notification.FLAG_SHOW_LIGHTS;
notification.ledARGB = Color.GREEN;
notification.ledOnMS = 1000;
notification.ledOffMS = 500;
notification.defaults = Notification.DEFAULT_SOUND |
 Notification.DEFAULT_VIBRATE;
manger.notify(32, notification);
context.startActivity(startActivity1);




  Thanks to all.

each time you call getBroadcast|getActivity use unique requestCode

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


[android-developers] Re: On screen orientation changes activity restarted.

2010-08-16 Thread pramod.deore

Hello , Please someone tell me how to solve this issue.

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


[android-developers] Is there any way to look for an image using the path? MediaStore.Images.Thumbnails (Android)

2010-08-16 Thread jaaaelpumuki
Hi, I'm using MediaStore.Images.Thumbnails in order to show the images
the user have. But i'm not able to get an image through its path. Is
there any way to look for an image using the path?

String [] proj={MediaStore.Images.Thumbnails._ID,
MediaStore.Images.Thumbnails.IMAGE_ID, MediaStore.Images.Media.DATA};
String selection = MediaStore.Images.Media.DATA +  like '%path%'; //
this doesn't work
cursor =
managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,
proj, // Which columns to return selection, // WHERE clause;
null,
null); // Order-by clause

Best regards!

-- 
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: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-16 Thread FrankG


On 16 Aug., 06:43, Maps.Huge.Info (Maps API Guru) cor...@gmail.com
wrote:
  So prior to this month, there were no duplicate ANDROID_IDs? With pre-
  Froyo devices?

 I can't say there were or weren't any duplicates pre-Froyo. I can say
 that every Droid2 that has downloaded my app Radar Now! has the same
 ANDROID_ID.

 -John Coryat

If you look into the SettingsProvider class, then you can see that
this is done using

SecureRandom random = SecureRandom.getInstance(SHA1PRNG);

When the persistent system property ro.serialno is set, then this
value
will be used to  reseeds this random object.

Later comes a random.nextLong transformed to a Hex-String.

Interessting might be this part of the javadoc:

the system will determine if there is an implementation of the
algorithm requested available in the environment

Maybe their is a problem with this SHA1PRNG algorithm ?

Try to set ro.serialno  with setprop ..

Good luck !

  Frank





-- 
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: Drawing an Image Using OpenGL

2010-08-16 Thread jojoma
check this tutorial (its for iphone but the theory about texture
coordinates is all there):

http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html

On Aug 10, 2:54 pm, cmh0114 camherrings...@gmail.com wrote:
 Using OpenGL ES, how do I draw an image from the resources file onto
 the screen?  The image is in png format, if that matters.

 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] C2DM Tied to Market? (e.g. will it work on non-official devices)

2010-08-16 Thread Andy Savage
Hi everyone,

Quick question.

Just wondering if Cloud to Device Messaging (C2DM) is available for devices
that use Android 2.2 but don't have the Android Market installed (because
they are not an official device).

Is this service tied to the Market?

Kind regards,
Andy Savage

-- 
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] ListView paint issue in landscape mode.Width remains as in Portrait mode

2010-08-16 Thread Alok Kulkarni
Hi,
I am having a listview in my App which shows perfectly in Portrait mode.But
when i change orientation to landscape , sometimes the width remains as that
of Portrait mode.Even the scrollbar for the list comes at the center and
remaining part of the screen remains balcked out.This happens only with the
list view.Other views show perfectly.I have designed the layouts such that
the Portrait layouts look feel proportionate in landscape mode . I want to
avoid restarting the activity so i have not put the layouts in the landscape
folder.
I tried invalidating the listview in onConfigurationChanged() but of no use.
When i navigate in the list in landscape mode , the width automatically gets
adjusted.Any help in this regard will be of great use :)
Thanks,
Alok.

-- 
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: FTP Application for IPv6

2010-08-16 Thread Joe Petruchi
Zirk, Thanks very much

I tried with the Trial version of FTPCAFE and it works fine over IPv6. I am
able to see the list of files in remote PC and download also.

Thanks for the help

Regards
Ajan

On Wed, Aug 11, 2010 at 3:57 PM, Joe Petruchi petruchi.dr...@gmail.comwrote:

 Hello All,

 I am trying to download the apk from my country India.

 But I am not able to do so.

 It would be really nice if you could send the apk through e-mail.

 Best Regards
  Petruchi




 On Tue, Aug 10, 2010 at 6:01 PM, Joe Petruchi petruchi.dr...@gmail.comwrote:

 Hello All,

 Does any body know if there exists any package to test FTP over IPv6.

 I tried with some of FTP applications available in market but it doesnt
 seem to support IPv6.

 Please help as this is very urgent for me

 Best Regards
 Petruchi




-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Floaters
I met the same issue
activity android:name=Settings android:configChanges=orientation / did
not work.

2010/8/16 pramod.deore deore.pramo...@gmail.com


 Hello , Please someone tell me how to solve this issue.

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


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

Re: [android-developers] Alarm manager for multiple pending intent are not working.

2010-08-16 Thread Kostya Vasilyev
 Setting an alarm cancels any previous alarms that have the same intent 
as the new one.


In your code, the old and new intents only differ by their extras, which 
are not considered (I believe).


What you could do is calculate the next point in time when an alarm is 
needed, set one alarm, and when it goes off, figure out which of the 
possible actions you need to perform.


-- Kostya

16.08.2010 11:49, nomi пишет:

Hi all,

In my application i have created pending intent which calls another
activity (after 20mins of alarm off) with the help of alarm manger. It
should happen each time for each new pending intent or when I call
that activity.
But when i create one pending intent and after few mins again create
new pending intent ,then the last one overlap the other previous
pending intents and start specified activity only for ones for the
last pending intent.

I want  that each time i create any pending intent it should start
specified activity after 20 mins of it's alarm off time.How it can be
done ?
here is my code:--


Intent intent = new Intent(getApplicationContext(),AlarmCall.class);

intent.putExtra(PolicyNo3,policyNo2);

intent.putExtra(BarcodeNo,barcode_no);

Constants.pendingResultList.put(policyNo2, barcode_no);

System.out.println(Constants.pendingResultList.containsKey(policyNo2));

PendingIntent pendingIntent =
PendingIntent.getBroadcast(getApplicationContext(),
0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager alarmManager = 
(AlarmManager)
getSystemService(ALARM_SERVICE);

long timedely = System.currentTimeMillis() + 
(20*60*1000);

alarmManager.set(AlarmManager.RTC_WAKEUP,timedely,
pendingIntent);









// Below is the code of ALarmCall.class






manger = (NotificationManager)
context.getSystemService(Context.NOTIFICATION_SERVICE);
 Notification notification = new
Notification(R.drawable.icon,Please upload
result,System.currentTimeMillis());
 Intent startActivity1 = new Intent();
startActivity1.setClass(context, UploadTest.class);
startActivity1.setAction(UploadTest.class.getName());
startActivity1.putExtra( PolicyNo4,policyNo3);
startActivity1.putExtra(BarcodeNo1,barcodeNo);
startActivity1.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

 PendingIntent contentIntent = 
PendingIntent.getActivity(context,
0,startActivity1,Intent.FLAG_ACTIVITY_NEW_TASK);
 notification.setLatestEventInfo(context, HIV 
Pharmacy,Result of
Id- +policyNo3,contentIntent);
 notification.flags = Notification.FLAG_ONLY_ALERT_ONCE |
Notification.FLAG_SHOW_LIGHTS;
 notification.ledARGB = Color.GREEN;
 notification.ledOnMS = 1000;
 notification.ledOffMS = 500;
 notification.defaults = Notification.DEFAULT_SOUND |
Notification.DEFAULT_VIBRATE;
 manger.notify(32, notification);
 context.startActivity(startActivity1);




  Thanks to all.




--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: ListView paint issue in landscape mode.Width remains as in Portrait mode

2010-08-16 Thread Alok Kulkarni
Solved the problem
Actually i was playing with the width of the list after setting the indexer
of the list.This was causing the painting issue
Thanks,
Alok

On Mon, Aug 16, 2010 at 2:35 PM, Alok Kulkarni kulsu...@gmail.com wrote:

 Hi,
 I am having a listview in my App which shows perfectly in Portrait mode.But
 when i change orientation to landscape , sometimes the width remains as that
 of Portrait mode.Even the scrollbar for the list comes at the center and
 remaining part of the screen remains balcked out.This happens only with the
 list view.Other views show perfectly.I have designed the layouts such that
 the Portrait layouts look feel proportionate in landscape mode . I want to
 avoid restarting the activity so i have not put the layouts in the landscape
 folder.
 I tried invalidating the listview in onConfigurationChanged() but of no
 use.
 When i navigate in the list in landscape mode , the width automatically
 gets adjusted.Any help in this regard will be of great use :)
 Thanks,
 Alok.



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

2010-08-16 Thread CaryWang
I want to know current Activity some information.for example activity name
or activity package info.I use  getRecentTasks method get current Activity
info,but somebody tell me this method don't better,should use
ActivityManagerSrevice do it,but this method don't open.I want to know how
to do?Who use ActivityManagerService,why this class is better?

-- 
Cary

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Martins Streņģis
as i said earlier for some reaosn it doesnt work on emulators.
that fix works only on real phones

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread pramod.deore
Hi, Martnis,
But I am running this application on real phone G1, but still
onCreate() method is called each time when I open or close the keypad.


On Aug 16, 3:51 pm, Martins Streņģis martin...@draugiem.lv wrote:
 as i said earlier for some reaosn it doesnt work on emulators.
 that fix works only on real phones

-- 
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 read all numbers of particular contact

2010-08-16 Thread A N K ! T
am stuck in reading phone contacts ,,,i tried 1.6 api for it...
and getting all detail of contacts  ..
but i am not getting all numbers of contact
 i need to get all numbers(mobile,work,home,other) of particular
contact.
help me out.
thanks
-- 

 A N K ! T..

-- 
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] Google maps - limit panning between longitudes

2010-08-16 Thread oriharel
Hi,
Im trying to set limits to the map view so the user won't be able to
pan it cyclic.
(when panning to the right, instead of the map will cycle, I want it
to stop).

is it possible?

Ori

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Martins Streņģis
sounds like daily wtf :)

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread pramod.deore
I am also searching for this from last 8 hours but everybody says that
add this in manifest.xml as  android:configChanges=orientation . But
still onCreate() method is called on each time when I open or closed
keyboard.I really don't understand what to do?

On Aug 16, 4:52 pm, Martins Streņģis martin...@draugiem.lv wrote:
 sounds like daily wtf :)

-- 
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: Disappearing Alarms

2010-08-16 Thread Pent
 You sure they're not killing your service with a task killer?

I am seeing the service handling other incoming intents before and
after the alarm time. If it was recreated  that would be logged.

Pent

-- 
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: Disappearing Alarms

2010-08-16 Thread Pent
 I have seen this on a number of devices if the phone is idle for a
 long time or if the display gets shut off manually. My app has
 ~100,000 users so I am quite sure I am not imagining it. My phones (N1
 and Galaxy) are not affected, but I get a lot of these reports from
 Droid users.

 Here's a simple test I would recommend:
 - tell your users to set the stock alarm. If you experience the same
 situation that I talk about, you will find the stock alarm fails, too.
 - tell your users to keep the phone plugged in. Your alarm will no
 longer fail.

 If these tests show my experience is relevant to your problem, I have
 a number of suggestions what else you can do.

Thanks for the info, will make inquiries.

Pent

-- 
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] Activity getting killed and automatically starting again on screen off button press

2010-08-16 Thread Shashidhar
Thanks for the reply. I found the problem. There is a bug in android which
is listed at

http://code.google.com/p/android/issues/detail?id=7479

http://code.google.com/p/android/issues/detail?id=7479As mentioned in the
above bug my activity's orientation is fixed to landscape and when the phone
gets unlocked it starts in the other mode hence a new activity is getting
created each time.


Thanks,
Shashidhar

On Fri, Aug 13, 2010 at 9:56 PM, TreKing treking...@gmail.com wrote:

 On Fri, Aug 13, 2010 at 1:56 AM, Shashidhar shashi.zep...@gmail.comwrote:

 Any specific reason for this ?


 Determine all the places where you start your activity.
 Are you somewhere possibly starting your activity in response to broadcast
 events or in onPause / onStop / onResume/ onStart?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

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


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

[android-developers] Re: Is anyone's active install % dropping like a rock lately?

2010-08-16 Thread String
I grew distrustful of the Console download figures in mid June and
began keeping track of all the numbers I could lay my hands on for my
apps. I was sort of collecting data to get a handle on what was wrong,
so that I could share it with other devs, when Google admitted they
had a problem - and corrected it (http://tinyurl.com/3xvj76o).

Since then, my total downloads and my Checkout payments have tracked
each other quite well, within about +/-5%. It's hard to be more
precise than that because, although the Console data is clearly
delayed, it's not clear by how much. But generally, they are pretty
close.

As for active percentage (the original topic of this thread), I've
come to believe that it's ALWAYS going to trend downward over time.
This is natural, as very few users keep apps, even paid ones,
installed forever. So attrition will always take its toll, and the
active user count - as a percentage of users who have EVER installed
your app - will always tend downward. As a result, the active % is
almost more of just a measure of how long your app has been released
than it is a measure of user satisfaction.

Supporting this thesis, here is my own data. I have 4 paid apps in the
Market, all in the $1-$2 range, all with 4.5* ratings. Here are their
active percentages, along with their original release dates:
55%: Aug 2009
70%: Feb 2010
70%: Mar 2010
79%: May 2010

Bottom line: don't worry about active percentage.

String

On Aug 16, 8:05 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 I noticed the same thing.  Let me share a few stats for my app.

 The active rate from 40% to a 32%, but at the same time the overall
 rating has gone up a little bit, from about 4.22 to 4.33 as shown by
 AppBrain, so the overall rating is more 5 stars than 4.

 There isn't a single bad comment posted, literally everything is = 4
 stars since the early problematic days when I had a few FC bugs.  I
 get one rating for about 1 in 36 downloads and one comment in probably
 1 in 100.

 So it's either that 2 out of 3 people download my app and they don't
 like it and uninstall it, but don't bother giving it a low rating or
 comment, or that the install count is shown to be too high.

 As I have mentioned it previously, as I am having a problem with my
 app buried so deep into cr*p on the Android Market, that I actually
 very surprised that as many people would discover it daily as they
 do.  My app is doing much better on AppBrain placement-wise and it's
 actually one of the top apps in its category and would most likely be
 evaluated by people who are doing comparission shopping in this
 category.

 My gut feeling is that the download numbers on the Android Market are
 probably twice of the true number for whatever reason.  I just cannot
 believe that 2 out of 3 users thought the app was bad enough where
 even the free version was not worth keeping, but do not reflect this
 in their rating. While, obviously, I am a bit biased, I still think
 the app is extremely good and does exactly what it promises in its
 description.

 If you are curious about my app, I'd be happy to tell you its name in
 a private e-mail, as I don't want to use this forum as marketing tool.

 On Aug 15, 8:13 am, { Devdroid } webnet.andr...@gmail.com wrote:







  On 15 August 2010 09:40, Mark Carter mjc1...@googlemail.com wrote:

   Back to the original question... yes, I've also noticed a bit of a dip
   in the active install % for my paid apps, though can't be sure exactly
   when this happened. I also find it hard to believe that so many people
   buy the app, don't cancel/refund, and then uninstall.

  I did some checks on our stats and I tend to admit there's something
  wrong with that counter. I see downloads increasing on regular
  rate but installs go up smaller, at the same time i see no negative
  comments nor anything that would indicate app failures that could
  lead to mass uninstall.

-- 
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] Custom Quick Search Box

2010-08-16 Thread Michael Tsai
在 2010-8-16 上午9:09,Lorensius W. L. T lor...@londatiga.net编写:

Hello all,

I'm developing an application that uses quick search box. Is there a
way to customize it ? how to add additional button and use custom
image for its background like in Twitter ? Thanx in advance

--
Kind Regards

- Lorensius W. L. T -
- http://www.londatiga.net -

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

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

[android-developers] Re: Alarm manager for multiple pending intent are not working.

2010-08-16 Thread Paul Turchenko
PendingIntent.FLAG* should help you.

On Aug 16, 12:44 pm, Kostya Vasilyev kmans...@gmail.com wrote:
   Setting an alarm cancels any previous alarms that have the same intent
 as the new one.

 In your code, the old and new intents only differ by their extras, which
 are not considered (I believe).

 What you could do is calculate the next point in time when an alarm is
 needed, set one alarm, and when it goes off, figure out which of the
 possible actions you need to perform.

 -- Kostya

 16.08.2010 11:49, nomi пишет:



  Hi all,

  In my application i have created pending intent which calls another
  activity (after 20mins of alarm off) with the help of alarm manger. It
  should happen each time for each new pending intent or when I call
  that activity.
  But when i create one pending intent and after few mins again create
  new pending intent ,then the last one overlap the other previous
  pending intents and start specified activity only for ones for the
  last pending intent.

  I want  that each time i create any pending intent it should start
  specified activity after 20 mins of it's alarm off time.How it can be
  done ?
  here is my code:--

  Intent intent = new Intent(getApplicationContext(),AlarmCall.class);

                                     intent.putExtra(PolicyNo3,policyNo2);

                                     intent.putExtra(BarcodeNo,barcode_no);
                                     
  Constants.pendingResultList.put(policyNo2, barcode_no);

  System.out.println(Constants.pendingResultList.containsKey(policyNo2));

                                     PendingIntent pendingIntent =
  PendingIntent.getBroadcast(getApplicationContext(),
  0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
                                     AlarmManager alarmManager = 
  (AlarmManager)
  getSystemService(ALARM_SERVICE);

                             long timedely = System.currentTimeMillis() + 
  (20*60*1000);

  alarmManager.set(AlarmManager.RTC_WAKEUP,timedely,
                                         pendingIntent);

  // Below is the code of ALarmCall.class

  manger = (NotificationManager)
  context.getSystemService(Context.NOTIFICATION_SERVICE);
              Notification notification = new
  Notification(R.drawable.icon,Please upload
  result,System.currentTimeMillis());
              Intent startActivity1 = new Intent();
                     startActivity1.setClass(context, UploadTest.class);
                     startActivity1.setAction(UploadTest.class.getName());
                     startActivity1.putExtra( PolicyNo4,policyNo3);
                     startActivity1.putExtra(BarcodeNo1,barcodeNo);
                     startActivity1.addFlags(
                     Intent.FLAG_ACTIVITY_NEW_TASK
                     | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

              PendingIntent contentIntent = PendingIntent.getActivity(context,
  0,startActivity1    ,Intent.FLAG_ACTIVITY_NEW_TASK);
              notification.setLatestEventInfo(context, HIV Pharmacy,Result 
  of
  Id- +policyNo3,contentIntent);
              notification.flags = Notification.FLAG_ONLY_ALERT_ONCE |
  Notification.FLAG_SHOW_LIGHTS;
              notification.ledARGB = Color.GREEN;
              notification.ledOnMS = 1000;
              notification.ledOffMS = 500;
              notification.defaults = Notification.DEFAULT_SOUND |
  Notification.DEFAULT_VIBRATE;
              manger.notify(32, notification);
              context.startActivity(startActivity1);

    Thanks to all.

 --
 Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

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


[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-16 Thread Paul Turchenko
They use Database! Sergey is asking about building content provider
around non-db storage.

On Aug 16, 4:29 am, Indicator Veritatis mej1...@yahoo.com wrote:
 Expect to override a lot more methods in ContentProvider and
 ContentResolver than other people do. You may want to look at the
 example WidgetExplorer from Unlocking Android. Go to the book's
 website, download the sample code and look in the code for chapter 5.

 I suggest this example because here too, the authors override more
 methods than usual because they are making their own ContentProvider.
 But of course, the example will not be exactly the same as what you
 want.

 On Aug 12, 2:45 pm, Sergey serge...@gmail.com wrote:

  Hi,
  I need to write a ContentProvider to provide a dynamically generated
  audio stream to be playable by MediaPlayer. That is MediaPlayer will
  use ContentResolver.openInputStream() to play it.
  I have read a lot of discussions about this problem but no one had a
  solution yet.
  The most recent one was in January 
  2010:http://groups.google.com/group/android-developers/browse_thread/threa...

  Have anyone found a solution yet?
  Any ideas are greatly appreciated.
  Thanks a lot,
  --Sergey

-- 
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] Dealing with password change on the server in a SyncAdapter

2010-08-16 Thread Kwisatz
Hope you can help me with this, because I've tried EVERYTHING and the
example in the Google sample code doesn't seem to work.

Scenario:
- An account is created in the AccountManager with a valid username
and password.
- A SyncAdapter is present to deal with server syncs, and successfully
authenticates in the server using the stored credentials through the
AccountManager.
- The user decides to change the password on the server. So, the
password in the Android AccountManager becomes invalid, and we have to
request the user a new password when a synchronization fails with a
401 HTTP error from the server.

According to Google, this can be done. Here's what I understood by
reading the API docs:

1. In the SyncAdapter that extends AbstractThreadedSyncAdapter, when
we request the AuthToken, we set the notifyAuthFailure to false:

String authtoken = accountManager.blockingGetAuthToken(account,
Constants.AUTHTOKEN_TYPE, false);

2. In the Authenticator that extends AbstractAccountAuthenticator, we
return the following in the getAuthToken method:

final Intent intent = new Intent(context,
AuthenticatorActivity.class);
intent.putExtra(AuthenticatorActivity.PARAM_USERNAME, account.name);
intent.putExtra(AuthenticatorActivity.PARAM_AUTHTOKEN_TYPE,
authTokenType);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
response);
final Bundle bundle = new Bundle();
bundle.putParcelable(AccountManager.KEY_INTENT, intent);
return bundle;

This should call the AuthenticatorActivity defined in the Intent, but
it doesn't. It just invokes the getAuthToken method again.

I've tried calling directly from the from the SyncAdapter the methods
confirmCredentials and updateCredentials, but they will never launch
the AuthenticatorActivity.

What I'm I doing wrong?!
How can we request the Authenticator to show an Activity to ask for a
new password?

In all examples that I've seen, they all assume that the credentials,
once they are valid, then they will never change.

-- 
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: Removing unncessary permissions

2010-08-16 Thread Paul Turchenko
Please point out the source of such information. This absolutely
doesn't make sence to me.

On Aug 14, 8:56 am, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 Where are you installing the app from? I'm guessing a non-market
 source.

 If you install if from a non-market source, the permissions are always
 pretty much the worst case scenario. I guess this is due to the
 installer not knowing what the permissions really are. Once you upload
 the app to the market, the permissions should read what they really
 are.

 -John Coryat

-- 
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] Crop an image

2010-08-16 Thread Nea
I have an imageview which has a photo taken with the camera as its
background and a frame as it's foreground (src). In that way the photo
is positioned behind the frame so the photo get's a nice border.

The imageview is a square (265x265dip). Now the problem is that photos
taken are rectangular and thuse they are squeezed into the imageview
making them look akward.

So how can I crop the bitmap of the photo so it is fitted as a square
so I can then put it as a background for the imageview?

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread alan
android:configChanges=keyboard|keyboardHidden|orientation is working
for me

On Aug 16, 12:58 pm, pramod.deore deore.pramo...@gmail.com wrote:
 I am also searching for this from last 8 hours but everybody says that
 add this in manifest.xml as  android:configChanges=orientation . But
 still onCreate() method is called on each time when I open or closed
 keyboard.I really don't understand what to do?

 On Aug 16, 4:52 pm, Martins Streņģis martin...@draugiem.lv wrote:

  sounds like daily wtf :)



-- 
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: Failed to upload .apk on device

2010-08-16 Thread RichardC
I can't seen anything in your manifest that might be a problem.

Things to try/check:
Have you set the flag  - settings  Application  Unknown sources ?
Try setting targetSdkVersion to 4 in your manifest

On Aug 16, 5:27 am, Lukas Adamec luk.ada...@gmail.com wrote:
 AndroidManifest.xml:

 ?xml version=1.0 encoding=utf-8 ?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
 package=cz.xadamec1.apps.bitmap
    android:versionCode=1 android:versionName=1.0
    application android:icon=@drawable/icon android:label=@string/
 app_name android:debuggable=true
       activity android:name=.BitmapDrawing android:label=@string/
 app_name
          intent-filter
             action android:name=android.intent.action.MAIN /
             category android:name=android.intent.category.LAUNCHER /

          /intent-filter
       /activity
    /application
    uses-sdk android:minSdkVersion=3 /
   /manifest

 On 15 srp, 21:13, RichardC richard.crit...@googlemail.com wrote:

  Can we see your manifest please?

  On Aug 15, 7:43 pm, LukasAdamecluk.ada...@gmail.com wrote:

   If somebody dealt with this kind of problem, could you give me some
   advice. I would really appreciate it.
   Thanks

   On 12 srp, 14:47, LukasAdamecluk.ada...@gmail.com wrote:

Hi,
I have problem with uploading my .apk file on device Highscreen Zeus.
In emulator everything works fine, but when I can upload application
on the device, I always get following error:

[2010-08-12 14:41:25 - BitmapDrawing] Failed to upload
BitmapDrawing.apk on device 'ZUSM1M10A02691'
[2010-08-12 14:41:25 - BitmapDrawing] java.io.IOException: Unable to
upload file: Permission denied
[2010-08-12 14:41:25 - BitmapDrawing] Launch canceled!

Could somebody advise me, how to solve this problem?
Thanks a lot.

Lukas

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


Re: [android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-16 Thread Kostya Vasilyev

 Sereja  Pavel,

It should be just a little bit more involved than writing a SQL-based one.

For structured data, you'd need to create your own Cursor subclass, and 
return it from the provider's query method. If query results are small 
enough to fit in RAM, then it's easiest to use MatrixCursor.


For stream-based data, ContentResolver.openStream seems to eventually 
call ContentProvidersubclass.openFile. This method returns a special 
helper class, ParcelFileDescriptor, which allows file descriptors to be 
passed across process boundaries.


-- Kostya

16.08.2010 17:18, Paul Turchenko пишет:

They use Database! Sergey is asking about building content provider
around non-db storage.

On Aug 16, 4:29 am, Indicator Veritatismej1...@yahoo.com  wrote:

Expect to override a lot more methods in ContentProvider and
ContentResolver than other people do. You may want to look at the
example WidgetExplorer from Unlocking Android. Go to the book's
website, download the sample code and look in the code for chapter 5.

I suggest this example because here too, the authors override more
methods than usual because they are making their own ContentProvider.
But of course, the example will not be exactly the same as what you
want.

On Aug 12, 2:45 pm, Sergeyserge...@gmail.com  wrote:


Hi,
I need to write a ContentProvider to provide a dynamically generated
audio stream to be playable by MediaPlayer. That is MediaPlayer will
use ContentResolver.openInputStream() to play it.
I have read a lot of discussions about this problem but no one had a
solution yet.
The most recent one was in January 
2010:http://groups.google.com/group/android-developers/browse_thread/threa...
Have anyone found a solution yet?
Any ideas are greatly appreciated.
Thanks a lot,
--Sergey



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] XML parsing slow ... cache!

2010-08-16 Thread Davide
Hi,

I have seen that xml parsing is very slow. Using sax would be better,
but benchmark show that sax work only 30%
faster as dom. Is right? Is faster if I construct a DOM using sax?

To reduce time i like to cache xml file. Caching it as xml is not a
good idea because the parsing time is there again
the secondo time.

Should I use sqllite? Is faster? Is an idea to use an
ObjectOutputStream? Can I put in asset a file maked by
ObjectOutputStream
or the serialized objects can be different in different mobile hardware?



-- 
  _|  _.    o  _|  _
 (_| (_| \/ | (_| (/_

-- 
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: On screen orientation changes activity restarted.

2010-08-16 Thread Namrata
I generally use following and it works always for me
android:configChanges=orientation|keyboardHidden

On Aug 16, 6:40 pm, alan a...@birtles.org.uk wrote:
 android:configChanges=keyboard|keyboardHidden|orientation is working
 for me

 On Aug 16, 12:58 pm, pramod.deore deore.pramo...@gmail.com wrote:

  I am also searching for this from last 8 hours but everybody says that
  add this in manifest.xml as  android:configChanges=orientation . But
  still onCreate() method is called on each time when I open or closed
  keyboard.I really don't understand what to do?

  On Aug 16, 4:52 pm, Martins Streņģis martin...@draugiem.lv wrote:

   sounds like daily wtf :)

-- 
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] XML parsing slow ... cache!

2010-08-16 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/16/10 16:02 , Davide wrote:
 Hi,

 I have seen that xml parsing is very slow. Using sax would be better,
 but benchmark show that sax work only 30%
 faster as dom. Is right? Is faster if I construct a DOM using sax?

 To reduce time i like to cache xml file. Caching it as xml is not a
 good idea because the parsing time is there again
 the secondo time.

 Should I use sqllite? Is faster? Is an idea to use an
 ObjectOutputStream? Can I put in asset a file maked by
 ObjectOutputStream
 or the serialized objects can be different in different mobile hardware?
Davide, have you run some precise test so you are sure you've spotted
the bottleneck? Just to be sure that it's really XML the problem (and
not I/O). JSON could be an alternative. I've run some tests with
serialization and theoretically works (I exchanged objects between
Android and a JavaSE app), but it's somewhat brittle. Also, I'm not
sure it's fast because introspection is not fast on Android (it might
be different with 2.2). Also consider JDom / Jaxen as an alternate XML
parser, might be worth while compare their performance.

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

iEYEARECAAYFAkxpTMMACgkQeDweFqgUGxdHiwCgne+CB+ZbtRZxLLN0VjH9ppZK
pPEAoKC5cyf8MwUAl46+pdAGugg6/nES
=gE71
-END PGP SIGNATURE-

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


[android-developers] How to capture the contents of webview and parse it

2010-08-16 Thread dhilip
Hi,

   I am trying to capture the contents of a webview and to parse it.
Is there any method that would allow me to do so?


With regards,

Dhilip

-- 
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: XML parsing slow ... cache!

2010-08-16 Thread Mark Gjøl
On my first implementation I used a DOM-parser for my XML (Flickr, 500
images), and it easily took about a minute to get through. I now use a
SAX-parser, and it's less than a second. The speedup was tremendous,
so it can definitely be worth your time, at least to test the
difference!

-- Mark Gjøl

On Aug 16, 4:35 pm, Fabrizio Giudici fabrizio.giud...@tidalwave.it
wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 8/16/10 16:02 , Davide wrote: Hi,

  I have seen that xml parsing is very slow. Using sax would be better,
  but benchmark show that sax work only 30%
  faster as dom. Is right? Is faster if I construct a DOM using sax?

  To reduce time i like to cache xml file. Caching it as xml is not a
  good idea because the parsing time is there again
  the secondo time.

  Should I use sqllite? Is faster? Is an idea to use an
  ObjectOutputStream? Can I put in asset a file maked by
  ObjectOutputStream
  or the serialized objects can be different in different mobile hardware?

 Davide, have you run some precise test so you are sure you've spotted
 the bottleneck? Just to be sure that it's really XML the problem (and
 not I/O). JSON could be an alternative. I've run some tests with
 serialization and theoretically works (I exchanged objects between
 Android and a JavaSE app), but it's somewhat brittle. Also, I'm not
 sure it's fast because introspection is not fast on Android (it might
 be different with 2.2). Also consider JDom / Jaxen as an alternate XML
 parser, might be worth while compare their performance.

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

 iEYEARECAAYFAkxpTMMACgkQeDweFqgUGxdHiwCgne+CB+ZbtRZxLLN0VjH9ppZK
 pPEAoKC5cyf8MwUAl46+pdAGugg6/nES
 =gE71
 -END PGP SIGNATURE-

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


[android-developers] I want to know user operation info?

2010-08-16 Thread CaryWang
I want to know user operation  info for example user run some app or close
app info.I want know android automatic notification my service.I don't know
how to do it?help me .



-- 
Cary

-- 
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 do I convert float to 2 decimal places?

2010-08-16 Thread Mystique
I try a few example but it doesn't seems to work... is Android working
differently compare to standard java?
Anyone did it in Android 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: position add remove imageview

2010-08-16 Thread nikhil
Just to add, I am using relative layout.

On Aug 15, 11:17 am, nikhil nik...@gmail.com wrote:
 Guys,

 I  m trying to add remove and position an image but i am not able to.
 The  image always shows up at 0, 0 . I am using an image view to do
 this.

 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: How do I convert float to 2 decimal places?

2010-08-16 Thread Maps.Huge.Info (Maps API Guru)
Do you want to round or display it as text?

Try looking up java.text.DecimalFormat if you want text.

-John Coryat

-- 
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] How do I convert float to 2 decimal places?

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 10:08 AM, Mystique joven.ch...@gmail.com wrote:

 I try a few example but it doesn't seems to work...


Like what ... ?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] Google maps - limit panning between longitudes

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 6:51 AM, oriharel ori.ha...@gmail.com wrote:

 is it possible?


Probably, assuming you can detect when a scroll happens, which I'm sure you
can, you can simply check the MapView's current longitude bounds and if it's
past the threshhold you want to allow, get the MapController() and reset it
to where your limit is.

I'll leave the implementation details to the reader =)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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 do I convert float to 2 decimal places?

2010-08-16 Thread Pent
I use, for better or worse,

public final static double roundDouble( double d, int places ) {
BigDecimal bd = new BigDecimal( Double.toString(d) );
bd = bd.setScale( places, BigDecimal.ROUND_HALF_UP);
return bd.doubleValue();
}

Pent

-- 
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 do I convert float to 2 decimal places?

2010-08-16 Thread Robert Nekic
Yeah, I use the NumberFormat:

NumberFormat numberFormat = DecimalFormat.getInstance();
numberFormat.setMaximumFractionDigits(2);
String formattedText = numberFormat.format(yourFloat);


On Aug 16, 11:13 am, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 Do you want to round or display it as text?

 Try looking up java.text.DecimalFormat if you want text.

 -John Coryat

-- 
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: position add remove imageview

2010-08-16 Thread Kostya Vasilyev

 Nikhil,

The default position of child views with RelativeLayout is indeed at 0,0.

You need to do something to position the child view.

Use RelativeLayout.LayoutParams and and specify some values.

You can use layoutParams.setMargins (correspond to XML 
layout_marginLeft, layout_marginTop, etc.)


Or you can use layoutParams.addRule (correspond to XML layout_below, etc.)

-- Kostya

16.08.2010 19:12, nikhil пишет:

Just to add, I am using relative layout.

On Aug 15, 11:17 am, nikhilnik...@gmail.com  wrote:

Guys,

I  m trying to add remove and position an image but i am not able to.
The  image always shows up at 0, 0 . I am using an image view to do
this.

any pointers  ?


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Compiling and obfuscating by command line...

2010-08-16 Thread sblantipodi
I have created the ant build as suggested by you but I can't figure it
out.
Unfortunantly I haven't got a day for this... :(
Can't understand how it is possible that there is no guide on how to
do that in a fast way.


On Aug 9, 5:54 pm, Bob Kerns r...@acm.org wrote:
 Well, I suggested a better approach to setting up your ant script, and
 we haven't heard back from you on that, so I guess that counts as no
 news...

 I've extracted the relevant sections from your reply below, in case
 you missed it.

 You haven't told us of any problem with ProGuard -- the last thing you
 reported was a problem getting set up to build with the SDK, long
 before getting to ProGuard. If you follow my recommendation, you can
 be up and running with that in a few minutes, and then maybe if you
 have problems with ProGuard, we can help you with those.

 On Aug 9, 4:20 am, sblantipodi perini.dav...@dpsoftware.org wrote:

  so no news about obfuscating with Proguard?

   On Aug 2, 11:53 am, Bob Kerns r...@acm.org wrote:

Anyway -- it looks to me like your problems stem from not starting
from a working ant build and then adding obfuscation.

If you follow the documented approach for creating a new ant build
project, and then move your code into it, you should have a working
build virtually out-of-the-box. You can then turn that into a NetBeans
project or Eclipse project without much trouble, and get the benefits
of both worlds. Probably even all three is doable!

Then, once you have that working ant build, extend it with an
obfuscation step. I haven't done that yet -- but having seen how the
base ant build is generated, I absolutely would not try it without
first having a solid ant build in place. Then you would not be
experiencing errors like tasks not defined or missing targets.

The negatives are real, and one is that it will take you some time to
set it up and get right, and a lot of testing to make sure it's
right.  But I think it will go faster if you start with a blank ant-
build project, get that solid, and then add obfuscation.

-- 
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] OnCreate does not finish

2010-08-16 Thread TreKing
On Sun, Aug 15, 2010 at 9:57 AM, kretes kretesena...@gmail.com wrote:

 so it must be that while creating the app Android System decided that there
 are not enough resources for my app.
 Is my suspicion right?


I doubt it. More than likely your app is throwing an exception between 1
and 2. I think Android tries to restart apps sometimes after they've
crashed which would explain your multiple restarts.


 How can I do sth. with this - at least catch and log such an event in a
 precise and sure way.


Wrap it in a try / catch block? Of course you'll only be masking the problem
and you'll probably crash elsewhere when the stuff you need to load in that
section is not found.

On Sun, Aug 15, 2010 at 5:02 PM, kretes kretesena...@gmail.com wrote:

 I don't know if it matters, but these are some operations - especially here
 on Preferences and on SQlite Database, so they need some small amount of
 processing.


Of course it matters - whatever you're doing in there is your problem. The
SQlite in particular should be dealt with with care.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] OnCreate does not finish

2010-08-16 Thread Tommy
are you calling super.onCreate() ? This has gotten me a few times. Otherwise
wrap it in a Try Catch like TreKing said and step through the code in debug
mode to find out where your error is being thrown.

 

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of TreKing
Sent: Monday, August 16, 2010 12:07 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] OnCreate does not finish

 

On Sun, Aug 15, 2010 at 9:57 AM, kretes kretesena...@gmail.com wrote:

so it must be that while creating the app Android System decided that there
are not enough resources for my app.
Is my suspicion right?

 

I doubt it. More than likely your app is throwing an exception between 1
and 2. I think Android tries to restart apps sometimes after they've
crashed which would explain your multiple restarts.

 

How can I do sth. with this - at least catch and log such an event in a
precise and sure way.

 

Wrap it in a try / catch block? Of course you'll only be masking the problem
and you'll probably crash elsewhere when the stuff you need to load in that
section is not found.

 

On Sun, Aug 15, 2010 at 5:02 PM, kretes kretesena...@gmail.com wrote:

I don't know if it matters, but these are some operations - especially here
on Preferences and on SQlite Database, so they need some small amount of
processing.

 

Of course it matters - whatever you're doing in there is your problem. The
SQlite in particular should be dealt with with care. 



-
TreKing http://sites.google.com/site/rezmobileapps/treking  - Chicago
transit tracking app for Android-powered devices

-- 
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] multi select listbox

2010-08-16 Thread charles berman
is there the ability to create a multi select listbox for preferences? or
has someone seen some sample code that could be used to do the same thing? I
would need to customize it but currently am stuck with only one choice when
i should allow the user to have several.

-- 
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: XML parsing slow ... cache!

2010-08-16 Thread DanH
Comparing DOM and SAX is like comparing apples and bullfrogs.  They do
two largely different things.  DOM reads in an entire XML document and
stores it as Java objects so that you can quickly reference parts of
it without knowing (or at least having to specify) in advance what
parts you're interested in.  SAX (rapidly) parses an XML file but
leaves it up to you to know (and write code for) which parts to save
as it speeds by.

A new, middle of the road technology is pull parsing, which uses a
SAX-like scanner but lets you specify in advance which elements you
want saved.

Another option is to use a lighter weight markup language.  JSON is
much more compact, parses much faster, and is generally easier to deal
with.

If you want to cache an XML file it would make more sense to cache
the parsed information vs the original file, if parsing speed is
already an issue.  There are a dozen different ways to cache the
parsed information, depending on its size and structure.

On Aug 16, 9:02 am, Davide d...@vide.bz wrote:
 Hi,

 I have seen that xml parsing is very slow. Using sax would be better,
 but benchmark show that sax work only 30%
 faster as dom. Is right? Is faster if I construct a DOM using sax?

 To reduce time i like to cache xml file. Caching it as xml is not a
 good idea because the parsing time is there again
 the secondo time.

 Should I use sqllite? Is faster? Is an idea to use an
 ObjectOutputStream? Can I put in asset a file maked by
 ObjectOutputStream
 or the serialized objects can be different in different mobile hardware?

 --
   _|  _.    o  _|  _
  (_| (_| \/ | (_| (/_

-- 
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] OnCreate does not finish

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 11:17 AM, Tommy droi...@gmail.com wrote:

 are you calling super.onCreate() ?


I think the OP would have to be, otherwise it would crash 100% of the time.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] OnCreate does not finish

2010-08-16 Thread Tommy
Ah guess I didn't see it was only intermitent

 

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of TreKing
Sent: Monday, August 16, 2010 12:32 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] OnCreate does not finish

 

On Mon, Aug 16, 2010 at 11:17 AM, Tommy droi...@gmail.com wrote:

are you calling super.onCreate() ?


I think the OP would have to be, otherwise it would crash 100% of the time.



-
TreKing http://sites.google.com/site/rezmobileapps/treking  - Chicago
transit tracking app for Android-powered devices

-- 
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] webview issues with listview.

2010-08-16 Thread charles berman
Im having some problems with my application and while i think i know what is
causing it, im not completely sure how to fix it.

my application searches a website and adds entries to a database and then
displays the users in a listview with a cursoradaptor.

when the entries are first displayed, i get an sql finalize error. I thought
maybe i had something to do with my cursoradaptor but it never shows its
head until after i exit my newview or bind view and even then, it is only
displayed once.

my other idea was that maybe it has something to do with the fact that im
using a webview. I used the webview because allthough it seems quicker to
load the profile images to the listview. I do have issues because the images
arent all loaded at once, and once i scroll down, the new images are
displayed and some of the first images until the real image for the user is
downloaded ( i dont really know how to describe that correctly)

-- 
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: XML parsing slow ... cache!

2010-08-16 Thread Kostya Vasilyev

 David,

XML parsing options available in Android were discussed here within the 
last month.


I recall that Dianne Hackborn posted some interesting performance 
comparisons.


Try finding that thread, I think it should be quite interesting w.r.t. 
to your question.


Android also includes the ability to parse XML precompiled into some 
sort of binary format, this is faster than parsing text. This is how 
layouts and other platform-specific resources are packaged in the .apk. 
Perhaps there is a way to use binary XML for your own files as well.


You can put any file you want into the asset folder, and have access to 
it at runtime. There is no reason it can't be a file with persisted objects.


So there are many good ways to skin this particular cat.

-- Kostya

16.08.2010 20:30, DanH пишет:

Comparing DOM and SAX is like comparing apples and bullfrogs.  They do
two largely different things.  DOM reads in an entire XML document and
stores it as Java objects so that you can quickly reference parts of
it without knowing (or at least having to specify) in advance what
parts you're interested in.  SAX (rapidly) parses an XML file but
leaves it up to you to know (and write code for) which parts to save
as it speeds by.

A new, middle of the road technology is pull parsing, which uses a
SAX-like scanner but lets you specify in advance which elements you
want saved.

Another option is to use a lighter weight markup language.  JSON is
much more compact, parses much faster, and is generally easier to deal
with.

If you want to cache an XML file it would make more sense to cache
the parsed information vs the original file, if parsing speed is
already an issue.  There are a dozen different ways to cache the
parsed information, depending on its size and structure.

On Aug 16, 9:02 am, Davided...@vide.bz  wrote:

Hi,

I have seen that xml parsing is very slow. Using sax would be better,
but benchmark show that sax work only 30%
faster as dom. Is right? Is faster if I construct a DOM using sax?

To reduce time i like to cache xml file. Caching it as xml is not a
good idea because the parsing time is there again
the secondo time.

Should I use sqllite? Is faster? Is an idea to use an
ObjectOutputStream? Can I put in asset a file maked by
ObjectOutputStream
or the serialized objects can be different in different mobile hardware?

--
   _|  _.o  _|  _
  (_| (_| \/ | (_| (/_



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Server Error when saving cc info from Android Market

2010-08-16 Thread TreKing
On Sun, Aug 15, 2010 at 3:45 PM, Paul idi...@gmail.com wrote:

 Many of my buyers are getting a Server Error during the purchase process
 of my app from Android Market.


This is nothing new. Search the Android Market Help Forum:
http://market.android.com/support/bin/search.py?ctx=en:searchboxquery=server+error

This issue goes back over a year, at least.


 Limited response from Google so far, but supposedly they are working on it.


More like no response. Communicating with users about blatant issues with
their products, Android in particular, is not part of Google's marketing
strategy, apparently.


 But Google Checkout and Android Market need to fix this.


Yes, yes they do. But don't hold you breath. Again, this and many other
related issues has been going on for over a year at least. Whomever's in
charge of fixing this either can't solve the problem or doesn't care enough
to do so. Learn to accept it as part of the Android Developer Experience.
Welcome.


 I suspect the actual error is thrown by Google Checkout, since they are
 the ones storing the cc info.


Probably. Google Checkout was clearly not designed to work for Android and
is a tacked on hack. It is what it is though.



 Developers/Sellers: PLEASE POST IF YOUR BUYERS ARE EXPERIENCING THIS SAME
 ISSUE. When was the first occurrence?


Hard to say, I'm guessing most users don't email the developer when they get
this issue, but I got a report as recently as 3 days ago.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: NPE on WebView.onWindowFocusChanged

2010-08-16 Thread Luis Santos
I'm having the same issue in my app. We're having continuous
reports on this error. We have a dialog with a WebView inside it.

Hope someone can help :)

Thanks!

Luis.

On 28 jul, 04:32, GJTorikian gjtorik...@gmail.com wrote:
 Bump (do bumps exist in email?) to see if there's anyone out there who
 knows what is going on. I read on an online forum that users hitting
 the back button on the WebView was causing a crash, but this does not
 seem to be the case for me.

 On Jul 20, 8:33 pm, GJTorikian gjtorik...@gmail.com wrote:



  Ok—good to know I'm not the only one.

  For what it's worth I just let the screen on my phone dim, then turn
  off. I did not get a crash, however. Very weird.

  On Jul 14, 8:17 am, Open ldonel...@gmail.com wrote:

   I've started seeing reports like this too.  The screen dimming is the
   only thing I can think of too, but the stack trace just isn't very
   much in terms of debugging information.

   On Jun 29, 7:13 am,GJTorikiangjtorik...@gmail.com wrote:

Howdy—

I'm getting crash reports from my app out in the wild. Problem is, I
don't know what's causing it. The only place I'm using WebKit is when
constructing an -in-app help browser. Here's the full stack trace:

java.lang.NullPointerException
        at 
android.webkit.WebView.onWindowFocusChanged(WebView.java:4177)
        at android.view.View.dispatchWindowFocusChanged(View.java:3788)
        at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:
658)
        at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:
662)
        at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:
662)
        at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:
662)
        at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:
662)
        at android.view.ViewRoot.handleMessage(ViewRoot.java:1921)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:123)
        at android.app.ActivityThread.main(ActivityThread.java:4627)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:521)
        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
        at dalvik.system.NativeStart.main(Native Method)

The help browser window takes the full screen, with a bar at the
bottom for help and done buttons. The only way I can conceive of
the help window losing focus is if someone clicks outside of the bar,
or the screen dims. Will catching and throwing the NPE be sufficient
for eliminating this error, or do I need to add some further metadata
in the Android Manifest XML?

-- 
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] Google maps, Overlays and the shadow layer

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 1:57 AM, oriharel ori.ha...@gmail.com wrote:

 What can I do with the shadow layer of the the google maps overlays?


Anything you want, I would think.


  I tried, naively, to draw something (an arc) only when (shadow == true)
 and got nothing?


Maybe you did something wrong? Post some code?


 I'm interested in drawing arcs and arc shadows on a map.
 is there a nice google-maps way to do this?


Probably exactly what you're doing - only correctly =)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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 clarification on Services

2010-08-16 Thread Arjun
Greetings,

Can a services exists as a stand alone with out any activities/
default. Is it possible to create services with out any activities
associated with it as a stand alone inside a apk. (just a service).

Thanks,
Arjun.

-- 
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] How to capture the contents of webview and parse it

2010-08-16 Thread TreKing
On Mon, Aug 16, 2010 at 9:43 AM, dhilip indiantalkiedhi...@gmail.comwrote:

  I am trying to capture the contents of a webview and to parse it.


What do you mean capture? What webview? Your own or some other apps'?


  Is there any method that would allow me to do so?


Connect to the url the Webview is pointing to and download the data?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: Sharing data between (tab) activities

2010-08-16 Thread nation-x
I use Observable Singleton objects because they automatically update
themselves and I never have to check if the values are stale or if I
need to retrive a new version of the object or anything of that
nature. There is a complete eclipse project available for
demonstrating how it works.

http://androidworkz.com/2010/08/14/beyond-smart-lists-how-observable-singletons-change-the-game/

On Aug 16, 3:20 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 The best way to share data between tabs is to NOT use activities.  I
 am not sure what the API people were on (but I want some of it) when
 they thought tabbed activities should make it into the final API.

 On Aug 15, 4:29 pm, Filip Havlicek havlicek.fi...@gmail.com wrote:

  I went the database way if anyone else is interested in this matter in
  future.



-- 
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] need clarification on Services

2010-08-16 Thread Agus
Yes, create your service in the android.intent.action.BOOT_COMPLETED
intent receiver.

On Mon, Aug 16, 2010 at 10:28 AM, Arjun arjunf...@gmail.com wrote:
 Greetings,

 Can a services exists as a stand alone with out any activities/
 default. Is it possible to create services with out any activities
 associated with it as a stand alone inside a apk. (just a service).

 Thanks,
 Arjun.

 --
 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: Is anyone's active install % dropping like a rock lately?

2010-08-16 Thread Doug
 So attrition will always take its toll, and the
 active user count - as a percentage of users who have EVER installed
 your app - will always tend downward. As a result, the active % is
 almost more of just a measure of how long your app has been released
 than it is a measure of user satisfaction.

Well, that's not been my experience, as my % grew over time and peaked
at 70% after about 10 months on the market.  It wasn't until the last
few months that it dropped rapidly to 54%.

Also, if attrition is going to be a known phenomenon (as I originally
suggested with the idea that old phones get decommissioned over time),
why wouldn't the stats take that into account?  Certainly Google can
tell the difference between an explicit uninstall and a device that's
been trashed (hasn't phoned home in a long time).

I'm not so much concerned about the number being wrong as the idea
that the number has something to do with the rankings on the market.
If active install % is important for rankings, and that number is
destined to drop over time, tenured apps are forced to fight gravity
increasingly over time, even if they continue to improve over that
same time.

 Bottom line: don't worry about active percentage.

Well, I'm not sure about this statement because if active install % is
an (important) factor in app rankings, then I should very much be
concerned about that number.  Rankings are everything as far as
visibility is concerned.  It's all about getting as high as possible
into the rankings if you want your app to be noticed and sell.

If Google just came clean on the algorithm that is used to calculate
rankings, then we'd know for sure if there's anything to worry about.

Doug

-- 
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: Is anyone's active install % dropping like a rock lately?

2010-08-16 Thread Mark Carter
On 16 August 2010 19:41, Doug beafd...@gmail.com wrote:

 If Google just came clean on the algorithm that is used to calculate
 rankings, then we'd know for sure if there's anything to worry about.


It's extremely unlikely they would do that.

All we can do is try to encourage them to use a fair/accurate ranking
algorithm.

For example, there's a world of difference between a high quality niche app
(high rating, low active install rate) and a lower quality general-purpose
app (lower rating, high active install rate).

-- 
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] Droid X background or font color issue?

2010-08-16 Thread andrew android
Hi !

I just got a message from a user of one of my apps that upgraded and
reinstalled onto a Droid X and she says that now the dropdowns
spinners) are defaulting to white font on white background.

Do any of you know of a difference in font color defaults on the Droid
X?

Any suggestions or ideas?

Thanks!

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


[android-developers] Re: Is anyone's active install % dropping like a rock lately?

2010-08-16 Thread Maps.Huge.Info (Maps API Guru)
I've seen a drop in active install percentage as well. My most popular
app, Radar Now! was at 67% for many months then a few weeks ago it
started to drop and now is sitting at 65%. While that may not seem
like a lot, the app has over 700,000 downloads, so it is quite a few.
I had attributed it to Droids filling up their app space and looking
for little used apps to uninstall. On average, 375,000 devices use the
app in a 30 day period so the install percentage may be correct.

It could be that Google has adjusted the active installs to take into
account devices that have been removed from service. It could be as
simple as counting apps per Google account and combined duplicates.
That would make a lot of sense and also show a more accurate figure in
the console.

I would also guess that Google is getting better at figuring things
out with the market and a result of that is a change in statistics.

The bottom line is that it seems to be happening to everyone, so as
the saying goes, a falling tide lowers all boats.

-John Coryat

-- 
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] Direction information in android MapView

2010-08-16 Thread Ajmer singh
Hi

I want to show the direction information in my app.Direction from one
address to the another using Google maps and also wanted to set overlays at
the starting address and the destination address.Is there any classes in
android too do that.

please let me know how can i do this

-- 
*Thanks and Regards
Ajmer Singh*

-- 
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.2 and falshplayer 10.1 development help

2010-08-16 Thread batrak
Hi Folks,

I have read that recent version of Android(2.2) supports Adobe
flash(10.1) files(.swf), bascially i want to open swf file in android
emulator using through eclipse for development purpose. I have seen
some coding on internet to open swg file(like shown below) but unable
to open so.

ComponentName toLaunch = new
ComponentName(com.flash.common,com.flash.common.TestFlash);
if(toLaunch != null) { File file = new File(/common/Canon.swf);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.fromFile(file)); i.putExtra(play, /common/
Canon.swf); i.setComponent(toLaunch);

startActivity(i);

After opening that file i want to use some links on that file.

Could any one give me answer about the above question? Please help.

-- 
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] Problem item in AlertDialog

2010-08-16 Thread FlorentCode
Hi all,

Thanks to help people!

I use an AlertDialog with list (singlechoice-radioButtons). When I
choose an item from the list, a toast come and I do a setText of the
item on a textView.
Everything works when I declare my items like this:
--
 
((ImageButton)findViewById(R.id.pickPays)).setOnClickListener(new
OnClickListener(){

public void onClick(View v) {

final CharSequence[] items = {United States,
France, Sweden};
AlertDialog.Builder builder = new
AlertDialog.Builder(Postit.this);
builder.setTitle(Selectionne ton pays);
builder.setSingleChoiceItems(items, -1, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
item) {
dialog.cancel();
Toast.makeText(getApplicationContext(),
items[item] , Toast.LENGTH_LONG).show();
((TextView)
findViewById(R.id.paysDisplay)).setText(items[item]);
}
});
AlertDialog alert = builder.create();
alert.show();

}
});




But I want declare my items in a array.xml
So I created an array.xml 'pays.xml' and I changed my code like this.
The problem is: the application crash when I select an item so when
the toast and the setText are called.
Do you have any ideas how can I declare my item in the toast and the
setText?



 
((ImageButton)findViewById(R.id.pickPays)).setOnClickListener(new
OnClickListener(){

public void onClick(View v) {

AlertDialog.Builder builder = new
AlertDialog.Builder(Postit.this);
builder.setTitle(Selectionne ton pays);
builder.setSingleChoiceItems(R.array.pays, -1, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
item) {
dialog.cancel();
Toast.makeText(getApplicationContext(), item ,
Toast.LENGTH_LONG).show();
((TextView)
findViewById(R.id.paysDisplay)).setText(item);
}
});
AlertDialog alert = builder.create();
alert.show();

}
});



Thanks in advance,

Florent

-- 
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 does AdMob calculate how much to pay developers per click? Is AdMob better than AdSense?

2010-08-16 Thread infero

You probably better ask this question here:
http://groups.google.com/group/admob-publisher-discuss

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

2010-08-16 Thread flirts
I have the following activity but when called it crashes in my
emulator any advice application has stopped unexpectedly...Im using
netbeans any advice i  can post the xml file if needed

package org.me.androidapplication;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.TimePicker;

/**
*
* @author kurt_cuffe
*/
public class AppointmentTime extends Activity {
private DatePicker dateAppointment;
private TextView lblTitle;
private TimePicker timeStart;
private TimePicker timeEnd;
private TextView lblStart;
private TextView lblEnd;
private Button btnNext;
private Button btnCancel;
private int ACTIVITY_CREATE;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
// ToDo add your GUI initialization code here
setContentView(R.layout.studentime);
initControls();
}

private void initControls() {
dateAppointment = (DatePicker) findViewById(R.id.dateAppointment);
lblTitle = (TextView) findViewById(R.id.lblTitle);
timeStart = (TimePicker) findViewById(R.id.timeStart);
timeEnd = (TimePicker) findViewById(R.id.timeEnd);
lblStart = (TextView) findViewById(R.id.lblStart);
lblEnd = (TextView) findViewById(R.id.lblEnd);
btnNext = (Button) findViewById(R.id.btnNext);
btnCancel = (Button) findViewById(R.id.btnCancel);
}

}
kurtgambino
Once Poster


Posts: 1
Joined: Sat Aug 14, 2010 7:39 pm
Top

-- 
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] Eclipse Helios ADT plugin

2010-08-16 Thread quest
Hi, I have installed eclipse, downloaded the android SDK and
downloaded the necessary packages for the latter application. However
I cant find the URL for the ADT plugin that I can use to install on
eclipse. What to do?

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] Problem with Saxparser and malformed XML

2010-08-16 Thread MarkG123
Hi, I am using a saxparser to read RSS XML from the web and populate
listviews. Everything works fine until I come across malformed XML,
usually encoding related, and my reader falls over.

I have changed it so that it gets as many items parsed and populated
before falling over (by default if it finds a malformed XML, then it
will give up and return an empty collection). The problem is, the next
time I try and view that feed (or any other feed), it still has the
contents after the malformed bit hanging around. For example, the
first time it now shows all the items upto the malformed item, if I
refresh, it will only show items after, refresh again, it will show
items upto and so forth.

The weird thing is, I create a new instances of everything every time.
So I don't understand why stuff is handing around.. It's like there is
some read pointer, or connection that needs to be closed and reset,
but I can't for the life of me work out what or where!

Any help would be gratefully appreciated. Thanks.

My GetFeed method:

 private RSSFeed getFeed(String urlToRssFeed)
   {
   SAXParserFactory factory;
   SAXParser parser;
   XMLReader xmlreader;
   URL url;
   InputSource is;
  try
  {
 url = new URL(urlToRssFeed);
 factory = SAXParserFactory.newInstance();
 factory.setValidating(false);
 parser = factory.newSAXParser();
 xmlreader = parser.getXMLReader();

 xmlreader.setContentHandler(m_FeedHandler);
 is = new InputSource(url.openStream());
 xmlreader.parse(is);
 m_ErrorCode = NOERROR;
  }
  catch (SAXParseException e)
  {
 e.printStackTrace();
 m_ErrorCode = XMLFORMAT;
  }
  catch (Exception e)
  {
 e.printStackTrace();
 m_ErrorCode = CONNECTION;
  }
  finally
  {
  is = null;
  url = null;
  parser = null;
  factory = null;
  return m_FeedHandler.getFeed();  //May be complete, partial
or 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


[android-developers] getApplication().openOrCreateDatabase causes method undefined error

2010-08-16 Thread dave
ok so heres what i got in there


try {

SQLiteDatabase db4 =
getApplication().openOrCreateDatabase(psalmsdb,0,null);

db4.execSQL(CREATE TABLE IF NOT EXISTS psalms  + 
(_id INTEGER
PRIMARY KEY, ps INTEGER, body TEXT, istitle TEXT));

ContentValues data = new ContentValues(3);

data.put(ps, f1);

data.put(body, f2);

data.put(istitle, f3);



db4.insert(psalms,,data);

data.clear();

}

catch (FileNotFoundException e){

Log.e(FatalError, TestDbContent:createDb:Db file not 
found!);}

i = i +1+1; //to skip '$'

}  //end of 'while i30' loop


and for whatever reason im getting the following error in eclipse


The method createDatabase(String, int, int, null) is undefined for the
type Application

i dont get it

-- 
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] How does AdMob calculate how much to pay developers per click? Is AdMob better than AdSense?

2010-08-16 Thread Natalie Hooper
I believe it's on a per-ad basis, not a per-country basis.

On 14 August 2010 21:50, Greg Siano gregmsi...@gmail.com wrote:

 I just integrated AdMob into my app.  I noticed that in South Korea,
 there were 24 clicks, but that I only got 7 cents off of those
 clicks.  In Malaysia, there was one click that generated 11 cents, and
 in Japan there were 2 clicks that generated 0 cents.  Does anyone know
 how this works??

 Also, does AdMob or Google AdSense generate more money?

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




-- 
Google Android, programming and web design at http://www.cogitas.net/blog/

-- 
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: When are the overlays drawn on the map?

2010-08-16 Thread cnbishop
hi, i was wondering if you could talk a bit about how you were able to
get the overlays to update dynamically? i am trying to do something
similar where i remove any existing overlays, and add a new overlay
with a new geopoint every couple of seconds.   in a nutshell, i am
basically getting the user's gps location; adding a random geopoint in
a different overlay and calculating the directions from the random
geopoint to the user's gps point.  from there, i am trying to get the
random geopoint to move (basically remove an overlay and add a new
one with the next point in the mPoints of the directions).  everything
is working up until adding the moving points.   is this even
possible?

here is where i set the overlays up:

//mapView.invalidate();
// 1. get enemy's last known location
if(started == false){
mapView.getOverlays();
mapOverlays.clear();
enemyOverlay = new GameOverlay(drawableEnemy, null);
enemypoint = new GeoPoint(37779350, -122419250); // 
need to set
this to random initially
OverlayItem enemyoverlayitem = new 
OverlayItem(enemypoint, ,
);

enemyOverlay.addOverlay(enemyoverlayitem);
mapOverlays.add(enemyOverlay);
}


// 2. get user's current location
double fromLat = 37.779350, fromLon = -122.419250, toLat =
latPoint, toLon = lngPoint;
//point = new GeoPoint(37779350, -122419250); // need to set
this to gps
point = new GeoPoint((int) (latPoint * 1E6), (int)(lngPoint *
1E6));
userOverlay = new GameOverlay(drawable, null);
OverlayItem useroverlayitem = new OverlayItem(point, , );
userOverlay.addOverlay(useroverlayitem);
mapOverlays.add(userOverlay);
MapController mc = mapView.getController();
mc.animateTo(point);
mc.setZoom(1);
//mapView.setSatellite(true);
//mapView.invalidate();

// 3. get directions from enemy to user
String url = RoadProvider.getUrl(fromLat, fromLon, toLat,
toLon);
InputStream is = getConnection(url);
mRoad = RoadProvider.getRoute(is);


// 4. move enemy
mapView.getOverlays();
mapOverlays.clear();
if(started == false){
newEnemyPoint = moveEnemy(point, enemypoint, mRoad);
}


enemyOverlay = new GameOverlay(drawableEnemy, null);

OverlayItem enemyoverlayitem = new OverlayItem(newEnemyPoint,
, );
enemyOverlay.addOverlay(enemyoverlayitem);
mapOverlays.add(enemyOverlay);


enemyOverlays = mapView.getOverlays();
enemyOverlays.clear();
GeoPoint currentPoint = null;
for (int i = 0; i  road.mRoute.length; i++) {

currentPoint = new GeoPoint((int) (road.mRoute[i][1] *
100), (int) (road.mRoute[i][0] * 100));


moveEnemy(currentPoint, i);
}

and here is my move function:

public GeoPoint moveEnemy(GeoPoint userPoint, GeoPoint enemyPoint,
Road mRoad) {

float userLatitude = userPoint.getLatitudeE6();
float userLongitude = userPoint.getLongitudeE6();

float enemyLatitude = enemyPoint.getLatitudeE6();
float enemyLongitude = enemyPoint.getLongitudeE6();



enemyOverlays = mapView.getOverlays();

for (i = i+1; i  mRoad.mRoute.length; i++) {


if(userLatitude != enemyLatitude  userLongitude !=
enemyLongitude){


return newEnemyPoint = new GeoPoint((int)
(mRoad.mRoute[i][1] * 100), (int) (mRoad.mRoute[i][0] * 100));
} else {
System.out.println(hi: you lost);
}

}
started=true;

return newEnemyPoint;

}

On Jul 18, 2:42 pm, AUandroid thevk...@gmail.com wrote:
 thanks, yeah I was doing a expensive operation in UI. I created a
 AsyncTask and its working fine. Here is an example if anyone 
 wantshttp://www.screaming-penguin.com/node/7746

 -vk

 On Jul 17, 7:15 pm, Frank Weiss fewe...@gmail.com wrote:

  If the updates don't happen until the onCreate or onClickEventHandler
  methods return, first guess is you're misusing the UI thread. That is,
  the UI thread is busy in your while loop and can't get anything else
  done, like drawing theoverlays. Welcome to UI programming!

  I strongly suggest you put you loop into an AsyncTask. and use its
  callback methods to update the UI. Read the docs carefully.

-- 
You received this message because you are subscribed to the Google

[android-developers] Cant Send picture message(mms)from one emulator to another in Android

2010-08-16 Thread vj
can any one help how to send mms in android

-- 
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] The target in Android Virtual Device (AVD) is disable !!

2010-08-16 Thread Amine.MOUNADIR
Heey,
I'm a beginner with Android and i installed the emulator but when i
want to create a new Android Virtual Device the choice Target is
disable !

My Eclipse version is :

-- 
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] The target in Android Virtual Device (AVD) is disable !!

2010-08-16 Thread Amine.MOUNADIR
Heey,
I'm a beginner with Android and i installed the emulator but when i
want to create a new Android Virtual Device the choice Target is
disable !

My Eclipse version is : Helios Release (Eclipse Java EE IDE for Web
Developers).

Android SDK : Package Description
  Android SDK Platform 2.2_r1
  Revision 2


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] Adapter drop down clipped on floating window

2010-08-16 Thread Christopher Fraser
Hello,

I'm having a problem with floating windows. My activity has an
AutoCompleteTextView text in a floating window positioned at the top
of the display. If enough text is entered to make the drop down appear
it will be initially clipped to the bottom edge of the window. If you
click on the drop down it appears unclipped.

I've stripped my activity down to a test program and put a copy here:

http://www.invisibility.org.uk/adaptertest.tgz

In summary, the main activity just inflates a view and positions it at
the top of the display:

public class AdapterTest extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

getWindow().setGravity(Gravity.TOP|
Gravity.FILL_HORIZONTAL);
getWindow().setLayout(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT);

LayoutInflater inflater = getLayoutInflater();
View v = inflater.inflate(R.layout.main, null);
setContentView(v);

ArrayAdapterString adapter = new ArrayAdapterString
(
this,
android.R.layout.simple_dropdown_item_1line,
new String[] { aaa0, aaa1, aaa2, aaa3 }
);
AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.textView);
textView.setAdapter(adapter);
}
}

The activity is set to use the following style in the manifest:

?xml version=1.0 encoding=utf-8?
resources
  style name=Theme.Floating parent=@android:style/Theme
item name=android:windowIsFloatingtrue/item
item name=android:windowBackground@android:color/black/item
  /style
/resources

Just in case they layout is as follows:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=horizontal
android:layout_width=fill_parent
android:layout_height=wrap_content
android:paddingLeft=10dip
android:paddingRight=10dip
android:paddingTop=10dip
android:paddingBottom=10dip

AutoCompleteTextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:id=@+id/textView
/
/LinearLayout

Any ideas?

Christopher Fraser
www.invisibility.org.uk

-- 
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] Bar Code scanner - Android 2.1

2010-08-16 Thread Chetan Saxena
Hello All,

This is Chetan Saxena, I am new to Android world.

Me and one of my friend, we both were trying to get our hands on
building a customizied bar code scanner application Android 2.1.

We are going through some issue in the process. Issue is like the
trial application which we are using as of now is unable to scan the
bar code.

My post must be sounding wage but I just wanted to get this question
out to genious ppl over here.

Please let me know if you need any further clarification and please
see if you can give me any helpfull feedback.

Thank you!!

Chetan

-- 
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] Problems drawing a translucent Path on a SurfaceView

2010-08-16 Thread Niklas
Hi, I'm having some trouble with the following code:

paint.setColor(Color.WHITE);
paint.setStyle(Paint.Style.STROKE);
paint.setAlpha(100);
paint.setStrokeWidth(12);
canvas.drawPath(path, paint);

It seems that the alpha setting is ignored, as the Path will be drawn
fully opaque. If I call drawLine() or drawLines() using the exact same
Paint object, the translucency is displayed fine. I looked through the
Javadocs on Path, Canvas and Paint (And searched this group) but
couldn't find any explanation.

Any ideas of what I might be doing wrong? 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] Emulator shortcomings regarding the touchscreen interaction

2010-08-16 Thread Mihael

Obviously it is not the same to test the application in the emulator
with the mouse or even touchscreen opposite to the real device. My
question is, how would you improve emulator to better reflect testing
experience from real device? Which are the features that are missing?

First of all, there is issue of multitouch emulation (http://
code.google.com/p/android/issues/detail?id=5977).

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