[android-developers] finishing(killing) the application from the sub-Activity

2009-10-14 Thread Asif k

Hi all,

  I had placed a cancel button in my subactivity, I want to finish the
application when this button is pressed.

  Simply putting finish() API when cancel button is clicked bring me
back to parent activity, means it is just killing the subactivity.

  I had also tried with implementing OnActivityResult() and putting
finish() in it in parent Activity, but did not work.

  Any Suggestion??

  Thanks,
  Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Free space required for a package install

2009-10-14 Thread Dianne Hackborn
You could submit a bug, but I don't know when this would be worked on.

On Tue, Oct 13, 2009 at 10:33 PM, Dan Sherman impact...@gmail.com wrote:

 Dianne,

 Sorry to revive the thread (its been a while), but noticed this got posted
 in a different thread:
 http://groups.google.com/group/android-developers/browse_thread/thread/d92a41988f9d3428

 packageinstaller/PackageInstallerActiviity.java (line 293):

//compute the size of the application. just an estimate
long size;
String apkPath = mPackageURI.getPath();
File apkFile = new File(apkPath);
//TODO? DEVISE BETTER HEAURISTIC
size = 4*apkFile.length();
checkOutOfSpace(size);

 Definitely shows exactly what I was talking about (a 6mb file requiring
 24mb free), and looks like it should affect all installs that go through the
 package manager.

 We're working on work-arounds in our app (after-market downloads to
 SDcard), but this could still be an issue for others, especially with the
 relatively small space on the G1 :)

 Glad we got it pinpointed, should I submit a bug?

 - Dan


 On Fri, Sep 11, 2009 at 12:51 PM, Dan Sherman impact...@gmail.com wrote:

 I _think_ the market has the same issue, I'll try to confirm it tonight,
 but from what I've heard from users they're experiencing download errors
 if they don't have a large amount of space free.  Again, I'll try to get
 some more concrete info later tonight :)

 Thanks for taking a look at this stuff with me :)

 - Dan


 On Fri, Sep 11, 2009 at 12:56 AM, Dianne Hackborn hack...@android.comwrote:

 Okay it just sounds like the browser's (or download manager's) checking
 on free space may be a little overly aggressive (though perhaps not too
 much, once you start getting to 15% free or so performance goes down fast).

 On the one hand, I don't see what can be done for ADC.  On the other
 hand, people won't be installing it from the browser, so I'm not sure how
 big a deal it is?  Or does Market have the same limit?


 On Thu, Sep 10, 2009 at 9:37 PM, Dan Sherman impact...@gmail.comwrote:

 Hey Dianne (or anyone else reading),

 I've got a more concrete case nailed down here.  Might help us to figure
 this issue out :)

 There's still a tiny bit of ambiguity which looks to be stemming from
 Windows vs Linux sdk's (as far as I can tell), but this process should
 illustrate the problem.

 All of these are from my Linux sdk (1.5-r2)
 Create a fresh emulator (default hardware):
 # android create avd -t 2 -n spacetest
 Run it with a fresh sdcard:
 # emulator -avd spacetest -sdcard sdcard 
 Check free-space on emulator (this is where the ambiguity comes in), in
 Settings-- SD and Phone Storage -- Internal Phone Available Space
 My emulator shows 46mb, using the same commands, a co-worker's shows
 47mb on Windows.  Regardless...
 /data: 65536K total, 17584K used, 47952K available (block size 4096)

 Download a copy of a bloated APK we made to your local computer (
 http://www.chickenbrickstudios.com/Cestos-large.apk)
 # wget http://www.chickenbrickstudios.com/Cestos-large.apk
 Install the APK via adb:
 # adb install ~/Desktop/Cestos-large.apk

 Verify that you've got around 23mb free (same as above) this shows 23mb
 free on mine, 24mb free on co-worker's.
 /data: 65536K total, 41420K used, 24116K available (block size 4096)

 Open the browser (note the available space will decrease _slightly_ with
 the first page load (I imagine some caching/settings/etc)
 /data: 65536K total, 42848K used, 22688K available (block size 4096)

 Browse to http://www.chickenbrickstudios.com/ProjectInf.apk (our APK
 we're having issues installing), which should be 5.67mb.
 Wait for the download to finish in the browser. Click on the downloaded
 APK

 I am presented with a alert saying ProjectInf could not be viewed. Free
 up some space on your phone and try again, with two options (Manage
 Applications, and Cancel).  A partition snapshot while that screen is 
 active
 shows:
 /data: 65536K total, 42756K used, 22780K available (block size 4096)

 Now, on my co-workers clean emulator, it installs perfectly fine,
 however, if he adds any about 1mb to the storage (any 1mb apk will do), he
 runs into the same issue, which leads me to believe the sweet spot is 
 very
 close to this 4x size.

 The obvious issue here is that 22.78mb should be plenty large enough to
 install a 5.67mb APK.  As you said, double is expected, slightly over 
 double
 would even be fine, but we're currently looking at very close to 4x the
 space, which is an issue :)


 As an extra kick, the snapshots you posted before are correct as well,
 because this same APK (ProjectInf.apk) works fine when installed via ADB:
 adb install ~/Desktop/ProjectInf.apk
 2297 KB/s (5949253 bytes in 2.528s)
 pkg: /data/local/tmp/ProjectInf.apk
 Success


 If you need any more information, let me know what I can provide, I'd be
 more than happy to help try to sort this one out :)
 We're just having issues with it, and are a bit 

[android-developers] State of a phonecall

2009-10-14 Thread SGAdrian

Hi,

I can see that we can get a phonestate via the PhoneStateListener,

/**
 * The phone state. One of the following:p
 * ul
 * liIDLE = no phone activity/li
 * liRINGING = a phone call is ringing or call waiting.
 *  In the latter case, another call is active as well/li
 * liOFFHOOK = The phone is off hook. At least one call
 * exists that is dialing, active or holding and no calls are
 * ringing or waiting./li
 * /ul
 */
enum State {
IDLE, RINGING, OFFHOOK;
};

but there is no way of telling the state of the call. OFFHOOK is a
number of states combined into one.

Is there a particular reason for this? Are we not allowed to see the
correct state of a call?

BR,
SGAdrian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] DVM instance creation - A new process creation at runtime

2009-10-14 Thread Ash

Hi,

I trying to understand how a new process is being created based on
AndroidManifest.xml, also looking for the possibility of creating/
forking a new Java process/new DVM instance at runtime.

I could find that using Runtime.exec one can issue system commands or
launch native applications, but this is not what I am looking for, I
am looking for creating an equivalent java process just as the parent
java process.

Can I launch an installed android application at runtime from another
android application?? Whats the way for doing this??

Any pointers/directions/suggestion will be of great help.

Thanks
Ash



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 check from the framework that ,the running application is downloaded from Market or not ?

2009-10-14 Thread gopu

getContext().getApplicationContext().getPackageCodePath();

Its giving the path like data/app/com.pakage name.apk

app-private is only for Market app?

can u please explain what exactly the app-private folder is for  or
have any docs regarding this ?



On Oct 14, 10:12 am, m_vitaly m_vit...@topixoft.com wrote:
 How about app-private (secured) applications?
 Isn't it a market feature only?

 For your application you can set it as secure and all non-market
 installs will go to the regular app dir instead of app-private.

 Not sure whether a way to find out the installed dir is available to
 application by api.

 On Oct 14, 6:59 am, Dianne Hackborn hack...@android.com wrote:

  No, there is no difference between an app installed from the market vs.
  elsewhere.

  On Tue, Oct 13, 2009 at 9:33 PM, gopu gopuraj...@gmail.com wrote:

   I want to skip some framework changes to the market applications . How
   to find out the current application is downloaded from the market or
   not ?

   Is the market downloaded app  will be stored in separate directory?

   On Oct 14, 9:23 am, GPU gopuraj...@gmail.com wrote:
How to check from the framework that ,the application is downloaded
from Market or not ?

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

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android Software Engineer - 15.000 PLN / m-c

2009-10-14 Thread Tomasz Mazur


Naszym klientem jest firma o światowej renomie w zakresie dostarczania
aplikacji mobilnych. Dwa główne obszary działalności naszego klienta,
to: rozwój aplikacji mobilnych dla wielu platform mobilnych oraz usług
zapewniających wysoką jakość standardowych komponentów oprogramowania
na urządzenia mobilne.
Nasz klient tworzy innowacyjne aplikacje mobilne rich-media; aplikacje
klienckie Social Networking; produkty i usługi Visual Voicemail;
rozwiązania Mobile Marketing oraz Mobile TV  Video.
Partnerami naszego klienta, są wiodący operatorzy telefonii komórkowej
oraz producenci urządzeń mobilnych z całego świata.

Android Software Engineer
Miejsce pracy: Kolonia
Nr ref.: ASE/Kolonia


Warunki projektu:
Wynagrodzenie: 15.000 PLN / m-c
Czas trwania: 9 - 12 m-cy - z opcją przedłużenia (po zakończeniu
kontraktu firma oferuje udział w innych równie ciekawych projektach)
Rozpoczęcie: Rekrutacja ciągła
Miejsce: Kolonia
Tryb pracy: Pełny etat
Forma współpracy / rozliczenie: Faktura VAT / umowa o dzieło / umowa
zlecenie.

Oczekiwania firmy:
- Wykształcenie wyższe informatyczne lub pokrewne
- Przynajmniej 3 letnie doświadczenie developerskie (C++ / C / Java)
- Przynajmniej roczne doświadczenie developerskie pod Android
- Bardzo dobra znajomość języka angielskiego

Nasz klient zapewnia:
- Praca przy bardzo ciekawym projekcie
- Wynagrodzenie 15.000 PLN / M-c
- Zakwaterowanie w mieszkaniu firmowym
- Dzienne diety
- Zwrot kosztów podróży Polska = Kolonia


Osoby zainteresowane naszą ofertą prosimy o przesłanie CV.doc w języku
angielskim, z klauzulą o zgodzie na przetwarzanie danych osobowych, na
adres: praca[na]rekrutacyjny.pl

W temacie aplikacji prosimy o wpisanie nazwy stanowiska lub numeru
referencyjnego oferty.


Prosimy o załączenie następującej klauzuli: Wyrażam zgodę na
przetwarzanie moich danych osobowych zawartych w mojej ofercie pracy
dla potrzeb niezbędnych do realizacji procesu rekrutacji (zgodnie z
Ustawą o Ochronie Danych Osobowych z dn. 29.08.1997 Dz. U. Nr 133 poz.
883)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My application has died when I started to use Browser

2009-10-14 Thread Ranjith

i am not using service
I am just creating a Thread only

On Oct 14, 1:52 am, Marco Nelissen marc...@android.com wrote:
 On Tue, Oct 13, 2009 at 4:05 AM, newra...@gmail.com newra...@gmail.com 
 wrote:

  My application is background application.It uses WIFI lock and
  INTERNET permission. It is doing some socket communication with a
  Remote Host PC and as well as with a local android application. It
  will start based on incoming SMS.

 What do you mean by background application? Are you using a Service,
 or are you just creating a Thread that sticks around?



  While my application is running, I tried to use the browser
  application. Within a minute my application is getting crashed.(in
  DDMS log, I found the application process has died)

  And again I restarted my application, it is always getting crashed
  within a minute.

  I could not find the reason from the DDMS log.

  Someone can help me to figure out the problem...

  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] Re: My application has died when I started to use Browser

2009-10-14 Thread Ranjith

Thanks for the information Nelissen...
I got the point why it is getting crashed...

Thanks Again...

On Oct 14, 11:57 am, Ranjith newra...@gmail.com wrote:
 i am not using service
 I am just creating a Thread only

 On Oct 14, 1:52 am, Marco Nelissen marc...@android.com wrote:



  On Tue, Oct 13, 2009 at 4:05 AM, newra...@gmail.com newra...@gmail.com 
  wrote:

   My application is background application.It uses WIFI lock and
   INTERNET permission. It is doing some socket communication with a
   Remote Host PC and as well as with a local android application. It
   will start based on incoming SMS.

  What do you mean by background application? Are you using a Service,
  or are you just creating a Thread that sticks around?

   While my application is running, I tried to use the browser
   application. Within a minute my application is getting crashed.(in
   DDMS log, I found the application process has died)

   And again I restarted my application, it is always getting crashed
   within a minute.

   I could not find the reason from the DDMS log.

   Someone can help me to figure out the problem...

   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] Market screen shots

2009-10-14 Thread Keith Wiley

I realize this is sort of a Market question, but it's for developers,
not users, so, I dunno...

Anyway, I noticed that I could add screen shots for my paid app but
not for my fee app.  There was no browse/upload interface for the
free app although the console still mentioned the possibility of
adding two screen shots.

Has anyone else noticed this, an inability to add screen shots due to
the console page not showing the browse/upload buttons, and is it
correlated with paid vs. free apps or that a coincidence in my case?

Thanks.

Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] profiles manager

2009-10-14 Thread vorcigernix

Hello,

One of features od my old n95 I am missing on my new hero is simple
management of ringtones and their volumes. I found Locale, which is
good, but I think I could use really simpler application just for
that. I wrote widget to simple change ringtone and volume from one to
another, but this is really unusable, because:

I need to change profile mostly with locked phone. Press button +
slide screen + press widget is really boring way to do this. This is
where it gets interesting. I searched this forums and it looks like we
are still not able to make lock screen widget, which will good way to
go.

So, is it possible to capture any hardware button? I found discussion
about home button, and I have to agree that overriding home will ruin
user experience. But something like trackball press in sleep mode? Or
volume buttons?

Imho, if this is possible, user should be warned in red that
application shoud do something like that. If not..ok, I understand
why :)

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



[android-developers] Re: Android Software Engineer - 15.000 PLN / m-c

2009-10-14 Thread vorcigernix

I doubt this is a recruitment forum, If it is..I finally understand
why some of my questions are still open :-D

On 14 říj, 08:54, Tomasz Mazur nog...@gmail.com wrote:
 Naszym klientem jest firma o światowej renomie w zakresie dostarczania
 aplikacji mobilnych. Dwa główne obszary działalności naszego klienta,
 to: rozwój aplikacji mobilnych dla wielu platform mobilnych oraz usług
 zapewniających wysoką jakość standardowych komponentów oprogramowania
 na urządzenia mobilne.
 Nasz klient tworzy innowacyjne aplikacje mobilne rich-media; aplikacje
 klienckie Social Networking; produkty i usługi Visual Voicemail;
 rozwiązania Mobile Marketing oraz Mobile TV  Video.
 Partnerami naszego klienta, są wiodący operatorzy telefonii komórkowej
 oraz producenci urządzeń mobilnych z całego świata.

 Android Software Engineer
 Miejsce pracy: Kolonia
 Nr ref.: ASE/Kolonia

 Warunki projektu:
 Wynagrodzenie: 15.000 PLN / m-c
 Czas trwania: 9 - 12 m-cy - z opcją przedłużenia (po zakończeniu
 kontraktu firma oferuje udział w innych równie ciekawych projektach)
 Rozpoczęcie: Rekrutacja ciągła
 Miejsce: Kolonia
 Tryb pracy: Pełny etat
 Forma współpracy / rozliczenie: Faktura VAT / umowa o dzieło / umowa
 zlecenie.

 Oczekiwania firmy:
 - Wykształcenie wyższe informatyczne lub pokrewne
 - Przynajmniej 3 letnie doświadczenie developerskie (C++ / C / Java)
 - Przynajmniej roczne doświadczenie developerskie pod Android
 - Bardzo dobra znajomość języka angielskiego

 Nasz klient zapewnia:
 - Praca przy bardzo ciekawym projekcie
 - Wynagrodzenie 15.000 PLN / M-c
 - Zakwaterowanie w mieszkaniu firmowym
 - Dzienne diety
 - Zwrot kosztów podróży Polska = Kolonia

 Osoby zainteresowane naszą ofertą prosimy o przesłanie CV.doc w języku
 angielskim, z klauzulą o zgodzie na przetwarzanie danych osobowych, na
 adres: praca[na]rekrutacyjny.pl

 W temacie aplikacji prosimy o wpisanie nazwy stanowiska lub numeru
 referencyjnego oferty.

 Prosimy o załączenie następującej klauzuli: Wyrażam zgodę na
 przetwarzanie moich danych osobowych zawartych w mojej ofercie pracy
 dla potrzeb niezbędnych do realizacji procesu rekrutacji (zgodnie z
 Ustawą o Ochronie Danych Osobowych z dn. 29.08.1997 Dz. U. Nr 133 poz.
 883)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: resource with name from numbers

2009-10-14 Thread Wouter

isnt there a way to allow images with numbers as filename?

On 14 okt, 01:38, Xavier Ducrohet x...@android.com wrote:
 The problem is that each of those resources will become a class field in
 your package.R.drawable (without the extension)

 1 is not a valid java class field.

 Xav



 On Tue, Oct 13, 2009 at 10:49 AM, Wouter wouterg...@gmail.com wrote:

  Hey,

  I had imported several .png files with names like 1.png, 2.png untill
  59.png in my Android Project..

  But it gives this error:

  Description     Resource        Path    Location        Type
  Syntax error on token 48, invalid VariableDeclaratorId        R.java  /
  TVGidsBelgie/gen/com/woutergo/tvgids    line 14 Java Problem

  How can i solve this?

  Wouter

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 check from the framework that ,the running application is downloaded from Market or not ?

2009-10-14 Thread Vitaly Polonetsky
When you publish the application for the first time it gives you the option
of Copy Protection. In it's current implementation, applications marked as
copy protected are installed into /data/app-private instead of /data/app
default directory.

I don't know a way to install application into app-private folder without
going through market.

On Wed, Oct 14, 2009 at 8:51 AM, gopu gopuraj...@gmail.com wrote:


 getContext().getApplicationContext().getPackageCodePath();

 Its giving the path like data/app/com.pakage name.apk

 app-private is only for Market app?

 can u please explain what exactly the app-private folder is for  or
 have any docs regarding this ?



 On Oct 14, 10:12 am, m_vitaly m_vit...@topixoft.com wrote:
  How about app-private (secured) applications?
  Isn't it a market feature only?
 
  For your application you can set it as secure and all non-market
  installs will go to the regular app dir instead of app-private.
 
  Not sure whether a way to find out the installed dir is available to
  application by api.
 
  On Oct 14, 6:59 am, Dianne Hackborn hack...@android.com wrote:
 
   No, there is no difference between an app installed from the market vs.
   elsewhere.
 
   On Tue, Oct 13, 2009 at 9:33 PM, gopu gopuraj...@gmail.com wrote:
 
I want to skip some framework changes to the market applications .
 How
to find out the current application is downloaded from the market or
not ?
 
Is the market downloaded app  will be stored in separate directory?
 
On Oct 14, 9:23 am, GPU gopuraj...@gmail.com wrote:
 How to check from the framework that ,the application is downloaded
 from Market or not ?
 
   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com
 
   Note: please don't send private questions to me, as I don't have time
 to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
 and
   answer them.
 



-- 
Best regards,
Vitaly Polonetsky

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] occasionally SIGBUS crash in JNI

2009-10-14 Thread allstars

hello
my apps contains JNI library
but sometimes when i launch it
it will have SIGBUS error

i use addr2line to check the stack trace

the last stack in my native lib is to invoke a JNI call
then it goes to libdvm

my app doesnt register the native method tables on JNI_Onload
it uses traditional JNI native method , i.e.
Java_com_XX

i would like to know why SIGBUS occurs occasionally

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] Any way to update the Framework changes in build without rebuilding all ?

2009-10-14 Thread GPU

Any way to update the Framework changes in build without rebuilding
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
-~--~~~~--~~--~--~---



[android-developers] Re: occasionally SIGBUS crash in JNI

2009-10-14 Thread allstars

and sometimes i met SIGBUS from other lib
below is the log

Build fingerprint: 'generic/generic/generic/:1.6/Donut/eng.allstars.
20090923.152135:eng/test-keys'
10-14 17:33:35.638: INFO/DEBUG(551): pid: 742, tid: 742  
jp.aplix.midp.p1 
10-14 17:33:35.638: INFO/DEBUG(551): signal 7 (SIGBUS), fault addr

10-14 17:33:35.638: INFO/DEBUG(551):  r0 0001  r1 0003  r2
0003  r3 0fff
10-14 17:33:35.638: INFO/DEBUG(551):  r4 0001  r5   r6
0003  r7 bc60
10-14 17:33:35.638: INFO/DEBUG(551):  r8 0160  r9 41049200  10
4104be80  fp 
10-14 17:33:35.648: INFO/DEBUG(551):  ip ad084fa4  sp bea27708  lr
afb04764  pc 0fc0  cpsr 0010
10-14 17:33:35.737: INFO/DEBUG(551):  #00  pc 0fc0
10-14 17:33:35.747: INFO/DEBUG(551):  #01  pc 4760  /
system/lib/libcutils.so
10-14 17:33:35.747: INFO/DEBUG(551): stack:
10-14 17:33:35.747: INFO/DEBUG(551): bea276c8  0002
10-14 17:33:35.747: INFO/DEBUG(551): bea276cc  bea27700  [stack]
10-14 17:33:35.747: INFO/DEBUG(551): bea276d0  
10-14 17:33:35.747: INFO/DEBUG(551): bea276d4  ad337785  /system/
lib/libandroid_runtime.so
10-14 17:33:35.747: INFO/DEBUG(551): bea276d8  4104bc90
10-14 17:33:35.757: INFO/DEBUG(551): bea276dc  ad00e4b8  /system/
lib/libdvm.so
10-14 17:33:35.757: INFO/DEBUG(551): bea276e0  bc60  [heap]
10-14 17:33:35.757: INFO/DEBUG(551): bea276e4  0001
10-14 17:33:35.757: INFO/DEBUG(551): bea276e8  0007
10-14 17:33:35.757: INFO/DEBUG(551): bea276ec  ad047511  /system/
lib/libdvm.so
10-14 17:33:35.757: INFO/DEBUG(551): bea276f0  4109ced8
10-14 17:33:35.757: INFO/DEBUG(551): bea276f4  bc60  [heap]
10-14 17:33:35.767: INFO/DEBUG(551): bea276f8  ad337785  /system/
lib/libandroid_runtime.so
10-14 17:33:35.767: INFO/DEBUG(551): bea276fc  ad040cc1  /system/
lib/libdvm.so
10-14 17:33:35.767: INFO/DEBUG(551): bea27700  df002777
10-14 17:33:35.767: INFO/DEBUG(551): bea27704  e3a070ad
10-14 17:33:35.767: INFO/DEBUG(551): #01 bea27708  41ed7072
10-14 17:33:35.767: INFO/DEBUG(551): bea2770c  ad045c55  /system/
lib/libdvm.so
10-14 17:33:35.767: INFO/DEBUG(551): bea27710  0003
10-14 17:33:35.767: INFO/DEBUG(551): bea27714  0001
10-14 17:33:35.767: INFO/DEBUG(551): bea27718  0001
10-14 17:33:35.767: INFO/DEBUG(551): bea2771c  41ed7072
10-14 17:33:35.767: INFO/DEBUG(551): bea27720  4104be90
10-14 17:33:35.767: INFO/DEBUG(551): bea27724  bea27770  [stack]
10-14 17:33:35.767: INFO/DEBUG(551): bea27728  ad00e640  /system/
lib/libdvm.so
10-14 17:33:35.767: INFO/DEBUG(551): bea2772c  ad00ed9c  /system/
lib/libdvm.so
10-14 17:33:35.767: INFO/DEBUG(551): bea27730  ad084e1c
10-14 17:33:35.777: INFO/DEBUG(551): bea27734  41049200
10-14 17:33:35.777: INFO/DEBUG(551): bea27738  bea27770  [stack]
10-14 17:33:35.777: INFO/DEBUG(551): bea2773c  ad017d38  /system/
lib/libdvm.so
10-14 17:33:35.777: INFO/DEBUG(551): bea27740  0330
10-14 17:33:35.777: INFO/DEBUG(551): bea27744  bea277f8  [stack]
10-14 17:33:35.777: INFO/DEBUG(551): bea27748  bc60  [heap]
10-14 17:33:35.777: INFO/DEBUG(551): bea2774c  4104bf04



On Oct 14, 4:36 pm, allstars allstars@gmail.com wrote:
 hello
 my apps contains JNI library
 but sometimes when i launch it
 it will have SIGBUS error

 i use addr2line to check the stack trace

 the last stack in my native lib is to invoke a JNI call
 then it goes to libdvm

 my app doesnt register the native method tables on JNI_Onload
 it uses traditional JNI native method , i.e.
 Java_com_XX

 i would like to know why SIGBUS occurs occasionally

 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] some questions about IBinder.transact

2009-10-14 Thread tstanly

hi guys,

I have some questions about IBinder.transact,
in the:
http://developer.android.com/intl/zh-TW/reference/android/os/IBinder.html
the document about transact method,

there are four parameters for transact are code, data, reply and
flags,

code is the action to perform.This should be a number between
FIRST_CALL_TRANSACTION and LAST_CALL_TRANSACTION.
but I can't understand what it means?
eg: what is FIRST_CALL_TRANSACTION  do?

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] can I get XML information step by step using SaxParser??

2009-10-14 Thread Stefan

Hello,

i have a big xml file and i want to use the SaxParser because i've
read, that this is faster than DOM and XmlPullParser.
But now I want to get some information, before the parser has read the
whole xml-file.

?xml version=1.0 encoding=utf-8?
gpx...
wpt lat=50.886021852493286 lon=6.5963780879974365
desc value=Friedensstraße 1/
 /wpt
OTHER WAYPOINTS
...
...
trk
nameHUHU/name
trkseg
trkpt lat=50.88498115539551 lon=6.59727931022644/trkpt
VERY MUCH TRACKPOINTS!!!
/trkseg
/trk
gpx

If all waypoints has been read, i want to work with that data.
And can I told the SaxParser, that i want to read the trackpoints step
by step (for example the first 20 trackpoints will be returned and
then the next 20 points and so on)?

Thanks,
Stefan

PS: I want/have an own class for the Handler
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Max app memory on large screen devices

2009-10-14 Thread String

As part of preparing my app for 1.6 compatibility, I'm testing it on
the WVGA emulator, and am running into issues where there's
insufficient memory to process images for this screen size.

In the past, there has been discussion about larger-format devices
getting a higher limit on memory for just this reason - see one
example at 
http://groups.google.com/group/android-developers/msg/954272826df60c3b.
I'm guessing this didn't happen in Donut, even though large-screen
devices are now officially supported. Can anyone confirm or deny this?
And can any of the platform folks speak to the possibility of this
happening in Eclair?

As it stands now, my app's pretty much dead in the water for large-
screen devices. :^(

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



[android-developers] Re: get outgoing call details in background

2009-10-14 Thread Nemat

Thanks to all of you.

I have done it...I removed startManagingCursor() and called the
close method() for cursor.

On Oct 13, 7:10 pm, Lazarus 101 lazarus...@gmail.com wrote:
 just remove startManagingCursor and call the close() method on the
 cursor when you've finished reading from it

 On Oct 13, 5:02 am, Nemat nemate...@gmail.com wrote:



  @Roman

  But How would we get the state when the call is received?I mean call
  duration means the difference of the time when call is received and
  the time when the call is disconnected.OFFHOOK is the state when caLL
  is placed.So we should be notified when the call is received.How can
  we get that?

  @nEx.Software

  if its not possible with service then it is of no use for me.

  Anyways is there any way to read the call-log in service?

  On Oct 12, 11:08 pm, nEx.Software email.nex.softw...@gmail.com
  wrote:

   You are getting the error on startManagingCursor because that method
   does not exist in a Service.
   Leave that out and make sure you close the cursor when you are done
   with it.

   On Oct 12, 11:00 am, Roman ( T-Mobile USA) roman.baumgaert...@t-

   mobile.com wrote:
You should be able to measure the time between multiple
onCallStateChanged events.

In case of an outgoing call the state would switch from IDLE to
CAll_STATE_OFFHOOK to to IDLE again.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 12, 3:14 am, Nemat nemate...@gmail.com wrote:

 Hi friends,

 Actually I was working to get duration of outgoing call.But I dont
 find any way of doing this.Then I decided to get the details of
 outgoing call from call log.

 But my code works only for Activity.I want this to work with Services
 because I want to get the details related to outgoing call in
 background using services.What should I do to get these details in
 background.I currently implement it for Activity.Here is my complete
 code:
 public void outgoingRecord()
   {
           Cursor c = getContentResolver().query(
               android.provider.CallLog.Calls.CONTENT_URI,
               null,
               null,
               null,
               android.provider.CallLog.Calls.DATE+  DESC);
           startManagingCursor(c);

   int numberColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.NUMBER);
 int dateColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.DATE);
 // type can be: Incoming, Outgoing or Missed
 int typeColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.TYPE);
 int durationColumn=c.getColumnIndex(
         android.provider.CallLog.Calls.DURATION);

 // Will hold the calls, available to the cursor
 ArrayListString callList = new ArrayListString();

 try{
 boolean moveToFirst=c.moveToFirst();
 Log.d(MOVETOFIRST, moveToFirst=+moveToFirst);}

 catch(Exception e)
 {
           Log.e(MOVETOFIRSTERROR,MOVETOFIRST Error=+e.toString());

 }

          String callerPhoneNumber = c.getString(numberColumn);
          int callDate = c.getInt(dateColumn);
          int callType = c.getInt(typeColumn);
          int duration=c.getInt(durationColumn);

          Log.d(CALLS, callDate=+callDate);

              switch(callType){
               case android.provider.CallLog.Calls.INCOMING_TYPE:

                           Log.d(INCOMINGCALLLOG, CallerPhoneNum=+
 callerPhoneNumber+ +Duration=+duration);

                                 break;
               case android.provider.CallLog.Calls.MISSED_TYPE:
                                   break;
               case android.provider.CallLog.Calls.OUTGOING_TYPE:
                              Log.d(OUTGOINGCALLLOG,
 CallerPhoneNum=+ callerPhoneNumber+ +Duration=+duration);
                                  break;

 }

   }

 I got error in   startManagingCursor(c).

 Should I use another way to do this?If yes,What would be that way?- 
 Hide quoted text -

   - Show quoted text -- Hide quoted text -

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



[android-developers] Exception - can anyone make sense of this?

2009-10-14 Thread Neilz

Hi. I'm hoping someone can help identify the cause of an exception I'm
getting. It happens when I use a SimpleCursorAdapter to set up a list
which populates each list row with a title, and an image thumbnail:

String[] from = new String[] { MyDbAdapter.KEY_DESC,
MyDbAdapter.KEY_IMAGE };
int[] to = new int[] { R.id.desc, R.id.myThumb };
ListAdapter adapter = new SimpleCursorAdapter(this, R.layout.my_row,
c, from, to);
setListAdapter(adapter );

The exception pours out into Logcat many, many times, and compounds
for each item I have in the list. So if the list is large, it takes
forever to display. Even having a couple of items is a pain.

Here's the Exception:

10-14 10:31:09.819: WARN/System.err(2645): java.io.IOException: Is a
directory
10-14 10:31:09.849: WARN/System.err(2645): at
org.apache.harmony.luni.platform.OSFileSystem.readImpl(Native Method)
10-14 10:31:09.859: WARN/System.err(2645): at
org.apache.harmony.luni.platform.OSFileSystem.read(OSFileSystem.java:
154)
10-14 10:31:09.859: WARN/System.err(2645): at
java.io.FileInputStream.read(FileInputStream.java:333)
10-14 10:31:09.869: WARN/System.err(2645): at
java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:200)
10-14 10:31:09.880: WARN/System.err(2645): at
java.io.BufferedInputStream.read(BufferedInputStream.java:350)
10-14 10:31:09.880: WARN/System.err(2645): at
android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
10-14 10:31:09.880: WARN/System.err(2645): at
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:375)
10-14 10:31:09.891: WARN/System.err(2645): at
android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:171)
10-14 10:31:09.898: WARN/System.err(2645): at
android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:196)
10-14 10:31:09.898: WARN/System.err(2645): at
android.graphics.drawable.Drawable.createFromPath(Drawable.java:762)
10-14 10:31:09.920: WARN/System.err(2645): at
android.widget.ImageView.resolveUri(ImageView.java:498)
10-14 10:31:09.920: WARN/System.err(2645): at
android.widget.ImageView.setImageURI(ImageView.java:287)
10-14 10:31:09.929: WARN/System.err(2645): at
android.widget.SimpleCursorAdapter.setViewImage
(SimpleCursorAdapter.java:216)
10-14 10:31:09.929: WARN/System.err(2645): at
android.widget.SimpleCursorAdapter.bindView(SimpleCursorAdapter.java:
162)
10-14 10:31:09.938: WARN/System.err(2645): at
android.widget.CursorAdapter.getView(CursorAdapter.java:186)
10-14 10:31:09.938: WARN/System.err(2645): at
android.widget.AbsListView.obtainView(AbsListView.java:1251)
10-14 10:31:09.938: WARN/System.err(2645): at
android.widget.ListView.makeAndAddView(ListView.java:1623)
10-14 10:31:09.949: WARN/System.err(2645): at
android.widget.ListView.fillDown(ListView.java:607)
10-14 10:31:09.949: WARN/System.err(2645): at
android.widget.ListView.fillFromTop(ListView.java:664)
10-14 10:31:09.960: WARN/System.err(2645): at
android.widget.ListView.layoutChildren(ListView.java:1481)
10-14 10:31:09.960: WARN/System.err(2645): at
android.widget.AbsListView.onLayout(AbsListView.java:1113)
10-14 10:31:09.970: WARN/System.err(2645): at
android.view.View.layout(View.java:6133)
10-14 10:31:09.979: WARN/System.err(2645): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
10-14 10:31:09.979: WARN/System.err(2645): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
10-14 10:31:09.989: WARN/System.err(2645): at
android.widget.LinearLayout.onLayout(LinearLayout.java:918)
10-14 10:31:09.989: WARN/System.err(2645): at
android.view.View.layout(View.java:6133)
10-14 10:31:09.999: WARN/System.err(2645): at
android.widget.FrameLayout.onLayout(FrameLayout.java:333)
10-14 10:31:09.999: WARN/System.err(2645): at
android.view.View.layout(View.java:6133)
10-14 10:31:10.009: WARN/System.err(2645): at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
10-14 10:31:10.009: WARN/System.err(2645): at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
10-14 10:31:10.009: WARN/System.err(2645): at
android.widget.LinearLayout.onLayout(LinearLayout.java:918)
10-14 10:31:10.019: WARN/System.err(2645): at
android.view.View.layout(View.java:6133)
10-14 10:31:10.029: WARN/System.err(2645): at
android.widget.FrameLayout.onLayout(FrameLayout.java:333)
10-14 10:31:10.029: WARN/System.err(2645): at
android.view.View.layout(View.java:6133)
10-14 10:31:10.038: WARN/System.err(2645): at
android.view.ViewRoot.performTraversals(ViewRoot.java:929)
10-14 10:31:10.038: WARN/System.err(2645): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
10-14 10:31:10.049: WARN/System.err(2645): at
android.os.Handler.dispatchMessage(Handler.java:99)
10-14 10:31:10.049: WARN/System.err(2645): at
android.os.Looper.loop(Looper.java:123)
10-14 10:31:10.058: WARN/System.err(2645): at

[android-developers] Context Menu

2009-10-14 Thread Neilz

Hi. I have a context menu, which appears when you press and hold over
a list item for around two seconds.

Is there a way to adjust the sensitivity of this? I'd like it to
appear more quickly, if that's possible?

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] Is their any way to debug the native sources from eclipse ?

2009-10-14 Thread GPU

Is their any way to debug the native sources ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] exception

2009-10-14 Thread Honest

Hello,

I am retrieving data from database after particular time in service.
For sometimes it works perfectly but after some time it used to give
following exception. Can some one tell me what can be wrong in it ?



E/JavaBinder(  142): java.lang.RuntimeException: No memory in memObj
E/JavaBinder(  142):at android.database.CursorWindow.native_init
(Native Meth
od)
E/JavaBinder(  142):at android.database.CursorWindow.init
(CursorWindow.jav
a:467)
E/JavaBinder(  142):at android.database.CursorWindow.init
(CursorWindow.jav
a:27)
E/JavaBinder(  142):at android.database.CursorWindow
$1.createFromParcel(Curs
orWindow.java:442)
E/JavaBinder(  142):at android.database.CursorWindow
$1.createFromParcel(Curs
orWindow.java:445)
E/JavaBinder(  142):at
android.content.ContentProviderNative.onTransact(Cont
entProviderNative.java:95)
E/JavaBinder(  142):at android.os.Binder.execTransact(Binder.java:
287)
E/JavaBinder(  142):at dalvik.system.NativeStart.run(Native
Method)
E/3   (  337): 3
E/Exception(  337): java.lang.NullPointerException
I/DumpStateReceiver(   74): Added state dump to 1 crashes
E/in readData(  337): in readData
E/1   (  337): 1
E/2   (  337): 2
E/IM

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] about leaked window com.android.internal.policy.impl.PhoneWindow error

2009-10-14 Thread ilikeB2

When I use invoke a ProgressDialog instance in an activity, sometimes
it will show error in logcat as below:

E/WindowManager(  809): Activity com.android.phone.SimContacts has
leaked window com.android.internal.policy.impl.PhoneWindow
$decorv...@4345e558 that was originally added here
E/WindowManager(  809): android.view.WindowLeaked: Activity
com.android.phone.SimContacts has leaked window
com.android.internal.policy.impl.phonewindow$decorv...@4345e558 that
was originally added here
E/WindowManager(  809): at android.view.ViewRoot.init
(ViewRoot.java:214)
E/WindowManager(  809): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
E/WindowManager(  809): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/WindowManager(  809): at android.view.Window
$LocalWindowManager.addView(Window.java:392)
E/WindowManager(  809): at android.app.Dialog.show(Dialog.java:
231)
E/WindowManager(  809): at com.android.phone.SimContacts
$1.handleMessage(SimContacts.java:82)
E/WindowManager(  809): at android.os.Handler.dispatchMessage
(Handler.java:99)
E/WindowManager(  809): at android.os.Looper.loop(Looper.java:
123)
E/WindowManager(  809): at android.app.ActivityThread.main
(ActivityThread.java:3948)
E/WindowManager(  809): at
java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager(  809): at java.lang.reflect.Method.invoke
(Method.java:521)
E/WindowManager(  809): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/WindowManager(  809): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/WindowManager(  809): at dalvik.system.NativeStart.main
(Native Method)

and i found after this error, it will probably generate other problems
in windowmanage. Can anyone tell me in which case i will meet the case
and how can i avoid it ? It troubled me for a long time. 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] Getting paid apps for free ??

2009-10-14 Thread WoodManEXP

I keep reading posts about Chinese and other web sites that are
offering the paid, copy protected apps for free.

If this is indeed the case and there is not a reasonable remedy it
definitely takes the wind out of our sails for investing further in
creating applications for the Android platform.

Some say that Google bears no responsibility in this situation, but I
think they do need to step up in some fashion. After all Google has
positioned the Marketplace as sole distribution point for the apps and
take 30% for their services. But if what the Marketplace does is
funnel copy protected apps into the free distribution channels then
what is the point?

Can anyone from Google respond to this situation?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Geting SMS Center number

2009-10-14 Thread flywalker

The getNetworkOperator() can return MCC+MNC , but this is not the SMSC
number.
Is it any other way to get the SMSC number ?

On Oct 12, 9:57 am, Delirium id.delir...@gmail.com wrote:
 SMSMessage object allows you to set SMSC number, and you can get it
 after setting, otherwise it returns null.
 The only solution i found is to map SMSC numbers manualy to mobile
 network numbers which you can get from TelephonyManager.
 See android.telephony.TelephonyManager.getNetworkOperator() for
 details.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Getting paid apps for free ??

2009-10-14 Thread String

On 14 Oct, 12:48, WoodManEXP woodman...@gmail.com wrote:

 After all Google has
 positioned the Marketplace as sole distribution point for the apps

No, perhaps you're thinking of Apple and the iTunes App Store. Google
has positioned the Android Market as ONE distribution point for apps,
but you're free to distribute by any other means you like. AndAppStore
and SlideME come to mind.

Granted, the Market is the channel which comes preinstalled on the
majority of handsets. But for a variety of reasons (including the ease
of pirating apps from it), you might consider not relying on it as
YOUR sole distribution point.

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



[android-developers] GLSurfaceView show initially with black background before rendering first frame?

2009-10-14 Thread LemonDev

when i create a GLSurfaceView to render a textured cube, and i add
this new glsurfaceview to my FrameLayout to do some animation , it
first shows  a black background, and then my cube begin to rotate.
so is there any method to avoid the matter? otherwise , it seems
terriable to be an animation.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 in the touch event

2009-10-14 Thread zeeshan

Hi Dear,

i am having a problem handling the touch event on a button layout.
i added a button layout into the webview and have a touch event on
webview.

touch event is mixed with the button click event.

please help me how can i handle 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] search string for market

2009-10-14 Thread zeeshan

Hi dear,

i using the following code for my APP search

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(market://search?q=pname:QueryString));
startActivity(intent);

is it possible to change the QueryString once App is downloaded?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Getting paid apps for free ??

2009-10-14 Thread vorcigernix

I think major source of these applications are torrents. But I have to
second what String said, if you really want to sell you apps, you have
to use AndAppStore and SlideME just because there are around 50% of
users which can't buy your software from google marketplace even if
they want. I think it is correct to blame google for poor marketplace,
on other hand I really appriciate that you don't have to use google
marketplace at all.

On 14 říj, 13:48, WoodManEXP woodman...@gmail.com wrote:
 I keep reading posts about Chinese and other web sites that are
 offering the paid, copy protected apps for free.

 If this is indeed the case and there is not a reasonable remedy it
 definitely takes the wind out of our sails for investing further in
 creating applications for the Android platform.

 Some say that Google bears no responsibility in this situation, but I
 think they do need to step up in some fashion. After all Google has
 positioned the Marketplace as sole distribution point for the apps and
 take 30% for their services. But if what the Marketplace does is
 funnel copy protected apps into the free distribution channels then
 what is the point?

 Can anyone from Google respond to this situation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] invalid username and password when trying to unlock g2

2009-10-14 Thread andr0id

Hi all,

I know this is not really the place to post this message, but this is
the closest thing I could find to google android support.

So a friend of mine did too many wrong patterns and the phone is
asking for my username and password.

When i fill in my login and password, it says invalid username or
password. I tried it like 20 times.I have of course verified the
username and password on my gmail, and it works fine.

Has this ever happened to anyone ? Is there a way around it ?

I refuse to reset my phone to factory settings, i have all my
contacts, and important notes in there...

I was really looking forward to android, but stuff like this is just
unacceptable, really disappointing...

Please help me.

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: can I get XML information step by step using SaxParser??

2009-10-14 Thread Smelly Eddie

SaxParser walks through an XML file calling key events
startElement, endElement, and others.

You can use these events to do whatever you need at any point in the
document. So once we reach the start  of trk we know all waypoints
have been read right?

You should call the parser in a background thread so your UI thread
can respond to a call from the parser when it reaches the marked
element.

//inside the xml handler used by Sax
public void startElement(String uri, String name, String qName,
Attributes atts) {
if (name.trim().equals(trk)){
  //we have read all waypoints, we can start
acting on the data as the sax parser finishes
inTrackPoints = true;
   callNotifyMethodInMainClass(wayPointArray)
}
}


For info on actually capturing the waypoints tread up on sax. it is
well covered.


On Oct 14, 6:13 am, Stefan ebay-dah...@web.de wrote:
 Hello,

 i have a big xml file and i want to use the SaxParser because i've
 read, that this is faster than DOM and XmlPullParser.
 But now I want to get some information, before the parser has read the
 whole xml-file.

 ?xml version=1.0 encoding=utf-8?
 gpx...
 wpt lat=50.886021852493286 lon=6.5963780879974365
 desc value=Friedensstraße 1/
  /wpt
 OTHER WAYPOINTS
 ...
 ...
 trk
 nameHUHU/name
 trkseg
 trkpt lat=50.88498115539551 lon=6.59727931022644/trkpt
 VERY MUCH TRACKPOINTS!!!
 /trkseg
 /trk
 gpx

 If all waypoints has been read, i want to work with that data.
 And can I told the SaxParser, that i want to read the trackpoints step
 by step (for example the first 20 trackpoints will be returned and
 then the next 20 points and so on)?

 Thanks,
 Stefan

 PS: I want/have an own class for the Handler
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Temp storage for bitmap

2009-10-14 Thread m_vitaly

Ok, but what if I want to delete if after issuing startActivity, can I
do this ?
And where should I store it then ?

On Oct 14, 4:20 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 When you store it in the EXTERNAL_CONTENT_URI, your image can already
 be shared with every other app on the phone.

 When you added (inserted) the image, your result was a Uri. This Uri
 can be used by any other app to obtain your image.

 On Oct 13, 4:42 pm, m_vitaly m_vit...@topixoft.com wrote:



  My program creates a bitmap and successfully stores it on external
  storage (Images.Media.EXTERNAL_CONTENT_URI).

  The next option to implement is to share the image.
  I'm thinking about different way of doing it:
  1. Save it as captured image (as before) and startActivity with
  Intent.ACTION_SEND intent with the saved image uri.
  2. Save it in application's home directory (getFileStreamPath()),
  startActivityForResult as in 1. and I hope that I'll recieve a result
  when the message is sent.
  3. Save it in some kind of temp/cache folder and don't bother about
  deleting it or delete it as in 2.

  Personally I prefer the second option.

  My questions are:
  Will it work with startActivityForResult() as in 2. ?
  Do I have access to temp/cache folder as in 3. ? If I do, Should I
  delete the file afterwards ?
  May be some flag for Intent.ACTION_SEND to delete the file
  afterwards ?

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



[android-developers] Re: settings page for app design

2009-10-14 Thread Eric Carman

What I did was to create a singleton class that encapsulated the
preferences. The class has an update method that I call when I
return from setting the preferences. Otherwise, as a singleton class
it is available to all activities and units.

As to how I fetch the preferences, I use the following:

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
(mContext);

try {
colorValue = Integer.parseInt(prefs.getString(mContext.getString
(R.string.pref_color),
mContext.getString(R.string.colordefault)));
}
catch (Exception ex) {
colorValue = 0;
}

Note that in my singleton class I set the context from the main
activity in its create event. The mContext is a reference to that.

HTH

Best Regards,
Eric

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Locale for Spanish missing?

2009-10-14 Thread dsurround

Use
myTts.setLanguage(new Locale(es))

This works for spain.  Apparently, Java decided not to spell out all
locales a while back.

Wanted to post in case others are running into same problem.



On Oct 13, 9:15 am, dsurround dsurro...@gmail.com wrote:
 I am interfacing with the Text Synthesis engine of 1.6.  I am trying
 to set the language to Spanish.  I can set it to English, German,
 French and Italian, but Spanish does not come up as an option.

 myTts.setLanguage(Locale.SPANISH);  // this does not work
 myTts.setLanguage(Locale.GERMAN);  // this works along with ENGLISH,
 ITALIAN or FRENCH

 Seems like it should be there.  Is that a known bug?  I have looked
 through
 the forums, can't find anything. I can set it to SPANISH
 through the settings interface on the phone, but need to set it
 programatically.
 Please advise.
 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: Should we still force our apps to API level 2?

2009-10-14 Thread Doug

In a perfect world you would be right about @Deprecated - but I have
seen an example in the 1.6 SDK where a method has been @Deprecated
with the 1.6 release, along with some nice comments on how to do
things the new way, only to find that in this case @Deprecated
actually means the method has been 'modified' so that it has
effectively become:

@Deprecated
public method()
{
return;
}

So, if you're unsure, or your Compatibility code which is still
using the older (now deprecated) methods/classes suddenly starts
misbehaving - download the Android source and go wabbit hunting!

Doug



On Oct 13, 8:14 pm, jotobjects jotobje...@gmail.com wrote:
 Deprecated classes and methods still work but they are a notification
 to developers that they will be dropped eventually so new code should
 not use them and updates should stop using them.  There should be a
 compiler warning if you use an @Deprecated method and it should show
 as deprecated in the API documentation.  From what I have seen that
 last part does NOT happen in 1.6 - you have to look at the source code
 to find out what is deprecated or pay close attention to compiler
 warnings.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Market screen shots

2009-10-14 Thread Maps.Huge.Info (Maps API Guru)

I had no problem adding screen shots to my free apps. I have no paid
apps, so perhaps the mix is causing an issue.

Strangely, the market asks for 320x480 screen shots then reduces them
in size by a few pixels, and sort of smudging them in the process. It
seems like it would have been smarter to ask the developer to deliver
the properly sized image so that this pixilation wouldn't be
necessary.

-John Coryat

Radar Now! (just passed 5000 downloads!)

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



[android-developers] Re: can I get XML information step by step using SaxParser??

2009-10-14 Thread Stefan

Hi,

 You can use these events to do whatever you need at any point in the
 document. So once we reach the start  of trk we know all waypoints
 have been read right?

Yes

 You should call the parser in a background thread so your UI thread
 can respond to a call from the parser when it reaches the marked
 element.


Actually, in my main.java i have:
getWpt = new Thread (new Runnable ()
{
@Override
public void run()
{
try
{
FileInputStream is = new 
FileInputStream(/sdcard/+fileList[pos]);
SAXParserFactory factory = 
SAXParserFactory.newInstance();
SAXParser saxparser = factory.newSAXParser();
XMLReader reader = saxparser.getXMLReader();
xmlHandler = new XMLHandler ();
reader.setContentHandler(xmlHandler);
reader.parse( new InputSource (is) );
}
..

than i have an own java file for my XMLHandler class. So how could i
use a method like your callNotifyMethodInMainClass(wayPointArray). ??
Must I create a Handler object in my main.java and send the handler
object to my handler class (instead of xmlHandler = new XMLHandler ();
xmlHandler = new XMLHandler (myHandler); ?? If so, how can i send the
wayPointArray back?? I only use myHandler.sendEmptyMessage(0) or
something like that - so how can i pass the waypointArray object
back??


Thanks for your answer,
Stefan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Exception - can anyone make sense of this?

2009-10-14 Thread Doug

Ummm...

The exception is:
java.io.IOException: Is a directory

and seems to be happening when your cursor code is trying to:
android.graphics.drawable.Drawable.createFromPath(Drawable.java:762)

So my first instinct would be to tell you that the filename you are
passing to the drawable is actually that of a directory.  Passing it
an actual FILE name would be a better option :)

Doug

On Oct 14, 3:36 am, Neilz neilhorn...@googlemail.com wrote:
 Hi. I'm hoping someone can help identify the cause of an exception I'm
 getting. It happens when I use a SimpleCursorAdapter to set up a list
 which populates each list row with a title, and an image thumbnail:

 String[] from = new String[] { MyDbAdapter.KEY_DESC,
 MyDbAdapter.KEY_IMAGE };
 int[] to = new int[] { R.id.desc, R.id.myThumb };
 ListAdapter adapter = new SimpleCursorAdapter(this, R.layout.my_row,
 c, from, to);
 setListAdapter(adapter );

 The exception pours out into Logcat many, many times, and compounds
 for each item I have in the list. So if the list is large, it takes
 forever to display. Even having a couple of items is a pain.

 Here's the Exception:

 10-14 10:31:09.819: WARN/System.err(2645): java.io.IOException: Is a
 directory
 10-14 10:31:09.849: WARN/System.err(2645):     at
 org.apache.harmony.luni.platform.OSFileSystem.readImpl(Native Method)
 10-14 10:31:09.859: WARN/System.err(2645):     at
 org.apache.harmony.luni.platform.OSFileSystem.read(OSFileSystem.java:
 154)
 10-14 10:31:09.859: WARN/System.err(2645):     at
 java.io.FileInputStream.read(FileInputStream.java:333)
 10-14 10:31:09.869: WARN/System.err(2645):     at
 java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:200)
 10-14 10:31:09.880: WARN/System.err(2645):     at
 java.io.BufferedInputStream.read(BufferedInputStream.java:350)
 10-14 10:31:09.880: WARN/System.err(2645):     at
 android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
 10-14 10:31:09.880: WARN/System.err(2645):     at
 android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:375)
 10-14 10:31:09.891: WARN/System.err(2645):     at
 android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:171)
 10-14 10:31:09.898: WARN/System.err(2645):     at
 android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:196)
 10-14 10:31:09.898: WARN/System.err(2645):     at
 android.graphics.drawable.Drawable.createFromPath(Drawable.java:762)
 10-14 10:31:09.920: WARN/System.err(2645):     at
 android.widget.ImageView.resolveUri(ImageView.java:498)
 10-14 10:31:09.920: WARN/System.err(2645):     at
 android.widget.ImageView.setImageURI(ImageView.java:287)
 10-14 10:31:09.929: WARN/System.err(2645):     at
 android.widget.SimpleCursorAdapter.setViewImage
 (SimpleCursorAdapter.java:216)
 10-14 10:31:09.929: WARN/System.err(2645):     at
 android.widget.SimpleCursorAdapter.bindView(SimpleCursorAdapter.java:
 162)
 10-14 10:31:09.938: WARN/System.err(2645):     at
 android.widget.CursorAdapter.getView(CursorAdapter.java:186)
 10-14 10:31:09.938: WARN/System.err(2645):     at
 android.widget.AbsListView.obtainView(AbsListView.java:1251)
 10-14 10:31:09.938: WARN/System.err(2645):     at
 android.widget.ListView.makeAndAddView(ListView.java:1623)
 10-14 10:31:09.949: WARN/System.err(2645):     at
 android.widget.ListView.fillDown(ListView.java:607)
 10-14 10:31:09.949: WARN/System.err(2645):     at
 android.widget.ListView.fillFromTop(ListView.java:664)
 10-14 10:31:09.960: WARN/System.err(2645):     at
 android.widget.ListView.layoutChildren(ListView.java:1481)
 10-14 10:31:09.960: WARN/System.err(2645):     at
 android.widget.AbsListView.onLayout(AbsListView.java:1113)
 10-14 10:31:09.970: WARN/System.err(2645):     at
 android.view.View.layout(View.java:6133)
 10-14 10:31:09.979: WARN/System.err(2645):     at
 android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
 10-14 10:31:09.979: WARN/System.err(2645):     at
 android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
 10-14 10:31:09.989: WARN/System.err(2645):     at
 android.widget.LinearLayout.onLayout(LinearLayout.java:918)
 10-14 10:31:09.989: WARN/System.err(2645):     at
 android.view.View.layout(View.java:6133)
 10-14 10:31:09.999: WARN/System.err(2645):     at
 android.widget.FrameLayout.onLayout(FrameLayout.java:333)
 10-14 10:31:09.999: WARN/System.err(2645):     at
 android.view.View.layout(View.java:6133)
 10-14 10:31:10.009: WARN/System.err(2645):     at
 android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
 10-14 10:31:10.009: WARN/System.err(2645):     at
 android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
 10-14 10:31:10.009: WARN/System.err(2645):     at
 android.widget.LinearLayout.onLayout(LinearLayout.java:918)
 10-14 10:31:10.019: WARN/System.err(2645):     at
 android.view.View.layout(View.java:6133)
 10-14 10:31:10.029: WARN/System.err(2645):     at
 android.widget.FrameLayout.onLayout(FrameLayout.java:333)
 10-14 10:31:10.029: WARN/System.err(2645):     at
 

[android-developers] Re: Market screen shots

2009-10-14 Thread Keith Wiley

Anyone else?  When  open the console for my app I see the entry for
screen shots directly below the .apk file upload area, and the note
that there is a 2 image max, but there is no browse/upload
interface.

Any ideas?  I'll hit the Market forums about this too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: invalid username and password when trying to unlock g2

2009-10-14 Thread RichardC

This seems to be an ongoing issue and there is a bug report

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

about it which has some helpful sugguestions.

--
RichardC




On Oct 14, 2:42 pm, andr0id sgrang...@gmail.com wrote:
 Hi all,

 I know this is not really the place to post this message, but this is
 the closest thing I could find to google android support.

 So a friend of mine did too many wrong patterns and the phone is
 asking for my username and password.

 When i fill in my login and password, it says invalid username or
 password. I tried it like 20 times.I have of course verified the
 username and password on my gmail, and it works fine.

 Has this ever happened to anyone ? Is there a way around it ?

 I refuse to reset my phone to factory settings, i have all my
 contacts, and important notes in there...

 I was really looking forward to android, but stuff like this is just
 unacceptable, really disappointing...

 Please help me.

 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: Should we still force our apps to API level 2?

2009-10-14 Thread Greivin Lopez


Thanks to jotobjects and EboMike for their responses.

I will try to describe my situation better: I have an application that
send SMS messages by using SmsManager class. In the SDK 1.5 version of
the application (I mean I set 1.5 as the Project Build Target)
everything works fine because I use the SmsManager class located at:
android.telephony.gsm.SmsManager which does only support GSM.

When i try to create the SDK 1.6 version of it (Setting the Project
Build Target as 1.6) it does not compile because the SmsManager class
was moved to android.telephony.SmsManager (which is ok because it now
supports CDMA). But then my code should be changed if I want to
compile using the new SDK.

===
My desired solution is: Use conditional compilation to mark my code to
use one of the SmsManager classes depending on the SDK I choose as my
project build target. Encapsulating this logic into my own SmsEngine
class so everything in my code works smoothly and supporting 1.5-1.6
firmware devices and also supporting CDMA in the devices that use
1.6.  Without the need to change my code further than a simple
conditional compilation.

Problem: As EboMike says there is not such thing as conditional
compilation in Java (because Java gurus claim there is not need to
such a thing). I personally believe that in the fantasy world were
nobody fails designing their APIS the though Nobody needs conditional
compilation is valid. But nobody is perfect and all the APIs out
there in every platforms contains design errors or changes in future
designs that leads to the need to improve!.
===

===
My current solution is: Keep my project build target as 1.5.
Supporting 1.5 and 1.6 devices without any changes in my source code.

Problem: My application does not support CDMA Sms messaging. I can't
benefit from new improvements of performance or bug fixes for the new
1.6 implementation of the SDK.
===

===
Possible alternatives: Keep two releases of the application, one for
1.5 and another one for 1.6 supporting CDMA.  Use reflection into a
wrapper class to identify which of the firmware I am running allowing
me to decide the implementation to use.

Problem: Neither alternative convince me. Two releases can confuse my
users. Reflection is too expensive in performance and also does not
makes my code clear (It scrambles the source code a little).
===

Until there is aren't 1.5 firmware device out there I suppose I
couldn't resolve my problem.

Thanks for your help everyone!.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 install android market?

2009-10-14 Thread luggie

Mike,thank you very much!
If we want to install Android Market on our product(mobile phone)  ,
must We contact Google?


On 10月14日, 上午9时01分, EboMike ebom...@gmail.com wrote:
 luggie, it's closed source. It's not freely available. If you have a
 phone that came with it, you're good to go. If not, then there is no
 legal way to get it.

 For the purpose of getting apps, there are other applications
 available (like Al Sutton's AndAppStore).

 -Mike

 On Oct 13, 5:56 pm, luggie lug...@gmail.com wrote:



  I want to install Android Market in my mobile device(android),how can
  I do?
  thanks!

  On 10月14日, 上午7时00分, EboMike ebom...@gmail.com wrote:

   It's a closed-source application and not freely distributed. You may
   not install it on an emulator.

   (That's actually good, the potential for abuse is quite high.)

   On Oct 13, 6:00 am, luggie lug...@gmail.com wrote:

in emulator

On 10月13日, 下午8时40分, luggie lug...@gmail.com wrote:

 hi,everyone!
 How to install android market?

 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: How to install android market?

2009-10-14 Thread Disconnect

Supposedly its free. Supposedly the barrier to entry isn't very high.
But nobody outside google really knows anything more than that - if
you say its probably expensive hackbod will yell at you to prove it,
then wander away without answering any questions.

2009/10/14 luggie lug...@gmail.com:

 Mike,thank you very much!
 If we want to install Android Market on our product(mobile phone)  ,
 must We contact Google?


 On 10月14日, 上午9时01分, EboMike ebom...@gmail.com wrote:
 luggie, it's closed source. It's not freely available. If you have a
 phone that came with it, you're good to go. If not, then there is no
 legal way to get it.

 For the purpose of getting apps, there are other applications
 available (like Al Sutton's AndAppStore).

 -Mike

 On Oct 13, 5:56 pm, luggie lug...@gmail.com wrote:



  I want to install Android Market in my mobile device(android),how can
  I do?
  thanks!

  On 10月14日, 上午7时00分, EboMike ebom...@gmail.com wrote:

   It's a closed-source application and not freely distributed. You may
   not install it on an emulator.

   (That's actually good, the potential for abuse is quite high.)

   On Oct 13, 6:00 am, luggie lug...@gmail.com wrote:

in emulator

On 10月13日, 下午8时40分, luggie lug...@gmail.com wrote:

 hi,everyone!
 How to install android market?

 thanks!- 隐藏被引用文字 -

   - 显示引用的文字 -- 隐藏被引用文字 -

 - 显示引用的文字 -
 


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



[android-developers] How to generate ant file local.properties without overwriting build.xml

2009-10-14 Thread Matt

Hello.  I know that in order to generate the ant scripts for your
project, you do this:

android update project --name project_name --target target_ID --
path path/to/your/project/

(see reference page 
http://developer.android.com/guide/developing/other-ide.html)

That being said, you are not supposed to check in local.properties
into your source repository, since it depends on the developer's
machine.  But we had to alter the build.xml for some custom stuff.
And the above command will overwrite build.xml.  Is there a way to
only generate the local.properties so that developers can check out
the code and run a command so it works?

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] Prevent orientation change

2009-10-14 Thread kaloer

Hi,

I have an application with an alarm, which is notified with a Dialog.
However, when I rotate the screen the dialog closes but the alarm
sound keeps playing. Can I prevent the orientation change to happen
while the alarm is shown? I have tried using the
setRequestedOrientation method, but it doesn't work.

/Kaloer
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: about leaked window com.android.internal.policy.impl.PhoneWindow error

2009-10-14 Thread Romain Guy

Make sure you dismiss() all your dialogs when your activity is destroyed.

On Wed, Oct 14, 2009 at 4:13 AM, ilikeB2 zhengji1...@gmail.com wrote:

 When I use invoke a ProgressDialog instance in an activity, sometimes
 it will show error in logcat as below:

 E/WindowManager(  809): Activity com.android.phone.SimContacts has
 leaked window com.android.internal.policy.impl.PhoneWindow
 $decorv...@4345e558 that was originally added here
 E/WindowManager(  809): android.view.WindowLeaked: Activity
 com.android.phone.SimContacts has leaked window
 com.android.internal.policy.impl.phonewindow$decorv...@4345e558 that
 was originally added here
 E/WindowManager(  809):         at android.view.ViewRoot.init
 (ViewRoot.java:214)
 E/WindowManager(  809):         at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
 E/WindowManager(  809):         at
 android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
 E/WindowManager(  809):         at android.view.Window
 $LocalWindowManager.addView(Window.java:392)
 E/WindowManager(  809):         at android.app.Dialog.show(Dialog.java:
 231)
 E/WindowManager(  809):         at com.android.phone.SimContacts
 $1.handleMessage(SimContacts.java:82)
 E/WindowManager(  809):         at android.os.Handler.dispatchMessage
 (Handler.java:99)
 E/WindowManager(  809):         at android.os.Looper.loop(Looper.java:
 123)
 E/WindowManager(  809):         at android.app.ActivityThread.main
 (ActivityThread.java:3948)
 E/WindowManager(  809):         at
 java.lang.reflect.Method.invokeNative(Native Method)
 E/WindowManager(  809):         at java.lang.reflect.Method.invoke
 (Method.java:521)
 E/WindowManager(  809):         at com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:782)
 E/WindowManager(  809):         at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
 E/WindowManager(  809):         at dalvik.system.NativeStart.main
 (Native Method)

 and i found after this error, it will probably generate other problems
 in windowmanage. Can anyone tell me in which case i will meet the case
 and how can i avoid it ? It troubled me for a long time. thanks .
 




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

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: Max app memory on large screen devices

2009-10-14 Thread Romain Guy

Since there's no device shipping with a large or dense screen and
Donut, it hasn't happened no. We will however increase the heap limit
for devices with large screens (or dense screens.)

On Wed, Oct 14, 2009 at 3:14 AM, String sterling.ud...@googlemail.com wrote:

 As part of preparing my app for 1.6 compatibility, I'm testing it on
 the WVGA emulator, and am running into issues where there's
 insufficient memory to process images for this screen size.

 In the past, there has been discussion about larger-format devices
 getting a higher limit on memory for just this reason - see one
 example at 
 http://groups.google.com/group/android-developers/msg/954272826df60c3b.
 I'm guessing this didn't happen in Donut, even though large-screen
 devices are now officially supported. Can anyone confirm or deny this?
 And can any of the platform folks speak to the possibility of this
 happening in Eclair?

 As it stands now, my app's pretty much dead in the water for large-
 screen devices. :^(

 String
 




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

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



[android-developers] Re: occasionally SIGBUS crash in JNI

2009-10-14 Thread Marco Nelissen

You're probably passing a NULL pointer to your native code, which is
rarely a good idea.


On Wed, Oct 14, 2009 at 2:37 AM, allstars allstars@gmail.com wrote:

 and sometimes i met SIGBUS from other lib
 below is the log

 Build fingerprint: 'generic/generic/generic/:1.6/Donut/eng.allstars.
 20090923.152135:eng/test-keys'
 10-14 17:33:35.638: INFO/DEBUG(551): pid: 742, tid: 742  
 jp.aplix.midp.p1 
 10-14 17:33:35.638: INFO/DEBUG(551): signal 7 (SIGBUS), fault addr
 
 10-14 17:33:35.638: INFO/DEBUG(551):  r0 0001  r1 0003  r2
 0003  r3 0fff
 10-14 17:33:35.638: INFO/DEBUG(551):  r4 0001  r5   r6
 0003  r7 bc60
 10-14 17:33:35.638: INFO/DEBUG(551):  r8 0160  r9 41049200  10
 4104be80  fp 
 10-14 17:33:35.648: INFO/DEBUG(551):  ip ad084fa4  sp bea27708  lr
 afb04764  pc 0fc0  cpsr 0010
 10-14 17:33:35.737: INFO/DEBUG(551):          #00  pc 0fc0
 10-14 17:33:35.747: INFO/DEBUG(551):          #01  pc 4760  /
 system/lib/libcutils.so
 10-14 17:33:35.747: INFO/DEBUG(551): stack:
 10-14 17:33:35.747: INFO/DEBUG(551):     bea276c8  0002
 10-14 17:33:35.747: INFO/DEBUG(551):     bea276cc  bea27700  [stack]
 10-14 17:33:35.747: INFO/DEBUG(551):     bea276d0  
 10-14 17:33:35.747: INFO/DEBUG(551):     bea276d4  ad337785  /system/
 lib/libandroid_runtime.so
 10-14 17:33:35.747: INFO/DEBUG(551):     bea276d8  4104bc90
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276dc  ad00e4b8  /system/
 lib/libdvm.so
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276e0  bc60  [heap]
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276e4  0001
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276e8  0007
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276ec  ad047511  /system/
 lib/libdvm.so
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276f0  4109ced8
 10-14 17:33:35.757: INFO/DEBUG(551):     bea276f4  bc60  [heap]
 10-14 17:33:35.767: INFO/DEBUG(551):     bea276f8  ad337785  /system/
 lib/libandroid_runtime.so
 10-14 17:33:35.767: INFO/DEBUG(551):     bea276fc  ad040cc1  /system/
 lib/libdvm.so
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27700  df002777
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27704  e3a070ad
 10-14 17:33:35.767: INFO/DEBUG(551): #01 bea27708  41ed7072
 10-14 17:33:35.767: INFO/DEBUG(551):     bea2770c  ad045c55  /system/
 lib/libdvm.so
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27710  0003
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27714  0001
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27718  0001
 10-14 17:33:35.767: INFO/DEBUG(551):     bea2771c  41ed7072
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27720  4104be90
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27724  bea27770  [stack]
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27728  ad00e640  /system/
 lib/libdvm.so
 10-14 17:33:35.767: INFO/DEBUG(551):     bea2772c  ad00ed9c  /system/
 lib/libdvm.so
 10-14 17:33:35.767: INFO/DEBUG(551):     bea27730  ad084e1c
 10-14 17:33:35.777: INFO/DEBUG(551):     bea27734  41049200
 10-14 17:33:35.777: INFO/DEBUG(551):     bea27738  bea27770  [stack]
 10-14 17:33:35.777: INFO/DEBUG(551):     bea2773c  ad017d38  /system/
 lib/libdvm.so
 10-14 17:33:35.777: INFO/DEBUG(551):     bea27740  0330
 10-14 17:33:35.777: INFO/DEBUG(551):     bea27744  bea277f8  [stack]
 10-14 17:33:35.777: INFO/DEBUG(551):     bea27748  bc60  [heap]
 10-14 17:33:35.777: INFO/DEBUG(551):     bea2774c  4104bf04



 On Oct 14, 4:36 pm, allstars allstars@gmail.com wrote:
 hello
 my apps contains JNI library
 but sometimes when i launch it
 it will have SIGBUS error

 i use addr2line to check the stack trace

 the last stack in my native lib is to invoke a JNI call
 then it goes to libdvm

 my app doesnt register the native method tables on JNI_Onload
 it uses traditional JNI native method , i.e.
 Java_com_XX

 i would like to know why SIGBUS occurs occasionally

 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: Audio Stream from currently playing song

2009-10-14 Thread Marco Nelissen

No


On Tue, Oct 13, 2009 at 7:20 PM, joelt j...@harpsoft.com wrote:


 I can capture an audio stream from the mic, but can I capture the
 currently playing audio stream?

 Thanks,
 Joel
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] end application notification

2009-10-14 Thread ayanir

  Hello,

I have an application with several Activities.
I understand that the Android platform handle some sort of an Activity
Stack so there is the option to go back to the previous Activities in
the stack. I also know that there is no access to this Stack.
I would like to know if there is a way to check if all my application
Activities are finished (not in the Stack). in other words, if I'm in
my first Activity and press the Back key or alternatively call
Activity.finish(), I would like to get a notification that all my
Application Activities are finished so I can control my application
exit.

Thanks in advance,
ayanir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Should we still force our apps to API level 2?

2009-10-14 Thread gnugu

Greivin,

If you had conditional compile you would have to compile two versions
of your application anyway, wouldn't you? So your users would be
equally confused as if you maintained two versions of the code.

Maintaining two versions of the code isn't that confusing. In fact I
personally think conditional compile can mess your code much more than
having two source trees. Look up Subversion Book on the net. That's
where I learned about maintaining multiple source trees.

I think your best option is reflection. I think you missed the fine
point in EboMike's response. He said that the class is loaded only as
needed.
What I took from that is:
Make a wrapper class that will use either 1.5 or 1.6 version of API at
a time, but not both (avoid static variables...).
Once and only once when you start the application probe for the API
level and keep a global variable alive that will tell your wrapper
class which of the two API's to use. Reflection only happens once when
probing for API level. And may be Android will tell you API level
without reflection...

On Oct 14, 8:03 am, Greivin Lopez greivin.lo...@gmail.com wrote:
 Thanks to jotobjects and EboMike for their responses.

 I will try to describe my situation better: I have an application that
 send SMS messages by using SmsManager class. In the SDK 1.5 version of
 the application (I mean I set 1.5 as the Project Build Target)
 everything works fine because I use the SmsManager class located at:
 android.telephony.gsm.SmsManager which does only support GSM.

 When i try to create the SDK 1.6 version of it (Setting the Project
 Build Target as 1.6) it does not compile because the SmsManager class
 was moved to android.telephony.SmsManager (which is ok because it now
 supports CDMA). But then my codeshouldbe changed if I want to
 compile using the new SDK.

 ===
 My desired solution is: Use conditional compilation to mark my code to
 use one of the SmsManager classes depending on the SDK I choose as my
 project build target. Encapsulating this logic into my own SmsEngine
 class so everything in my code works smoothly and supporting 1.5-1.6
 firmware devices and also supporting CDMA in the devices that use
 1.6.  Without the need to change my code further than a simple
 conditional compilation.

 Problem: As EboMike says there is not such thing as conditional
 compilation in Java (because Java gurus claim there is not need to
 such a thing). I personally believe that in the fantasy world were
 nobody fails designing their APIS the though Nobody needs conditional
 compilation is valid. But nobody is perfect and all the APIs out
 there in every platforms contains design errors or changes in future
 designs that leads to the need to improve!.
 ===

 ===
 My current solution is: Keep my project build target as 1.5.
 Supporting 1.5 and 1.6 devices without any changes in my source code.

 Problem: My application does not support CDMA Sms messaging. I can't
 benefit from new improvements of performance or bug fixes for the new
 1.6 implementation of the SDK.
 ===

 ===
 Possible alternatives: Keep two releases of the application, one for
 1.5 and another one for 1.6 supporting CDMA.  Use reflection into a
 wrapper class to identify which of the firmware I am running allowing
 me to decide the implementation to use.

 Problem: Neither alternative convince me. Two releases can confuse my
 users. Reflection is too expensive in performance and also does not
 makes my code clear (It scrambles the source code a little).
 ===

 Until there is aren't 1.5 firmware device out there I suppose I
 couldn't resolve my problem.

 Thanks for your help everyone!.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can't use commands in command prompt.

2009-10-14 Thread Carl

I've copied the folder from the JDK and put it in the SDK. Nothing
changed.
Noticed another problem, it is telling me that i'm missing a SWT
folder. That i need to point ANDROID_SWT to the folder containing
swt.jar.
But i've looked in the android.bat and ANDROID_SWT is pointing to that
folder.

what now?

On 14 Okt, 00:20, Marco Nelissen marc...@android.com wrote:
 Well, given the error message you mentioned in your original post, the
 folder where java.exe is located would be good to have in your path.

 On Tue, Oct 13, 2009 at 3:15 PM, Carl cm.sandens...@gmail.com wrote:

  Could you maybe then tell me the relevant parts of the JDK? so that i
  can check if they are there.

  Thanks.

  On 14 Okt, 00:12, Marco Nelissen marc...@android.com wrote:
  Sorry, I meant 'JDK'.

  On Tue, Oct 13, 2009 at 3:11 PM, Marco Nelissen marc...@android.com 
  wrote:
   I don't think it matters as long as the relevant parts of the SDK are
   in your path.

   On Tue, Oct 13, 2009 at 1:48 PM, Carl cm.sandens...@gmail.com wrote:

   I have a JDK installed on C: but put the SDK on D:. Does it matter?

   On 13 Okt, 22:24, Marco Nelissen marc...@android.com wrote:
   Sounds like you didn't install a JDK, or it's not in your path.

   On Tue, Oct 13, 2009 at 12:49 PM, Carl cm.sandens...@gmail.com wrote:

Hi,

When i'm in the directory tools and try to use android create 
avd...
i get an error like  ' java is not recognizable as an internal or
external command, operable program or batch. 

What's wrong?

I'm using Windows 7 prof
Have added android to the system environment variables. (Maybe 
doesn't
change anything.)

Tanks

Carl
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can't use commands in command prompt.

2009-10-14 Thread Carl

I've copied the folder from the JDK and put it in the SDK. Nothing
changed.
Noticed another problem, it is telling me that i'm missing a SWT
folder. That i need to point ANDROID_SWT to the folder containing
swt.jar.
But i've looked in the android.bat and ANDROID_SWT is pointing to that
folder.

what now?

On 14 Okt, 00:20, Marco Nelissen marc...@android.com wrote:
 Well, given the error message you mentioned in your original post, the
 folder where java.exe is located would be good to have in your path.

 On Tue, Oct 13, 2009 at 3:15 PM, Carl cm.sandens...@gmail.com wrote:

  Could you maybe then tell me the relevant parts of the JDK? so that i
  can check if they are there.

  Thanks.

  On 14 Okt, 00:12, Marco Nelissen marc...@android.com wrote:
  Sorry, I meant 'JDK'.

  On Tue, Oct 13, 2009 at 3:11 PM, Marco Nelissen marc...@android.com 
  wrote:
   I don't think it matters as long as the relevant parts of the SDK are
   in your path.

   On Tue, Oct 13, 2009 at 1:48 PM, Carl cm.sandens...@gmail.com wrote:

   I have a JDK installed on C: but put the SDK on D:. Does it matter?

   On 13 Okt, 22:24, Marco Nelissen marc...@android.com wrote:
   Sounds like you didn't install a JDK, or it's not in your path.

   On Tue, Oct 13, 2009 at 12:49 PM, Carl cm.sandens...@gmail.com wrote:

Hi,

When i'm in the directory tools and try to use android create 
avd...
i get an error like  ' java is not recognizable as an internal or
external command, operable program or batch. 

What's wrong?

I'm using Windows 7 prof
Have added android to the system environment variables. (Maybe 
doesn't
change anything.)

Tanks

Carl
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can't use commands in command prompt.

2009-10-14 Thread Carl

I've copied the folder from the JDK and put it in the SDK. Nothing
changed.
Noticed another problem, it is telling me that i'm missing a SWT
folder. That i need to point ANDROID_SWT to the folder containing
swt.jar.
But i've looked in the android.bat and ANDROID_SWT is pointing to that
folder.

what now?

On 14 Okt, 00:20, Marco Nelissen marc...@android.com wrote:
 Well, given the error message you mentioned in your original post, the
 folder where java.exe is located would be good to have in your path.

 On Tue, Oct 13, 2009 at 3:15 PM, Carl cm.sandens...@gmail.com wrote:

  Could you maybe then tell me the relevant parts of the JDK? so that i
  can check if they are there.

  Thanks.

  On 14 Okt, 00:12, Marco Nelissen marc...@android.com wrote:
  Sorry, I meant 'JDK'.

  On Tue, Oct 13, 2009 at 3:11 PM, Marco Nelissen marc...@android.com 
  wrote:
   I don't think it matters as long as the relevant parts of the SDK are
   in your path.

   On Tue, Oct 13, 2009 at 1:48 PM, Carl cm.sandens...@gmail.com wrote:

   I have a JDK installed on C: but put the SDK on D:. Does it matter?

   On 13 Okt, 22:24, Marco Nelissen marc...@android.com wrote:
   Sounds like you didn't install a JDK, or it's not in your path.

   On Tue, Oct 13, 2009 at 12:49 PM, Carl cm.sandens...@gmail.com wrote:

Hi,

When i'm in the directory tools and try to use android create 
avd...
i get an error like  ' java is not recognizable as an internal or
external command, operable program or batch. 

What's wrong?

I'm using Windows 7 prof
Have added android to the system environment variables. (Maybe 
doesn't
change anything.)

Tanks

Carl
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can't use commands in command prompt.

2009-10-14 Thread Marco Nelissen

On Wed, Oct 14, 2009 at 9:09 AM, Carl cm.sandens...@gmail.com wrote:

 I've copied the folder from the JDK and put it in the SDK. Nothing
 changed.

Copying the folder is probably not the right thing to do, especially
if you didn't add the new folder to your path either (by 'path' I mean
the windows path environment variable, which IIRC you can view and
edit somewhere under the my computer right click menu)

 Noticed another problem, it is telling me that i'm missing a SWT
 folder. That i need to point ANDROID_SWT to the folder containing
 swt.jar.
 But i've looked in the android.bat and ANDROID_SWT is pointing to that
 folder.

 what now?

 On 14 Okt, 00:20, Marco Nelissen marc...@android.com wrote:
 Well, given the error message you mentioned in your original post, the
 folder where java.exe is located would be good to have in your path.

 On Tue, Oct 13, 2009 at 3:15 PM, Carl cm.sandens...@gmail.com wrote:

  Could you maybe then tell me the relevant parts of the JDK? so that i
  can check if they are there.

  Thanks.

  On 14 Okt, 00:12, Marco Nelissen marc...@android.com wrote:
  Sorry, I meant 'JDK'.

  On Tue, Oct 13, 2009 at 3:11 PM, Marco Nelissen marc...@android.com 
  wrote:
   I don't think it matters as long as the relevant parts of the SDK are
   in your path.

   On Tue, Oct 13, 2009 at 1:48 PM, Carl cm.sandens...@gmail.com wrote:

   I have a JDK installed on C: but put the SDK on D:. Does it matter?

   On 13 Okt, 22:24, Marco Nelissen marc...@android.com wrote:
   Sounds like you didn't install a JDK, or it's not in your path.

   On Tue, Oct 13, 2009 at 12:49 PM, Carl cm.sandens...@gmail.com 
   wrote:

Hi,

When i'm in the directory tools and try to use android create 
avd...
i get an error like  ' java is not recognizable as an internal or
external command, operable program or batch. 

What's wrong?

I'm using Windows 7 prof
Have added android to the system environment variables. (Maybe 
doesn't
change anything.)

Tanks

Carl
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 determine if phone supports video capture?

2009-10-14 Thread junker37

Well, I couldn't find an official way to do this. The only way I know
is to assume that all Android phones will support video capture, so if
the phone is running 1.5 (3) or greater, it will support video
capture.

android.os.Build.VERSION.SDK_INT

On Oct 12, 3:05 pm, junker37 junke...@gmail.com wrote:
 How can I determine if the phone my app is running on supports video
 capture?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Exception - can anyone make sense of this?

2009-10-14 Thread Neilz

Yes, well I've worked out the error is occurring when there is no
image. The value being passed to the cursor is an image contentUri
String. Some rows in the table may not have an image (purposely) and
return a blank String. It's these that are causing this error.

Problem is, I don't know if this is just an emulator thing, or if it's
going to happen on the device too. I can't catch that error as far as
I can tell, so how can I tell if it is happening on the real thing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Max app size

2009-10-14 Thread Dan Sherman
I've filed a bug about the issue, can be seen here:
http://code.google.com/p/android/issues/detail?id=4250

On Wed, Oct 14, 2009 at 1:21 AM, westmeadboy westmead...@yahoo.co.ukwrote:


 It would be nice if the Manifest could specify the ratio (default
 would be 4).

 On Oct 14, 12:17 pm, Lucas roll...@gmail.com wrote:
  Hello,
 
  Well finally i found what is happening. And it explains the issues i
  was having and also what you said.
 
  I decided to take a look at the OS installer process, and i found the
  code that explains it all.
 
  packageinstaller/PackageInstallerActiviity.java (line 293):
 
  //compute the size of the application. just an estimate
  long size;
  String apkPath = mPackageURI.getPath();
  File apkFile = new File(apkPath);
  //TODO? DEVISE BETTER HEAURISTIC
  size = 4*apkFile.length();
  checkOutOfSpace(size);
 
  As you can see the installer checks to have at least **4** times the
  size of the apk we want to install in order to let it go.
 
  I think is a bit to much, and Google engineers must look on improving
  this restriction to at least not more than 2,5 times apk size.
 
  regards,
 
  Lucas
 
  On Oct 9, 4:56 pm, Dan Sherman impact...@gmail.com wrote:
 
 
 
   I've had issues with the market installs as well (at least on 1.5),
 where a
   6mb apk required 24mb of free space to install...
 
   - Dan
 
   On Fri, Oct 9, 2009 at 3:50 PM, RichardC 
 richard.crit...@googlemail.comwrote:
 
I am running an application (CoPilot) on my HTC Magic that has
installed 197Mb on my SD card.  However its download size from the
Market is only 6.92Mb.  The rest of the data was post installed
 (maps)
that I downloaded via WiFi using the phone.  There is also an option
to download the maps to your PC and copy them to the SD card.
 
The point I am trying to make here is, I probably would not download
 a
large (10s of Mb) applcation from the Market because the apk file has
to go into the internal memory and this is a precious resource to me.
However putting large amounts of data on the SD card later is no
problem.
 
With your example of installing from an SD card, can you not leave
most of the data on the SD card and just install the application code
on the phone?
 
--
RichardC
 
On Oct 9, 8:11 pm, rollbak roll...@gmail.com wrote:
 Hello,
 
 Which is the max application size that can be installed in Android?
 
 I have made several tests in different Android handsets (Hero, G1,
 Motorola Motus, Samsung Behold 2), and using adb i was able of
 installing up to 100mb application in Hero and Motus, but trying to
 install by SD card or OTA i was limited to a maximum of 50mb (even
 if
 the devices have 200mb of free space).
 
 Does anyone know which are the restrictions here?
 
 Thanks,
 
 Lucas
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ion with tmobile web2go

2009-10-14 Thread eyeon

i have been searching for the right setting to make tmobile web3go
work , but none so far . can you 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] Setting up a proxy server for android emulator

2009-10-14 Thread Gath

Guys,

I want to start Android Emulator with internet support but am unable
to use the brower on the emulator, it seems like it is not connected.
This is the command am using to start the emulator

emulator -avd myavd -http-proxy http://168.192.10.1:3100

Please note am using an IPAddress instead of machine name on my proxy
server name. Is this possible with the emulator?

Or what am i doing wrong?

Am using Android SDK 1.6

Gath

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Socket.connect works on Wifi, fails on 3G (actually sort of the opposite...)

2009-10-14 Thread truthtrap

guys and girls,

i am trying to test the availability of a service with a socket. the
code is quite simple
try {
InetAddress address = InetAddress.getByName(dns);
s = new Socket();
try {
SocketAddress endpoint = new 
InetSocketAddress(address, port);
s.connect(endpoint, 1000);
s.close();

return true;
} catch (IOException e) {
return false;
}
} catch (UnknownHostException e) {
return false;
}

it works in the emulator and i thought everything was ok. but it does
not work on my device (ADP with 1.6.) actually it does work, but not
with 3G.

the socket.connect blocks when the device is in wifi mode, as
expected. but when on 3G it just continues, as if a connection has
been made.

(the tested case is port 80 on an amazon ec2 instance.)

can anyone either tell me why this happens so i can fix. or perhaps
there is an alternative to testing service connections for
availability.

thanks,
jurg.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 SDK 執行 Em ulator 有個錯誤訊息

2009-10-14 Thread 吉米栗
最近嘗試要將Android開發環境裝上,試圖學習手機程式的寫法
但是在裝Android SDK環境的時候卻發生 error 的訊息
對英文雖不是很熟析,我還是很努力的想找到這問題的解決方式
但是始終找不到
希望在這邊能有高手能協助幫忙,給予指點

我的環境
Windows XP
Android SDK 1.6.r1

(從網路上爬文學來)
以CMD命令提示字元模式
在Android的路徑下,進入Tools資料夾
並執行 android create -n gphone -t 2
問要步要客製化時輸入 [no]
接著輸入emulator -avd gphone

出現如下的兩行文字
emulator: error: had config: virtual device directory lacks config.ini
emulator: could not find virtual device named 'gphone'

問題是出在 config.ini 上? 但是它又在哪呢?
還是我少了什麼步驟?

可否請高手們高抬貴手一下
指引我完成使用的程序
感激不盡~

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Finding Preference of a different Screen

2009-10-14 Thread Praveen

I have a class called A which has a CheckBoxPreference chkbox1;
There is one more class B which is invoked by pressing a menu item
falling under class A.
Now, I want to use the CheckBoxPreference of class A in class B by
using findPreference(key);
If I use it this way, then the Preference returned from findPreference
() is NULL.
Please suggest a way to accomplish this task.

Rgds
Praveen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Automated unit testing on Android - stopping emulator from script + hanging whilst installing apk

2009-10-14 Thread MikeyB

Hi,

I'm looking into getting an automated build script running using
Android 1.6r1 SDK.

I've a couple of issues.
Once I've build I want to be able to install/re-install apks onto an
instance of the emulator in order to run our tests automatically.

I've a couple of issues;
1) Is there a way of killing the emulator from my build script - we're
using the emulator cmd to start the emulator, but is there an easy way
of killing the emulator once we've finished (alternatively can I
determnie if the emulator is active and start it if not).

Also I'm often seeing install of my apk files hang - is thsi a known
issue and is there a fix/workaround for this issie?

Thanks in advance

Mike B.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: some questions about IBinder.transact

2009-10-14 Thread Dianne Hackborn
It doesn't do anything.  It's for you to define the commands your interface
handles.  That is, the interface an IBinder is implementing determines the
codes it accepts.

On Wed, Oct 14, 2009 at 2:33 AM, tstanly tsai.sta...@gmail.com wrote:


 hi guys,

 I have some questions about IBinder.transact,
 in the:
 http://developer.android.com/intl/zh-TW/reference/android/os/IBinder.html
 the document about transact method,

 there are four parameters for transact are code, data, reply and
 flags,

 code is the action to perform.This should be a number between
 FIRST_CALL_TRANSACTION and LAST_CALL_TRANSACTION.
 but I can't understand what it means?
 eg: what is FIRST_CALL_TRANSACTION  do?

 thanks!!



 



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

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

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



[android-developers] Re: Getting paid apps for free ??

2009-10-14 Thread Dianne Hackborn
On Wed, Oct 14, 2009 at 6:19 AM, vorcigernix vorciger...@gmail.com wrote:

 there are around 50% of
 users which can't buy your software from google marketplace even if
 they want.


I'd be very interested in hearing where you get -that- number from.

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

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

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



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-14 Thread jotobjects

Also 1.6 introduces android:targetSdkVersion, which allows you to say
the
higher version of the platform you are designed for, while still
leaving
android:minSdkVersion to the minimum version you support.  This allows
you

Hi Greivin -

From looking at the 1.6 reference docs it appears that BOTH classes
exist in 1.6 (API level 4).

android.telephony.SmsManager
android.telephony.gsm.SmsManager

In that case you should (hopefully) be able to use Dianne's suggestion
of setting

android:targetSdkVersion=4
android:minSdkVersion=2

Then you have only one application built on Level 4 that uses
reflection to still work on Level 2.  Actually the targetSdkVersion=4
doesn't seem to be REQUIRED, but the documentation implies that your
app will be more efficient when run on Level 4 (SDK 1.6).

BTW - in this case the Deprecated classes are correctly designated in
the API docs for 1.6.

On Oct 14, 9:08 am, gnugu rho...@gmail.com wrote:
 Greivin,

 If you had conditional compile you would have to compile two versions
 of your application anyway, wouldn't you? So your users would be
 equally confused as if you maintained two versions of the code.

 Maintaining two versions of the code isn't that confusing. In fact I
 personally think conditional compile can mess your code much more than
 having two source trees. Look up Subversion Book on the net. That's
 where I learned about maintaining multiple source trees.

 I think your best option is reflection. I think you missed the fine
 point in EboMike's response. He said that the class is loaded only as
 needed.
 What I took from that is:
 Make a wrapper class that will use either 1.5 or 1.6 version of API at
 a time, but not both (avoid static variables...).
 Once and only once when you start the application probe for the API
 level and keep a global variable alive that will tell your wrapper
 class which of the two API's to use. Reflection only happens once when
 probing for API level. And may be Android will tell you API level
 without reflection...

 On Oct 14, 8:03 am, Greivin Lopez greivin.lo...@gmail.com wrote:

  Thanks to jotobjects and EboMike for their responses.

  I will try to describe my situation better: I have an application that
  send SMS messages by using SmsManager class. In the SDK 1.5 version of
  the application (I mean I set 1.5 as the Project Build Target)
  everything works fine because I use the SmsManager class located at:
  android.telephony.gsm.SmsManager which does only support GSM.

  When i try to create the SDK 1.6 version of it (Setting the Project
  Build Target as 1.6) it does not compile because the SmsManager class
  was moved to android.telephony.SmsManager (which is ok because it now
  supports CDMA). But then my codeshouldbe changed if I want to
  compile using the new SDK.

  ===
  My desired solution is: Use conditional compilation to mark my code to
  use one of the SmsManager classes depending on the SDK I choose as my
  project build target. Encapsulating this logic into my own SmsEngine
  class so everything in my code works smoothly and supporting 1.5-1.6
  firmware devices and also supporting CDMA in the devices that use
  1.6.  Without the need to change my code further than a simple
  conditional compilation.

  Problem: As EboMike says there is not such thing as conditional
  compilation in Java (because Java gurus claim there is not need to
  such a thing). I personally believe that in the fantasy world were
  nobody fails designing their APIS the though Nobody needs conditional
  compilation is valid. But nobody is perfect and all the APIs out
  there in every platforms contains design errors or changes in future
  designs that leads to the need to improve!.
  ===

  ===
  My current solution is: Keep my project build target as 1.5.
  Supporting 1.5 and 1.6 devices without any changes in my source code.

  Problem: My application does not support CDMA Sms messaging. I can't
  benefit from new improvements of performance or bug fixes for the new
  1.6 implementation of the SDK.
  ===

  ===
  Possible alternatives: Keep two releases of the application, one for
  1.5 and another one for 1.6 supporting CDMA.  Use reflection into a
  wrapper class to identify which of the firmware I am running allowing
  me to decide the implementation to use.

  Problem: Neither alternative convince me. Two releases can confuse my
  users. Reflection is too expensive in performance and also does not
  makes my code clear (It scrambles the source code a little).
  ===

  Until there is aren't 1.5 firmware device out there I suppose I
  couldn't resolve my problem.

  Thanks for your help everyone!.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups 

[android-developers] Re: Getting paid apps for free ??

2009-10-14 Thread Al Sutton

At AndAppStore we've recently introduced a pay-for app system which
lets apps confirm at runtime whether or not the user has purchased the
app. This means that even if the apk is spread around the internet and
installed on many devices your app can still either refuse to run or
enter a demo mode to try and get the user to buy a legitimate copy if
the user hasn't paid to use it.

When you list an app you can find a link to the purchase checking
system underneath the box where you can select Requires Payment as
the applications license type.

Al.

P.P.S. plugAnd we don't take any fees for pay-for apps, you only
have to pay PayPals fees :)/plug.

On Oct 14, 2:19 pm, vorcigernix vorciger...@gmail.com wrote:
 I think major source of these applications are torrents. But I have to
 second what String said, if you really want to sell you apps, you have
 to use AndAppStore and SlideME just because there are around 50% of
 users which can't buy your software from google marketplace even if
 they want. I think it is correct to blame google for poor marketplace,
 on other hand I really appriciate that you don't have to use google
 marketplace at all.

 On 14 říj, 13:48, WoodManEXP woodman...@gmail.com wrote:



  I keep reading posts about Chinese and other web sites that are
  offering the paid, copy protected apps for free.

  If this is indeed the case and there is not a reasonable remedy it
  definitely takes the wind out of our sails for investing further in
  creating applications for the Android platform.

  Some say that Google bears no responsibility in this situation, but I
  think they do need to step up in some fashion. After all Google has
  positioned the Marketplace as sole distribution point for the apps and
  take 30% for their services. But if what the Marketplace does is
  funnel copy protected apps into the free distribution channels then
  what is the point?

  Can anyone from Google respond to this situation?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can I capture an image in Android and have it show up in the gallery?

2009-10-14 Thread junker37

I was capturing images before that were showing up in the gallery, but
now they are not and I can't figure out why. Here is my code:

ContentValues values = new ContentValues();
values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE,
false);
String name = ugc_ + 
String.valueOf(System.currentTimeMillis());
values.put(android.provider.MediaStore.Images.Media.TITLE, 
name);
imageURI = getContentResolver().insert
(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
values);

I also tried:
values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, 
0);
as well as leaving out that value, but nothing seems to work now.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Should we still force our apps to API level 2?

2009-10-14 Thread gnugu

Can somebody explain what this means?

the platform should not perform any extra work to maintain forward-
compatibility with the target version.
Specifying this target version allows the platform to disable
compatibility settings

Is it install time or runtime? What exactly are compatibility
settings?

Thanks.

On Oct 14, 10:18 am, jotobjects jotobje...@gmail.com wrote:
 Also 1.6 introduces android:targetSdkVersion, which allows you to say
 the
 higher version of the platform you are designed for, while still
 leaving
 android:minSdkVersion to the minimum version you support.  This allows
 you

 Hi Greivin -

 From looking at the 1.6 reference docs it appears that BOTH classes
 exist in 1.6 (API level 4).

 android.telephony.SmsManager
 android.telephony.gsm.SmsManager

 In that case you should (hopefully) be able to use Dianne's suggestion
 of setting

 android:targetSdkVersion=4
 android:minSdkVersion=2

 Then you have only one application built on Level 4 that uses
 reflection to still work on Level 2.  Actually the targetSdkVersion=4
 doesn't seem to be REQUIRED, but the documentation implies that your
 app will be more efficient when run on Level 4 (SDK 1.6).

 BTW - in this case the Deprecated classes are correctly designated in
 the API docs for 1.6.

 On Oct 14, 9:08 am, gnugu rho...@gmail.com wrote:

  Greivin,

  If you had conditional compile you would have to compile two versions
  of your application anyway, wouldn't you? So your users would be
  equally confused as if you maintained two versions of the code.

  Maintaining two versions of the code isn't that confusing. In fact I
  personally think conditional compile can mess your code much more than
  having two source trees. Look up Subversion Book on the net. That's
  where I learned about maintaining multiple source trees.

  I think your best option is reflection. I think you missed the fine
  point in EboMike's response. He said that the class is loaded only as
  needed.
  What I took from that is:
  Make a wrapper class that will use either 1.5 or 1.6 version of API at
  a time, but not both (avoid static variables...).
  Once and only once when you start the application probe for the API
  level and keep a global variable alive that will tell your wrapper
  class which of the two API's to use. Reflection only happens once when
  probing for API level. And may be Android will tell you API level
  without reflection...

  On Oct 14, 8:03 am, Greivin Lopez greivin.lo...@gmail.com wrote:

   Thanks to jotobjects and EboMike for their responses.

   I will try to describe my situation better: I have an application that
   send SMS messages by using SmsManager class. In the SDK 1.5 version of
   the application (I mean I set 1.5 as the Project Build Target)
   everything works fine because I use the SmsManager class located at:
   android.telephony.gsm.SmsManager which does only support GSM.

   When i try to create the SDK 1.6 version of it (Setting the Project
   Build Target as 1.6) it does not compile because the SmsManager class
   was moved to android.telephony.SmsManager (which is ok because it now
   supports CDMA). But then my codeshouldbe changed if I want to
   compile using the new SDK.

   ===
   My desired solution is: Use conditional compilation to mark my code to
   use one of the SmsManager classes depending on the SDK I choose as my
   project build target. Encapsulating this logic into my own SmsEngine
   class so everything in my code works smoothly and supporting 1.5-1.6
   firmware devices and also supporting CDMA in the devices that use
   1.6.  Without the need to change my code further than a simple
   conditional compilation.

   Problem: As EboMike says there is not such thing as conditional
   compilation in Java (because Java gurus claim there is not need to
   such a thing). I personally believe that in the fantasy world were
   nobody fails designing their APIS the though Nobody needs conditional
   compilation is valid. But nobody is perfect and all the APIs out
   there in every platforms contains design errors or changes in future
   designs that leads to the need to improve!.
   ===

   ===
   My current solution is: Keep my project build target as 1.5.
   Supporting 1.5 and 1.6 devices without any changes in my source code.

   Problem: My application does not support CDMA Sms messaging. I can't
   benefit from new improvements of performance or bug fixes for the new
   1.6 implementation of the SDK.
   ===

   ===
   Possible alternatives: Keep two releases of the application, one for
   1.5 and another one for 1.6 supporting CDMA.  Use reflection into a
   wrapper class to identify which of the firmware I am running allowing
   me to decide the implementation to use.

   Problem: Neither alternative convince me. Two 

[android-developers] Re: Countries for selling priced applications in Android Market

2009-10-14 Thread karthikr

I have developed a few applications and am waiting for releasing them.

Its like everyday i login and search the blogs and mail someone
regarding the status or the probable date of launching the same in
India.

I am getting fed up with numerous mails to google checkout and android
market support, No positive replies, no tentative datesnothing.

I am getting demotivated to a large extent. Why cant someone from
google atlease post a reply on the tentative dates.

We can atleast take decisions based on that right.

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



[android-developers] Re: Max app size

2009-10-14 Thread Marco Nelissen

That doesn't make sense. The ratio follows from how the system
installs apps, so it would be silly to allow apps to override it.



On Tue, Oct 13, 2009 at 10:21 PM, westmeadboy westmead...@yahoo.co.uk wrote:

 It would be nice if the Manifest could specify the ratio (default
 would be 4).

 On Oct 14, 12:17 pm, Lucas roll...@gmail.com wrote:
 Hello,

 Well finally i found what is happening. And it explains the issues i
 was having and also what you said.

 I decided to take a look at the OS installer process, and i found the
 code that explains it all.

 packageinstaller/PackageInstallerActiviity.java (line 293):

         //compute the size of the application. just an estimate
         long size;
         String apkPath = mPackageURI.getPath();
         File apkFile = new File(apkPath);
         //TODO? DEVISE BETTER HEAURISTIC
         size = 4*apkFile.length();
         checkOutOfSpace(size);

 As you can see the installer checks to have at least **4** times the
 size of the apk we want to install in order to let it go.

 I think is a bit to much, and Google engineers must look on improving
 this restriction to at least not more than 2,5 times apk size.

 regards,

 Lucas

 On Oct 9, 4:56 pm, Dan Sherman impact...@gmail.com wrote:



  I've had issues with the market installs as well (at least on 1.5), where a
  6mb apk required 24mb of free space to install...

  - Dan

  On Fri, Oct 9, 2009 at 3:50 PM, RichardC 
  richard.crit...@googlemail.comwrote:

   I am running an application (CoPilot) on my HTC Magic that has
   installed 197Mb on my SD card.  However its download size from the
   Market is only 6.92Mb.  The rest of the data was post installed (maps)
   that I downloaded via WiFi using the phone.  There is also an option
   to download the maps to your PC and copy them to the SD card.

   The point I am trying to make here is, I probably would not download a
   large (10s of Mb) applcation from the Market because the apk file has
   to go into the internal memory and this is a precious resource to me.
   However putting large amounts of data on the SD card later is no
   problem.

   With your example of installing from an SD card, can you not leave
   most of the data on the SD card and just install the application code
   on the phone?

   --
   RichardC

   On Oct 9, 8:11 pm, rollbak roll...@gmail.com wrote:
Hello,

Which is the max application size that can be installed in Android?

I have made several tests in different Android handsets (Hero, G1,
Motorola Motus, Samsung Behold 2), and using adb i was able of
installing up to 100mb application in Hero and Motus, but trying to
install by SD card or OTA i was limited to a maximum of 50mb (even if
the devices have 200mb of free space).

Does anyone know which are the restrictions here?

Thanks,

Lucas
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Piracy protection idea

2009-10-14 Thread WoodManEXP

I am no security expert and have not thought this out all the way, but
could a workable solution to the pirating problem be something like
this:


1. The market clients (like Google Market, AndAppStore, SlideME) could
record on their servers some kind of identifier about who bought the
app and perhaps what Android device it was bought for. They already
capture the who information.

2. Android apps that care can, on first launch, ask the user about
their identifier and what service they bought the app from.

3. The app, or the servers that support the app, can query, via http,
the market client service to ask did so-and-so get this app from you?

4. If an affirmative response can be had then the app is not pirated.
Otherwise the app is pirated

Google Market, AndAppStore, SlideME, etc… will need to make such a
service available, via http.

It would be straight-forward to generate a list of installed market
clients for the user to select from. The market clients may even be
able to supply the user identification so user does not need to enter
it.

The application could retrieve from its servers the list of market
clients is believes are legitimate in order to prevent the bogus
clients from spoofing it.

If you installed an app w/out a market client and the app did not
intend for such an installation to happen, like on rooted phones using
adb, then the app is pirated.

And finally, could this process be invisible to the user and just
involve communication between the app and installed market clients and
the market clients servers and the apps servers?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Countries for selling priced applications in Android Market

2009-10-14 Thread Mark Murphy

karthikr wrote:
 I have developed a few applications and am waiting for releasing them.

Why wait? Android Market is not the only distribution channel. By
waiting, all you do is lose the opportunity to gain feedback from early
adopters that you can use to improve your application by the time the
Android Market is available in your jurisdiction.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Piracy protection idea

2009-10-14 Thread Dan Sherman
Unfortunately has a few problems:

1) The user has to have an internet connection on first load of the app.

2) If its via HTTP or some other well documented protocol, could easily have
a hosts entry re-point where to ask for confirmation to a server that just
responds OK.  This could be overcome possibly with a pub/priv key system
of signing.

3) Should still be possible to get a copy of the apk, and remove the code
block for that check I imagine...

You're going to have a problem with piracy no matter what you do.  Look at
_every_ platform, and every form of copy protection, they all have piracy.
The only exception to this that I can see is hosted services (like World of
Warcraft, and websites), where all of the user data is stored some place
that you have control over, and can check for validity on your side, with
known-good code at run-time.  Any time you put code/logic on a client side,
it can be subverted one way or another...

- Dan

On Wed, Oct 14, 2009 at 1:38 PM, WoodManEXP woodman...@gmail.com wrote:


 I am no security expert and have not thought this out all the way, but
 could a workable solution to the pirating problem be something like
 this:


 1. The market clients (like Google Market, AndAppStore, SlideME) could
 record on their servers some kind of identifier about who bought the
 app and perhaps what Android device it was bought for. They already
 capture the who information.

 2. Android apps that care can, on first launch, ask the user about
 their identifier and what service they bought the app from.

 3. The app, or the servers that support the app, can query, via http,
 the market client service to ask did so-and-so get this app from you?

 4. If an affirmative response can be had then the app is not pirated.
 Otherwise the app is pirated

 Google Market, AndAppStore, SlideME, etc… will need to make such a
 service available, via http.

 It would be straight-forward to generate a list of installed market
 clients for the user to select from. The market clients may even be
 able to supply the user identification so user does not need to enter
 it.

 The application could retrieve from its servers the list of market
 clients is believes are legitimate in order to prevent the bogus
 clients from spoofing it.

 If you installed an app w/out a market client and the app did not
 intend for such an installation to happen, like on rooted phones using
 adb, then the app is pirated.

 And finally, could this process be invisible to the user and just
 involve communication between the app and installed market clients and
 the market clients servers and the apps servers?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Piracy protection idea

2009-10-14 Thread Wayne Wenthin
I would be happy if Keys were generated.   My app already has a backend that
is queried quite often.  I have a registration flag and know the androidID
of every device.  If I could generate a key and confirm that key is valid
for that device then I could just flip the bit and you have a registered
app.
I'm not sure the onus for confirming registration should be on the app
stores but a Key generation function would be nice.

On Wed, Oct 14, 2009 at 10:38 AM, WoodManEXP woodman...@gmail.com wrote:


 I am no security expert and have not thought this out all the way, but
 could a workable solution to the pirating problem be something like
 this:


 1. The market clients (like Google Market, AndAppStore, SlideME) could
 record on their servers some kind of identifier about who bought the
 app and perhaps what Android device it was bought for. They already
 capture the who information.

 2. Android apps that care can, on first launch, ask the user about
 their identifier and what service they bought the app from.

 3. The app, or the servers that support the app, can query, via http,
 the market client service to ask did so-and-so get this app from you?

 4. If an affirmative response can be had then the app is not pirated.
 Otherwise the app is pirated

 Google Market, AndAppStore, SlideME, etc… will need to make such a
 service available, via http.

 It would be straight-forward to generate a list of installed market
 clients for the user to select from. The market clients may even be
 able to supply the user identification so user does not need to enter
 it.

 The application could retrieve from its servers the list of market
 clients is believes are legitimate in order to prevent the bogus
 clients from spoofing it.

 If you installed an app w/out a market client and the app did not
 intend for such an installation to happen, like on rooted phones using
 adb, then the app is pirated.

 And finally, could this process be invisible to the user and just
 involve communication between the app and installed market clients and
 the market clients servers and the apps servers?

 



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

http://www.fuligin.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: Error Code 5: Database is locked

2009-10-14 Thread mathias axelsson
I use
synchronized(ExampleDbAdapter.class){mDb.insert/update/delete/query...} in
ExampleDbAdapter to avoid this. Let me know if there's a better way.

On Mon, Aug 24, 2009 at 10:58 AM, Armond Avanes armond...@yahoo.com wrote:


 So how can I create an in-memory database? I just took a quick look at the
 API and couldn't find any.

 Cheersss,
 Armond

  develop...@googlegroups.com] On Behalf Of Andrei
  Sent: Monday, August 24, 2009 7:35 AM
 
  If your write time take long i would try this
  I would create another in memory database, attach it to yours.
  In memory database table would have same schema.
  You would write to in memory database and after done do insert into
  db1.table as select * from db2.table
  I did something similar but on desktop not phone and of course you
  need to wait for lock to clear
 
  On Aug 23, 2:31 am, Armond Avanes armond...@yahoo.com wrote:
   I forgot to mention that this exception happens (so far) from the
  service I
   have for updating database (is executed every 24 hours).
  
   Cheersss,
   Armond
  
Hi Guys,
  
I have different background threads in my application, one doing
periodical
database updates, another responsible for doing long searches and so.
Obviously some are just reading from database while others are
 writing
  as
well.
  
Once in a while I get database is locked exception. I need to know
  the
safe way of reading/writing from/to database on different threads.
  
As well I've found isDbLockedByCurrentThread() and
isDbLockedByOtherThreads() methods on SQLiteDatabase. Should I use
  them
every time I want to access the database? What if the database is
  locked?
Should I pause the current thread and retry a few milliseconds later?
  
Best Regards,
Armond
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): Caused by:
android.database.sqlite.SQLiteException: error code 5: database is
  locked
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
android.database.sqlite.SQLiteStatement.native_execute(Native Method)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
   
  android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:66)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
   
  android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1534)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
com.test.db.TestDao.update (TestDao.java:327)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
com.test.UpdateService.onStart(UpdateService.java:35)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): at
   
 android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2557)
  
08-23 10:17:32.029 E/AndroidRuntime( 1331): . 10 more
 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 install android market?

2009-10-14 Thread EboMike

Boy, do we like to make assumptions or what?

luggie - You are right, your best bet is to contact Google
(unfortunately, I have no idea who your best point of contact would
be). They can give you all the details about licensing Google apps.

-Mike


On Oct 14, 8:14 am, Disconnect dc.disconn...@gmail.com wrote:
 Supposedly its free. Supposedly the barrier to entry isn't very high.
 But nobody outside google really knows anything more than that - if
 you say its probably expensive hackbod will yell at you to prove it,
 then wander away without answering any questions.

 2009/10/14 luggie lug...@gmail.com:



  Mike,thank you very much!
  If we want to install Android Market on our product(mobile phone)  ,
  must We contact Google?

  On 10月14日, 上午9时01分, EboMike ebom...@gmail.com wrote:
  luggie, it's closed source. It's not freely available. If you have a
  phone that came with it, you're good to go. If not, then there is no
  legal way to get it.

  For the purpose of getting apps, there are other applications
  available (like Al Sutton's AndAppStore).

  -Mike

  On Oct 13, 5:56 pm, luggie lug...@gmail.com wrote:

   I want to install Android Market in my mobile device(android),how can
   I do?
   thanks!

   On 10月14日, 上午7时00分, EboMike ebom...@gmail.com wrote:

It's a closed-source application and not freely distributed. You may
not install it on an emulator.

(That's actually good, the potential for abuse is quite high.)

On Oct 13, 6:00 am, luggie lug...@gmail.com wrote:

 in emulator

 On 10月13日, 下午8时40分, luggie lug...@gmail.com wrote:

  hi,everyone!
  How to install android market?

  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] strategies for low memory conditions

2009-10-14 Thread Jason Proctor

my app has a main activity with a list in it which then launches 
activities on it in response to pokes at the list. each list item has 
two Bitmaps associated with it, one small and one potentially large 
(~1mb). pokes at the graphic flip which Bitmap gets shown.

after the user pokes too many and i get an OOM exception, i flip the 
views back to the small version, recycle() big bitmaps, retry, etc. 
also i recycle() when the views get put in the recycle bin, when the 
activity gets paused, all that.

i'm trying to be good here. but i'm seeing situations where even 
though all of this has happened, and in theory all the big bitmaps 
are recycle()d etc, the app is still out of memory and can't do 
anything.

are there subtleties to the bitmap.recycle() strategy as a way of 
handling low memory situations?

thanks
-- 
jason.vp.engineering.particle

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Including Other Projects

2009-10-14 Thread benjamin.grant.du

Hi all,
i've downloaded a project that was designed for sdk 1.0, and I think
the reason I can't get it to work is because of the differences in sdk
1.0 and 1.5. Specifically, I import the proejct and when I try to
build it complains that project jjil and project jjil-android are not
included. However, they are present under the main project in a folder
called build. What must i do to fix this problem?
Ben
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: State of a phonecall

2009-10-14 Thread Roman ( T-Mobile USA)

I feel your pain . The only way to be more precised in reflecting
call states is to look in the framework/platform code and expose this
information to the higher level (framework code changed needed :-( )

The Android Telephony on SDK level has no concept of a Call or
Connection as other existing TAPI implementations which makes it very
difficult to write a good Telephony application on SDK level 

I hope things are changing in the future

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 13, 11:42 pm, SGAdrian sven.wastl...@gmail.com wrote:
 Hi,

 I can see that we can get a phonestate via the PhoneStateListener,

     /**
      * The phone state. One of the following:p
      * ul
      * liIDLE = no phone activity/li
      * liRINGING = a phone call is ringing or call waiting.
      *  In the latter case, another call is active as well/li
      * liOFFHOOK = The phone is off hook. At least one call
      * exists that is dialing, active or holding and no calls are
      * ringing or waiting./li
      * /ul
      */
     enum State {
         IDLE, RINGING, OFFHOOK;
     };

 but there is no way of telling the state of the call. OFFHOOK is a
 number of states combined into one.

 Is there a particular reason for this? Are we not allowed to see the
 correct state of a call?

 BR,
 SGAdrian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 install android market?

2009-10-14 Thread Disconnect

What assumptions? I reported what I was told (you can't prove it
costs money - ok so its free? - and  you just have to pass some
basic tests - so barrier to entry is low) and actual events (hackbod
yelled at me and failed to answer questions).

There is a little more info out there in the carrot-and-stick post
(we use market to force oems to bend to our will) but it doesn't
affect the above..

2009/10/14 EboMike ebom...@gmail.com:

 Boy, do we like to make assumptions or what?

 luggie - You are right, your best bet is to contact Google
 (unfortunately, I have no idea who your best point of contact would
 be). They can give you all the details about licensing Google apps.

 -Mike


 On Oct 14, 8:14 am, Disconnect dc.disconn...@gmail.com wrote:
 Supposedly its free. Supposedly the barrier to entry isn't very high.
 But nobody outside google really knows anything more than that - if
 you say its probably expensive hackbod will yell at you to prove it,
 then wander away without answering any questions.

 2009/10/14 luggie lug...@gmail.com:



  Mike,thank you very much!
  If we want to install Android Market on our product(mobile phone)  ,
  must We contact Google?

  On 10月14日, 上午9时01分, EboMike ebom...@gmail.com wrote:
  luggie, it's closed source. It's not freely available. If you have a
  phone that came with it, you're good to go. If not, then there is no
  legal way to get it.

  For the purpose of getting apps, there are other applications
  available (like Al Sutton's AndAppStore).

  -Mike

  On Oct 13, 5:56 pm, luggie lug...@gmail.com wrote:

   I want to install Android Market in my mobile device(android),how can
   I do?
   thanks!

   On 10月14日, 上午7时00分, EboMike ebom...@gmail.com wrote:

It's a closed-source application and not freely distributed. You may
not install it on an emulator.

(That's actually good, the potential for abuse is quite high.)

On Oct 13, 6:00 am, luggie lug...@gmail.com wrote:

 in emulator

 On 10月13日, 下午8时40分, luggie lug...@gmail.com wrote:

  hi,everyone!
  How to install android market?

  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: Socket.connect works on Wifi, fails on 3G (actually sort of the opposite...)

2009-10-14 Thread Roman ( T-Mobile USA)

You might want to take a tcpdump to check what traffic you receive on
the 3g interface.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 14, 1:30 am, truthtrap jurgvanvl...@gmail.com wrote:
 guys and girls,

 i am trying to test the availability of a service with a socket. the
 code is quite simple
                 try {
                         InetAddress address = InetAddress.getByName(dns);
                         s = new Socket();
                         try {
                                 SocketAddress endpoint = new 
 InetSocketAddress(address, port);
                                 s.connect(endpoint, 1000);
                                 s.close();

                                 return true;
                         } catch (IOException e) {
                                 return false;
                         }
                 } catch (UnknownHostException e) {
                         return false;
                 }

 it works in the emulator and i thought everything was ok. but it does
 not work on my device (ADP with 1.6.) actually it does work, but not
 with 3G.

 the socket.connect blocks when the device is in wifi mode, as
 expected. but when on 3G it just continues, as if a connection has
 been made.

 (the tested case is port 80 on an amazon ec2 instance.)

 can anyone either tell me why this happens so i can fix. or perhaps
 there is an alternative to testing service connections for
 availability.

 thanks,
 jurg.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Finding Preference of a different Screen

2009-10-14 Thread Yusuf Saib (T-Mobile USA)

android.content.SharedPreferences?



Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Oct 14, 5:15 am, Praveen praveen.suna...@gmail.com wrote:
 I have a class called A which has a CheckBoxPreference chkbox1;
 There is one more class B which is invoked by pressing a menu item
 falling under class A.
 Now, I want to use the CheckBoxPreference of class A in class B by
 using findPreference(key);
 If I use it this way, then the Preference returned from findPreference
 () is NULL.
 Please suggest a way to accomplish this task.

 Rgds
 Praveen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Piracy protection idea

2009-10-14 Thread Al Sutton

That's the scheme we've already implemented at AndAppStore with a
slight twist to make it harder to generate spoof responses using a DNS
repoint.

Al.

On Oct 14, 6:38 pm, WoodManEXP woodman...@gmail.com wrote:
 I am no security expert and have not thought this out all the way, but
 could a workable solution to the pirating problem be something like
 this:

 1. The market clients (like Google Market, AndAppStore, SlideME) could
 record on their servers some kind of identifier about who bought the
 app and perhaps what Android device it was bought for. They already
 capture the who information.

 2. Android apps that care can, on first launch, ask the user about
 their identifier and what service they bought the app from.

 3. The app, or the servers that support the app, can query, via http,
 the market client service to ask did so-and-so get this app from you?

 4. If an affirmative response can be had then the app is not pirated.
 Otherwise the app is pirated

 Google Market, AndAppStore, SlideME, etc… will need to make such a
 service available, via http.

 It would be straight-forward to generate a list of installed market
 clients for the user to select from. The market clients may even be
 able to supply the user identification so user does not need to enter
 it.

 The application could retrieve from its servers the list of market
 clients is believes are legitimate in order to prevent the bogus
 clients from spoofing it.

 If you installed an app w/out a market client and the app did not
 intend for such an installation to happen, like on rooted phones using
 adb, then the app is pirated.

 And finally, could this process be invisible to the user and just
 involve communication between the app and installed market clients and
 the market clients servers and the apps servers?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can't re-install radio update

2009-10-14 Thread Ryck

I successfully installed version 1.6 but was having trouble connecting
my wifi.  I did a factory reset and tried to re-install the ota-
radio-2_22_19_26i.zip.  After copying it to update.zip on the sd card
and booting it would begin the install process.  Verified ok.  Install
started but then I got the installation aborted message.  Tried
several times with no luck.  I tried the recovery image process update
and it seemed to work.

Questions:

Did the abort occur because the radio update was already done?

Did I actually update the recovery image if the radio update failed?

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



[android-developers] Re: I get the unable to start wifi

2009-10-14 Thread Ryck

Doing the factory reset fixed my problem.  But now I still can't
connect to WPA Enterprise.  Will try to re-istall 1.6.

Thanks for your help.

On Oct 12, 1:17 pm, mehool mehoo...@gmail.com wrote:
 Hey,

 I had the similar problem and was able to get it working by doing the
 default factory setting

 good luck

 On Oct 9, 12:08 pm, Ryck rhei...@gmail.com wrote:



  I have just installed Donut version 1.6 on my HTC Dream. The install
  went smoothly. But when I try tostartmyWiFiI get the unabletostartwifi 
  message. Never had a problem in 1.5.

  The log reports:

  D/SettingsWifiEnabler( 303): Receivedwifistate changed from Unknown
  to Enabling
  E/WifiHW ( 74): Cannot access /data/misc/wifi/wpa_supplicant.conf:
  Permission denied
  E/WifiHW ( 74): Wi-Fi will not be enabled
  E/vold ( 47):Unableto lookup media '/devices/platform/msm_sdcc.1/
  mmc_host/mmc0/mmc0:0001'
  E/vold ( 47): Error processing uevent msg (No such file or directory)
  E/WifiService( 74): Failed tostartsupplicant daemon.
  D/SettingsWifiEnabler( 303): Receivedwifistate changed from Enabling
  to Unknown
  D/dalvikvm( 303): GC freed 4090 objects / 272600 bytes in 118ms
  I/ActivityManager( 74): Starting activity: Intent
  { act=android.intent.action.

  I see wpa_supplicant doesn't have access to others, I tried changing
  the permissions of the directories and wpa_supplicant.conf file to 777
  but they keep getting set back again so that other doesn't have
  access.

  Do I need to set up a special user?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: DVM instance creation - A new process creation at runtime

2009-10-14 Thread fadden

On Oct 13, 11:38 pm, Ash ashutoshkagra...@gmail.com wrote:
 Can I launch an installed android application at runtime from another
 android application?? Whats the way for doing this??

Use the intent mechanism.  See e.g.:

  http://developer.android.com/guide/topics/fundamentals.html#actcomp
  http://developer.android.com/guide/topics/intents/intents-filters.html

Runtime.exec() should only be used for external commands.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can't use commands in command prompt.

2009-10-14 Thread Carl

Thanks, i was a bit off there. It is working now.

Regards

Carl Magnus

On 14 Okt, 18:23, Marco Nelissen marc...@android.com wrote:
 On Wed, Oct 14, 2009 at 9:09 AM, Carl cm.sandens...@gmail.com wrote:

  I've copied the folder from the JDK and put it in the SDK. Nothing
  changed.

 Copying the folder is probably not the right thing to do, especially
 if you didn't add the new folder to your path either (by 'path' I mean
 the windows path environment variable, which IIRC you can view and
 edit somewhere under the my computer right click menu)

  Noticed another problem, it is telling me that i'm missing a SWT
  folder. That i need to point ANDROID_SWT to the folder containing
  swt.jar.
  But i've looked in the android.bat and ANDROID_SWT is pointing to that
  folder.

  what now?

  On 14 Okt, 00:20, Marco Nelissen marc...@android.com wrote:
  Well, given the error message you mentioned in your original post, the
  folder where java.exe is located would be good to have in your path.

  On Tue, Oct 13, 2009 at 3:15 PM, Carl cm.sandens...@gmail.com wrote:

   Could you maybe then tell me the relevant parts of the JDK? so that i
   can check if they are there.

   Thanks.

   On 14 Okt, 00:12, Marco Nelissen marc...@android.com wrote:
   Sorry, I meant 'JDK'.

   On Tue, Oct 13, 2009 at 3:11 PM, Marco Nelissen marc...@android.com 
   wrote:
I don't think it matters as long as the relevant parts of the SDK are
in your path.

On Tue, Oct 13, 2009 at 1:48 PM, Carl cm.sandens...@gmail.com wrote:

I have a JDK installed on C: but put the SDK on D:. Does it matter?

On 13 Okt, 22:24, Marco Nelissen marc...@android.com wrote:
Sounds like you didn't install a JDK, or it's not in your path.

On Tue, Oct 13, 2009 at 12:49 PM, Carl cm.sandens...@gmail.com 
wrote:

 Hi,

 When i'm in the directory tools and try to use android create 
 avd...
 i get an error like  ' java is not recognizable as an internal or
 externalcommand, operable program or batch. 

 What's wrong?

 I'm using Windows 7 prof
 Have added android to the system environment variables. (Maybe 
 doesn't
 change anything.)

 Tanks

 Carl
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ADB shell exiting abnormally

2009-10-14 Thread fadden

On Oct 13, 10:12 am, Keith Preston keith...@gmail.com wrote:
 If I start a shell on Device 1, then on Device 2 start a shell and
 type reboot.   Device 2 resets like expected, but the shell on device
 1 will exit.

I tried it just now on my setup, and didn't have a disconnect on
device 1, but what I'm running is probably much different from what
you're running.

You're using the 1.6 SDK?  Does this happen reliably, every time?
What Linux distro/version do you have?  Are you plugged directly into
the computer or into a hub?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] BOOT_COMPLETED not being received by my application since 1.6

2009-10-14 Thread Richard Schilling

I upgraded my phone to 1.6 and the BOOT_COMPLETED event isn't being
sent to my application anymore.

There's nothing in the release notes related to changes in this
intent.

Can anyone enlighten me as to what needs to change in my application
for 1.6 so I can get this event.

This is a critical fix for a production application.

Thanks!

Richard Schilling
Mobile Operating Systems Engineer
Root Wireless

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



[android-developers] Re: Android 1.6 SDK is here!

2009-10-14 Thread Richard Schilling

Well, here's some specific feedback on a very serious issue that seems
to have come up:

http://groups.google.com/group/android-developers/browse_thread/thread/c1f4450138843e5a

BOOT_COMPLETED is not being sent to my 1.6 application - worked just
fine in 1.5.

Help.

Richard Schilling
Mobile Operating Systems Engineer
Root Wireless


On Sep 15, 5:02 pm, Raphael r...@android.com wrote:
 Thanks for the feedback. Could you be more explicit on which API are
 not properly documented?

 If possible, please file it as a bug onhttp://b.android.comso that
 they can be properly documented in a future SDK.

 R/

 On Tue, Sep 15, 2009 at 4:58 PM, Don Tran arro...@gmail.com wrote:

  The documentation and javadocs are really lacking in information
  regarding the new APIs.  I am hoping the SDK got rushed out for
  developers to view and the information will be filled in later.  Right
  now I have no idea how to use any of the new classes.

  On Sep 15, 3:35 pm, Jason D. Clinton m...@jasonclinton.com wrote:
  On Sep 15, 5:22 pm, Xavier Ducrohet x...@android.com wrote:

  http://android-developers.blogspot.com/2009/09/android-16-sdk-is-here...

  Thank you. Where is the ADP1 image?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Headset pluged intent not firing

2009-10-14 Thread Richard Thompson
Hi there,

I've been working on an application to detect when the headset is plugged
in.  My application can successfully receive broadcast intents such as
airplane mode but when I plug my headphones in nothing happens with my app.
If I triger the headset plugged intent in another app then my application
runs correctly.  My phone is also aware of the headset being plugged and
unplugged in 99.% of the time.

Does anybody have any ideas.  Are there any permissions I'm missing? How
would I go about debugging the problem?

Thanks for the 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] Re: Getting paid apps for free ??

2009-10-14 Thread vorcigernix

Yes, it was estimate. It is actually 35-40% if this chart is to be
believed: 
http://metrics.admob.com/wp-content/uploads/2009/07/admob-mobile-metrics-june-09.pdf
Anyway...

On Oct 14, 7:16 pm, Dianne Hackborn hack...@android.com wrote:
 On Wed, Oct 14, 2009 at 6:19 AM, vorcigernix vorciger...@gmail.com wrote:
  there are around 50% of
  users which can't buy your software from google marketplace even if
  they want.

 I'd be very interested in hearing where you get -that- number from.

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-14 Thread Greivin Lopez

jotobjects I'm going to try what you suggest. It seems more like what
I'm looking for. And also let you know what was the result. Thanks.

With conditional compilation I refer of something more like an
attribute that let you tell the compiler to either use one method or
another.

I would like to use something like:

@Conditional(SDK: 4)
public void SmsMethod() {
  // Uses android.telephony.gsm.SmsManager
}

@Conditional(SDK: 3)
public void SmsMethod() {
  // Uses android.telephony.SmsManager
}

So I could easyly accomplish all of my goals with a very elegant and
clear solution and without any compilation errors. Of course there
isn't any attribute like that. But I would like to have one. Maybe in
the future we could have something like that 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] Re: Application could not be installed on this phone?

2009-10-14 Thread Richard Schilling

Had a request from someone to elaborate on what I did to fix this.
This issue started showing up when I started building with the 1.6
SDK.

When I signed the application with a new certificate, the problem went
away.  Here's what I did:

1. created a new certificate using the instructions on this web page:
http://developer.android.com/guide/publishing/app-signing.html
2. Exported the signed package using Eclipse: Right Click Project -
Export Signed Application Package - follow dialog boxes.

Also, make sure the phone is upgraded.

If you're still having issues after doing this, then either my fix
isn't the right one, or there's another problem.

Hope that helps.

Richard


On Oct 12, 11:38 am, Richard Schilling
richard.rootwirel...@gmail.com wrote:
 Oh, the android should be upgrading the old application properly, so
 uninstalling should not be necessary.  This is an upgrade.

 Richard

 On Oct 12, 11:37 am, Richard Schilling

 richard.rootwirel...@gmail.com wrote:
  The issue seems to be with the certificate used to sign the
  application.  It works now.

  What I would like to do is submit a patch that provides more verbose
  information about why an install fails (e.g. certificate is invalid).

  Looking into PackageInstaller to see what I can find.

  Richard

  On Oct 12, 10:57 am, nEx.Software email.nex.softw...@gmail.com
  wrote:

   Obvious question alert: Did you remove any old version you might have
   had hadinstalledbefore trying to install the new one?

   On Oct 12, 10:28 am, Richard Schilling

   richard.rootwirel...@gmail.com wrote:
I am seeing this now too.  Just upgraded thephoneto 1.6.  DDMS
doesn't tell me squat.

Anyone?

Richard Schilling
Mobile Operating System Engineer
Root Wireless, Inc.

On Aug 14, 8:32 pm, dougx douglas.lin...@gmail.com wrote:

 I just rebuilt an application to use some new assets, and now I get
 this message on myphonewhen I try to install it:

 Applicationnotinstalled
 UnitTestscouldnotbeinstalledon thisphone

 Anyone know what's going on?

 I've checked and I've definitely got Unknown sources ticked on the
 application settings.

 This is just a self signed application to run my unit tests on an
 actualphone(the emulator doesn't cut it for real testing). I tried
 creating a new keystore, and they didn't help.

 What on earth?

 The only thing I can think of that I've done recently is accept a
 google security update... _
 If they've silently done some other updates that prevent self signed
 applications running, I'm severely upset.

 Anyone seen this?

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



[android-developers] Re: Should we still force our apps to API level 2?

2009-10-14 Thread Mark Murphy

Greivin Lopez wrote:
 jotobjects I'm going to try what you suggest. It seems more like what
 I'm looking for. And also let you know what was the result. Thanks.
 
 With conditional compilation I refer of something more like an
 attribute that let you tell the compiler to either use one method or
 another.
 
 I would like to use something like:
 
 @Conditional(SDK: 4)
 public void SmsMethod() {
   // Uses android.telephony.gsm.SmsManager
 }
 
 @Conditional(SDK: 3)
 public void SmsMethod() {
   // Uses android.telephony.SmsManager
 }
 
 So I could easyly accomplish all of my goals with a very elegant and
 clear solution and without any compilation errors. Of course there
 isn't any attribute like that. But I would like to have one. Maybe in
 the future we could have something like that in Android.

So, write yourself a script to handle your proposed @Conditional tag,
perhaps using XDoclet:

http://xdoclet.sourceforge.net/xdoclet/index.html

Or, use JavaPP:

http://www.slashdev.ca/javapp/

Based on the trackback, it looks like Fred Grott might already be using
JavaPP for Android development.

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

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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >