[android-developers] Application works after reboot the phone

2010-07-25 Thread mike
hi guys,

i have found out a strange behavior. My application works only after
phone reboots. after rebooting the phone first time application works
fine. from there onwards it's not working.

any ideas??

regards,
Mike

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


Re: [android-developers] Re: Scanning a Text File In Android

2010-07-25 Thread anil kukreti
Ya Thanks

I 'm right now googling for parsing regex in java. Then I will implement the
same on Android. By parsing a text file and later image file,  I mean if
theres' any phone no in file ,, the android application can call it.



On Sun, Jul 25, 2010 at 10:49 AM, Maps.Huge.Info (Maps API Guru) 
cor...@gmail.com wrote:

 Maybe he means java.util.regex

 I suggest Googling that.

 -John Coryat

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




-- 
Thanks for Cooperating!
 Anil Kukreti

Network transforms ideas to reality.
09312646623
Linked In : http://in.linkedin.com/in/anilkukreti
Blog : http://androidosbeginning.blogspot.com/
Skype Id : anil.kleward

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

Re: [android-developers] Device Seeding Program for Top Android Market Developers

2010-07-25 Thread Webnet Android
Lol :) Looks like regular spam / hoax - top developerwith just 5k downloads 
and 3,5 (and note this half) rating? Sure :) Not to mention such offer would 
make no much sense. But it seem to always work - you just won . and 
people get so excited they stop thinking reasonably. Oh and there's 
registration site too? Cool -what's the URL? :) 

Anyway, mail headers will tell you more on where this mail is really originated 
from. You can even try to compare (sort of) with recent mail on Market rules 
change which was genuine.

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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

2010-07-25 Thread Maps.Huge.Info (Maps API Guru)
This program was real and many developers received either a Droid or
Nexus One. I got a Droid from this. Came in very handy. The cut-off
date was March, 31st, so it's well over.

-John Coryat

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


[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
Thanks a lot. You saved me from doing an ugly filth :-) .
I didn't expect that the number with a + was suitable to be
interpreted as a number.

Thanks again, Federico

On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:
 Did you put quotes around the string?  If SQLite sees an un-quoted
 string it's going to interpret it as numeric if possible.  SQLite
 ignores the data type of columns.

 On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

  I spent a lot of time on this.

  I was trying to store an incoming call number in sqlite. I'm in Italy,
  so the number was something like +39123123.

  What happened was that after putting and removing it from sqlite as a
  string , the leading + was gone.

  In the table creation the record is a string.
  I call ContentValues.put(String, String) and then I get the value from
  the cursor using getString().

  Moreover; I tried to put something before the +, like aa+39123123,
  the query returns the expected value. I suspect that for some reason
  sqlite converts the String to a number, and when returns it back the +
  is not given back.

  What I think I am going to do (even if I am disgusted) is to add
  something to the string and remove it later.

  Anyway, does anybody has an explanation??
  Many thanks in advance,

  Federico

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

2010-07-25 Thread Bob Kerns
Your problem statement is too vague to be useful. I don't mean so much
useful to us, as useful to you.

You really need to be a great deal more specific about what you want
to sense. The term electromagnetic radiation covers a range from
signals with wavelengths many orders of magnitude larger than your
handheld, to ones with wavelengths many orders of magnitude smaller.

And intensities vary from ones capable of vaporizing your handheld, to
ones where you'd need a special isolation chamber and a good supply of
liquid helium to be able to detect.

And then finally -- with this be modulated, pure, mixed? Are you
interested in determining the spectrum, the total energy flux,
direction? Do you seek to resolve multiple signals?

Hopefully, you'll just need one of the simpler combinations of the
above factors, and can focus your efforts on that. Many smartphones
come with a light detector, or a camera, which can be used for a
certain range of electromagnetic radiation.

If you're looking for powerline-frequency energy, or a similar range,
consider a small tuned resonant coil, hooked to an A-D pin on an
Arduino controller with a wifi or bluetooth interface.

Microwave frequencies will require a whole other set of techniques and
skills -- resonant chambers, etc. Infrared, UV -- the camera might
work - try it and see.

Narrow it down and your situation gets a whole lot simpler.

On Jul 24, 11:14 am, Jaan jahnavi.athul...@gmail.com wrote:
 Hi ,

 i am  a student who is very new to Android platform. I am working on a
 project which has to sense the EMR (Electro magnetic radiation )
 signals and notify the intensity of the EMR signals on the Android
 phone.

 1. Are there any available external EMR sensor devices which can be
 connected to the Android smartphones  to get the intensity of EMR ?

 2.   Or is it feasible to develop/implement  a sensor app on Android.
 TO do so, the ANdroid phone should consist of a built-in Sensor. ( I
 am not sure how this is going to work).

 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: Android market rules are changed, you must accept it within 30 days but...

2010-07-25 Thread Zsolt Vasvari
Since the non compete clause doesn't seem to exempt non-paid
countries, I'd say it's disallowed.

What I would do is not to accept the agreement until the last possible
moment and see where you stand by that time.  Perhaps Google has
something up its sleeve.

On Jul 25, 8:35 am, William Ferguson william.ferguson...@gmail.com
wrote:
 So where does this leave those of us who are outside the half dozen
 countries that can't *sell* apps on the market?

 I had hoped to provide a free crippled version on the market, and
 provide a paid unlock key from another site.
 Is my crippled app allowed or disallowed under the market rules?

 On Jul 25, 4:19 am, Pent tas...@dinglisch.net wrote:



   So,I'm not authorized to put on the market a FREE trial version,
   and ask customers who want the full version to buy it on my official
   site?

  3.3 ...Such free trials for Products are encouraged. However, if you
  want to collect fees after the free trial expires, you must collect
  all fees for the full version of the Product through the Payment
  Processor on the Market

  Seems quite clear.

  Pent- Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: Build performance of 2.2 vs older sdk implementations

2010-07-25 Thread Zsolt Vasvari
Yes!!!

Somebody with the same problem as me.  Since I upgraded to SDK 2.2
Update 1, the resource file compilation is taking forever.

Xavier suggested that I turn on Verbose in the Android build option,
which I did.  I can see the build process pause for a very long time
when writing the .re_ file.  I copied the command line and executed it
in outside of Eclipse.  The same thing is happening: a very long pause
after all the .xml resources are compiled.

On Jul 25, 5:39 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I have been building all my apps against the 1.6 version of the SDK
 until just recently when I switched to 2.2.  I use ant to handle my
 builds and a normal build time for one of my apps was about 30
 seconds.  Now that I am building with 2.2 (that is the only change) it
 is taking over a minute to do the exact same thing...  I was just
 wondering if anyone else was seeing a significant increase in the time
 it takes to build with 2.2.

 When I make incremental changes to code in eclipse I am now noticing a
 Building workspace: (xx%)  which takes a VERY long time in 2.2
 compared to 1.6.  I hardly every used to notice this because it was so
 fast.  Now I notice it all the time.

 I really hope that as we see additional sdk version come out that
 things just get slower and slower...  also, I had read that with 2.2
 we would see significant increases in performance on our existing
 hardware (devices).  I'm definitely not.

 Mark

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

2010-07-25 Thread Zsolt Vasvari
I am not sure if that's true.  I need to add android:paddingRight=?
android:attr/scrollbarSize, otherwise the scrollbar overlays the view
for me.

On Jul 25, 5:07 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I am using android:fadeScrollbars=true to show the scrollbar only
 while scrolling.  Works great.  The only issue I seem to be having is
 that the view still allocates the space on the right side to display
 the scrollbar when I do scroll.  I really wish this worked like iPhone
 where the scrollbar appeared over the top of the rest of the view and
 still allowed the view to use all available space when not actually
 scrolling.

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

2010-07-25 Thread EnnaN
For anyone interested: The problem is there on a 1.5 G1, but not on a
2.1 Milestone/Droid. It might be the handset or the OS version, which
i don't know.

The basics of the problem as far as I can see, is that the preview is
returned in 2:3 (320:480), and the picture will be in 3:4 (1536x2048).
Using a scaling-factor I can at least predict _how_ the picture will
change.
On the milestone/droid the numbers for the preview are 480:640, which
is also 3/4, so the scaling issue is non-existent.

I tried setting the preview to something 3:4, but as the allowed
preview sizes are limited, and I can't get them with the API lvl 5
memberfunction, I didn't get very far (and haven't tried that much).

On Jul 18, 3:33 pm, EnnaN nhui...@gmail.com wrote:
 I could really use some help on this. I have not provided any code, as
 I'm hoping it is something more abstract, like limitations on the
 preview size vs. what the camera sees. But for what it's worth:

 XML:
 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
         android:orientation=vertical android:layout_width=fill_parent
         android:layout_height=fill_parent

         my.Package.mySurfaceView
                 android:id=@+id/myView android:layout_width=wrap_content
                 android:layout_height=wrap_content /
 /LinearLayout

 the surfaceview is almost equal to the camerePreview.java code from
 the examples: the 1.5 version, not the 2.0 version with the
 getOptimalPreviewSize code.

 I can't seem to put my finger on why there is more information in the
 shot then i see in the preview :(

 On Jul 16, 9:01 pm, EnnaN nhui...@gmail.com wrote:

  I am hoping that there is something predictable i'm doing wrong, but i
  seem to have more info on picture then on the preview.

  Situation:
  I have an app basically based on the CameraPreview code. (1.5!)
  When I take a picture, the resulting image has more content then i saw
  on the preview.
  To clarify:
  Say i'm looking at something with lines, and while looking at the
  preview i see line 4 to 10. After taking the picture it suddenly is
  clear i've shot lines 5 to 11. I'm trying to sync something I draw
  ontop of the view (a line-drawing) with what i'm photographing, and I
  can't get it to match like this.

  The newest example has some extra code involving
  getSupportedPreviewSizes. I  can't use this because of the API
  version: I'm coding for min. 3, and that one is from 5.

  How can I make sure that what i see on the preview is also what i see
  on the picture?



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


[android-developers] Need guidance in making the game's logic supporting multiple screens.

2010-07-25 Thread Kakyoin
Hi.

I've read the article Supporting Multiple Screen on Android
developers site. But that doesn't apply to game logic.

Let me get straight to the point. My situation is as follows:

- I'm creating a game using LunarLander code as a base.

- In my game, there'll be an object flying up from the bottom of the
screen. The object will fly in projectile motion.

- I set the starting velocity, gravity and angle so that the highest
point(of projectile motion) is almost at the top of the screen.

- The screen tested is Motorola Milestone. (480x854 resolution)
Meaning the object travels around 854 pixels vertically.

--- Problem ---
When I test the game on small device (Android Dev Phone 1/G1) which is
320x480.(has only 480 pixels vertical)  The object fly out of the
screen because it is set to travel for 854 pixels.

I'm thinking of adjusting starting velocity based on screensizes. But
that sounds unreliable when we've so many devices/resolutions out
there.

How do you combat these kind of problem when making games?

Thank you in advance!

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


[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
Just to add more information to anybody who is interested in this
topic, it is necessary to remove the quotes if you need the original
data.

On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
 Thanks a lot. You saved me from doing an ugly filth :-) .
 I didn't expect that the number with a + was suitable to be
 interpreted as a number.

 Thanks again, Federico

 On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

  Did you put quotes around the string?  If SQLite sees an un-quoted
  string it's going to interpret it as numeric if possible.  SQLite
  ignores the data type of columns.

  On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

   I spent a lot of time on this.

   I was trying to store an incoming call number in sqlite. I'm in Italy,
   so the number was something like +39123123.

   What happened was that after putting and removing it from sqlite as a
   string , the leading + was gone.

   In the table creation the record is a string.
   I call ContentValues.put(String, String) and then I get the value from
   the cursor using getString().

   Moreover; I tried to put something before the +, like aa+39123123,
   the query returns the expected value. I suspect that for some reason
   sqlite converts the String to a number, and when returns it back the +
   is not given back.

   What I think I am going to do (even if I am disgusted) is to add
   something to the string and remove it later.

   Anyway, does anybody has an explanation??
   Many thanks in advance,

   Federico

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


Re: [android-developers] Need guidance in making the game's logic supporting multiple screens.

2010-07-25 Thread Jyoti singh
Hi Haim,

please look into the below problem .I think you have some solution for this
problem.

Thanks,
Jyoti

On Sun, Jul 25, 2010 at 1:28 PM, Kakyoin lgmc...@gmail.com wrote:

 Hi.

 I've read the article Supporting Multiple Screen on Android
 developers site. But that doesn't apply to game logic.

 Let me get straight to the point. My situation is as follows:

 - I'm creating a game using LunarLander code as a base.

 - In my game, there'll be an object flying up from the bottom of the
 screen. The object will fly in projectile motion.

 - I set the starting velocity, gravity and angle so that the highest
 point(of projectile motion) is almost at the top of the screen.

 - The screen tested is Motorola Milestone. (480x854 resolution)
 Meaning the object travels around 854 pixels vertically.

 --- Problem ---
 When I test the game on small device (Android Dev Phone 1/G1) which is
 320x480.(has only 480 pixels vertical)  The object fly out of the
 screen because it is set to travel for 854 pixels.

 I'm thinking of adjusting starting velocity based on screensizes. But
 that sounds unreliable when we've so many devices/resolutions out
 there.

 How do you combat these kind of problem when making games?

 Thank you in advance!

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

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

2010-07-25 Thread Eelco
What about this: http://www.phonegap.com/

PhoneGap is an open source development framework for building cross-
platform mobile apps. Build apps in HTML and JavaScript and still take
advantage of core features in iPhone/iTouch, iPad, Google Android,
Palm, Symbian and Blackberry SDKs.

Anybody experience with 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] runQueryOnBackgroundThread on cursoradapter doesn't get called?

2010-07-25 Thread Zvi
Hi All,

I have a listactivity as a startup screen in my application. Which is
displaying database records using custom cursor adapter. On create I
set the filterable flag - getListView().setTextFilterEnabled(true)

My cursoradapter overrides runQueryOnBackgroundThread which runs
corresponding query. The problem is that after typing some text and
hitting enter, runQueryOnBackgroundThread never gets called. However,
when the item click in the same view launches another activity(detail
view of the record) and I come back to the original list activity,
hitting back button, then text filtering works just fine.
I don't call setTextFilterEnabled anywhere except during the
initialization process and I can't really find any other API affecting
this behavior, so any guesses why text filtering doesn't work
initially, but all of the sudden starts working when I come back to
the list activity from child activity?

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


[android-developers] Re: Need guidance in making the game's logic supporting multiple screens.

2010-07-25 Thread RichardC
Have a look at Canvas.scale() you can use this to setup a virtual
drawing space that is independant of the phystal device.

Lots of discussions in this group if you search on canvas scale

On Jul 25, 9:25 am, Jyoti singh androidwithjy...@gmail.com wrote:
 Hi Haim,

 please look into the below problem .I think you have some solution for this
 problem.

 Thanks,
 Jyoti

 On Sun, Jul 25, 2010 at 1:28 PM, Kakyoin lgmc...@gmail.com wrote:
  Hi.

  I've read the article Supporting Multiple Screen on Android
  developers site. But that doesn't apply to game logic.

  Let me get straight to the point. My situation is as follows:

  - I'm creating a game using LunarLander code as a base.

  - In my game, there'll be an object flying up from the bottom of the
  screen. The object will fly in projectile motion.

  - I set the starting velocity, gravity and angle so that the highest
  point(of projectile motion) is almost at the top of the screen.

  - The screen tested is Motorola Milestone. (480x854 resolution)
  Meaning the object travels around 854 pixels vertically.

  --- Problem ---
  When I test the game on small device (Android Dev Phone 1/G1) which is
  320x480.(has only 480 pixels vertical)  The object fly out of the
  screen because it is set to travel for 854 pixels.

  I'm thinking of adjusting starting velocity based on screensizes. But
  that sounds unreliable when we've so many devices/resolutions out
  there.

  How do you combat these kind of problem when making games?

  Thank you in advance!

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

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


Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread YuviDroid
What do you mean by remove the quotes?
I store phone numbers on db and it works fine without dealing with adding
quotes, then removing them.
When I add/update stuff I use:

contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);

and when retrieving:
String phoneNumber =
cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));

Uhm...maybe I misunderstood the whole problem here..:S:S


Tra l'altro ciaoo!! ;)
Yuvi



On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli fedep...@gmail.comwrote:

 Just to add more information to anybody who is interested in this
 topic, it is necessary to remove the quotes if you need the original
 data.

 On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
  Thanks a lot. You saved me from doing an ugly filth :-) .
  I didn't expect that the number with a + was suitable to be
  interpreted as a number.
 
  Thanks again, Federico
 
  On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:
 
   Did you put quotes around the string?  If SQLite sees an un-quoted
   string it's going to interpret it as numeric if possible.  SQLite
   ignores the data type of columns.
 
   On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:
 
I spent a lot of time on this.
 
I was trying to store an incoming call number in sqlite. I'm in
 Italy,
so the number was something like +39123123.
 
What happened was that after putting and removing it from sqlite as a
string , the leading + was gone.
 
In the table creation the record is a string.
I call ContentValues.put(String, String) and then I get the value
 from
the cursor using getString().
 
Moreover; I tried to put something before the +, like
 aa+39123123,
the query returns the expected value. I suspect that for some reason
sqlite converts the String to a number, and when returns it back the
 +
is not given back.
 
What I think I am going to do (even if I am disgusted) is to add
something to the string and remove it later.
 
Anyway, does anybody has an explanation??
Many thanks in advance,
 
Federico

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




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

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

[android-developers] Re: Android to iPhone

2010-07-25 Thread Joseph Earl
Or Appcelerator.
But non-of these is replacement yet for coding in the relevant
platform language if you want access to all the features.

On Jul 25, 9:25 am, Eelco eelcoaart...@gmail.com wrote:
 What about this:http://www.phonegap.com/

 PhoneGap is an open source development framework for building cross-
 platform mobile apps. Build apps in HTML and JavaScript and still take
 advantage of core features in iPhone/iTouch, iPad, Google Android,
 Palm, Symbian and Blackberry SDKs.

 Anybody experience with it?

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


[android-developers] Re: Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-25 Thread Joseph Earl
Hi John, thanks for the info, but essentially what I was hoping to
have was

1) Files on SD card NOT deleted during upgrade (they are independent
of the app version)
2) Files on SD card ARE deleted during final uninstall

However they get deleted in both those scenarios which is not useful
to me, as I cannot ask the user to re-download ~200MB of files again
if I need to release an upgrade to fix a bug or something.

On Jul 25, 3:10 am, john john4...@gmail.com wrote:
 If you're using API Level 8 or greater, use getExternalFilesDir(null)
 to save a File.

 It will be deleted when you upgrade to a newer version.

 On 7月25日, 上午3時57分, Dianne Hackborn hack...@android.com wrote:

  Ergh...  that may be a bug. :(  To be clear, when doing the update your
  internal data is not being erased, but the data on the SD card is?

  On Sat, Jul 24, 2010 at 10:11 AM, Joseph Earl 
  joseph.w.e...@gmail.comwrote:

   I have an application which resides on the phone memory but downloads
   large data to the SD card on first launch (the app needs to be able to
   work without an internet connection most of the time)

   When using the recommend directory given in Froyo it seems all files
   on the SD card are deleted when I install a newer version of the .apk.
   I'd preferably like the files removed on uninstall, but not on upgrade
   since the files on the SD card aren't going to change between
   application versions, and forcing the user to re-download a large file
   that is independent of the application version does not seem
   reasonable.

   At the moment it seems I'm forced to use a different directory to the
   recommended one in order to stop Froyo deleting all the files when the
   application is upgraded.

   Am I doing something wrong, or is this how it is supposed to work (I'm
   guessing it is)? (Or perhaps I misunderstood what getExternalFilesDir
   is for)

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

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

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

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


[android-developers] Re: Application works after reboot the phone

2010-07-25 Thread Joseph Earl
Do you have any errors in Logcat / DDMS when your application fails to
launch?

On Jul 25, 7:18 am, mike hasitharand...@gmail.com wrote:
 hi guys,

 i have found out a strange behavior. My application works only after
 phone reboots. after rebooting the phone first time application works
 fine. from there onwards it's not working.

 any ideas??

 regards,
 Mike

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


[android-developers] Component-wise program on android market?

2010-07-25 Thread nemo
Dear all:

Could developer upload 'component'/SDK  to android market?
Now it seems only have 2 type: 'application' and 'Game'.

I just wonder if android market has the mechanism for developers to
upload component-wise programs which can be used in others's
application.
Then developers may get benefit from earch others.

Or Is android provide a easy way to invok and communicate with other
application from one application?

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

2010-07-25 Thread greg
You may be interested in watching the Cross-Compiling Android
Applications to the iPhone video at

   http://www.youtube.com/watch?v=TG-NIt2O5J8

As Mr. Coryat suggests in this thread, the iOS terms are a bit of a
legal sticky wicket for this type of cross-compilation.  Technically
however, according to the video, the cross-compiler seems to work
admirably well on game applications.

- greg

On Jul 25, 6:02 am, Joseph Earl joseph.w.e...@gmail.com wrote:
 Or Appcelerator.
 But non-of these is replacement yet for coding in the relevant
 platform language if you want access to all the features.

 On Jul 25, 9:25 am, Eelco eelcoaart...@gmail.com wrote:

  What about this:http://www.phonegap.com/

  PhoneGap is an open source development framework for building cross-
  platform mobile apps. Build apps in HTML and JavaScript and still take
  advantage of core features in iPhone/iTouch, iPad, Google Android,
  Palm, Symbian and Blackberry SDKs.

  Anybody experience with 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] Component-wise program on android market?

2010-07-25 Thread nemo
Dear all:

Could developer upload 'component'/SDK  to android market?
Now it seems only have 2 type: 'application' and 'Game'.

I just wonder if android market has the mechanism for developers to
upload component-wise programs which can be used in others's
application.
Then developers may get benefit from earch others.

Or Is android provide a easy way to invok and communicate with other
application from one application?

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

2010-07-25 Thread Mystique
Hi,

I have a main screen with buttons to launch other subactivities.
I have to press back button each time to go back to the main screen of
my application.
How do I finish a child activity and automatically return from the
caller?

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: Application works after reboot the phone

2010-07-25 Thread mike
hi Joseph,

i'm getting a security exception regarding the permissions regarding
the download manager or like that. any way the permission is not
listed in the manifest file. so after researching i found you need to
have android.permission.ACCOUNT_MANAGER in the manifest. don't know
whether thats the correct thing. but after that also i had the issue.

is this has something to do with application cache. even i tried to
clear application cache like this

public void clearCache() {
File dir = context.getCacheDir();
Log.d(CACHE,
Cached 
CLEAREDDD);
if (dir != null  dir.isDirectory()) {
deleteDir(dir);
}
}

public boolean deleteDir(File dir) {
if (dir != null  dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i  children.length; i++) {
boolean success = deleteDir(new File(dir, 
children[i]));
if (!success) {
Log
.d(CACHE,
Cached 
CLEAREDDD);
return false;
}
}
}
// The directory is now empty so delete it
return dir.delete();
}

that also didn't work.

so what do you think,
regards,
Mike

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


[android-developers] Re: Application works after reboot the phone

2010-07-25 Thread mike
Hi Joseph,

this is the security exception i'm getting

android.permission.ACCESS_DOWNLOAD_MANAGER
regards,
Mike

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


[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread DanH
If you store the phone number as a pure numeric, it will be stored and
retrieved that way, no problem.

If you store a number as 555-1212, I **think** SQLite will choke on
the - in the middle while doing numeric conversion and store it as
character data.

If you store a number as -123245, SQLite will store that as a negative
integer.

But if you store a number as +12345, SQLite will store it as a
positive integer and the + will be missing on retrieval.

Whether you need to strip the quotes from the retrieved value depends,
I suspect, on how you retrieve the value.  If you retrieve the full
query result string and parse that the quotes will be there, but I
**think** there are ways to return individual column results in Java
(getting my Java and C++ mixed up here, so a little foggy), such that
the stripped value is returned as the appropriate String or int.

On Jul 25, 4:30 am, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?
 I store phone numbers on db and it works fine without dealing with adding
 quotes, then removing them.
 When I add/update stuff I use:

 contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);

 and when retrieving:
 String phoneNumber =
 cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));

 Uhm...maybe I misunderstood the whole problem here..:S:S

 Tra l'altro ciaoo!! ;)
 Yuvi

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli 
 fedep...@gmail.comwrote:



  Just to add more information to anybody who is interested in this
  topic, it is necessary to remove the quotes if you need the original
  data.

  On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
   Thanks a lot. You saved me from doing an ugly filth :-) .
   I didn't expect that the number with a + was suitable to be
   interpreted as a number.

   Thanks again, Federico

   On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

Did you put quotes around the string?  If SQLite sees an un-quoted
string it's going to interpret it as numeric if possible.  SQLite
ignores the data type of columns.

On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

 I spent a lot of time on this.

 I was trying to store an incoming call number in sqlite. I'm in
  Italy,
 so the number was something like +39123123.

 What happened was that after putting and removing it from sqlite as a
 string , the leading + was gone.

 In the table creation the record is a string.
 I call ContentValues.put(String, String) and then I get the value
  from
 the cursor using getString().

 Moreover; I tried to put something before the +, like
  aa+39123123,
 the query returns the expected value. I suspect that for some reason
 sqlite converts the String to a number, and when returns it back the
  +
 is not given back.

 What I think I am going to do (even if I am disgusted) is to add
 something to the string and remove it later.

 Anyway, does anybody has an explanation??
 Many thanks in advance,

 Federico

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

 --
 YuviDroid
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
 quickly access your favorite apps and contacts!)http://android.yuvalsharon.net

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


[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread DanH
Yeah, AbstractCursor.getString() should return the stripped string
value, if the appropriate quotes were used going in.

On Jul 25, 4:30 am, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?
 I store phone numbers on db and it works fine without dealing with adding
 quotes, then removing them.
 When I add/update stuff I use:

 contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);

 and when retrieving:
 String phoneNumber =
 cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));

 Uhm...maybe I misunderstood the whole problem here..:S:S

 Tra l'altro ciaoo!! ;)
 Yuvi

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli 
 fedep...@gmail.comwrote:



  Just to add more information to anybody who is interested in this
  topic, it is necessary to remove the quotes if you need the original
  data.

  On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
   Thanks a lot. You saved me from doing an ugly filth :-) .
   I didn't expect that the number with a + was suitable to be
   interpreted as a number.

   Thanks again, Federico

   On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

Did you put quotes around the string?  If SQLite sees an un-quoted
string it's going to interpret it as numeric if possible.  SQLite
ignores the data type of columns.

On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

 I spent a lot of time on this.

 I was trying to store an incoming call number in sqlite. I'm in
  Italy,
 so the number was something like +39123123.

 What happened was that after putting and removing it from sqlite as a
 string , the leading + was gone.

 In the table creation the record is a string.
 I call ContentValues.put(String, String) and then I get the value
  from
 the cursor using getString().

 Moreover; I tried to put something before the +, like
  aa+39123123,
 the query returns the expected value. I suspect that for some reason
 sqlite converts the String to a number, and when returns it back the
  +
 is not given back.

 What I think I am going to do (even if I am disgusted) is to add
 something to the string and remove it later.

 Anyway, does anybody has an explanation??
 Many thanks in advance,

 Federico

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

 --
 YuviDroid
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
 quickly access your favorite apps and contacts!)http://android.yuvalsharon.net

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


[android-developers] Re: OutOfMemoryError with Bitmap

2010-07-25 Thread DanH
Yeah, but why bother reading the doc?  ;)

On Jul 24, 11:30 pm, Streets Of Boston flyingdutc...@gmail.com
wrote:
 Set BitmapFactory.Options.inSampleSize to a value larger than 1
 (preferably to a power of 2).
 BTW: This info about decoding is all in the online java-doc... :)

 On Jul 24, 11:14 pm, Agus agus.sant...@gmail.com wrote:

  Is it possible to scale the outputted bitmap while decoding the stream
  in one step?
  I don't go with a two-step process.

  On Sat, Jul 24, 2010 at 8:02 PM, DanH danhi...@ieee.org wrote:
   inJustDecodeBounds in BitmapFactory.Options.

   On Jul 24, 9:37 pm, Agus agus.sant...@gmail.com wrote:
   Sorry for going slightly off-topic, how do I determine the dimension
   of the picked gallery image without reading it first using
   DecodeBitmap.decodeStream(InputStream) method ?
   I am decoding the original image which causes OutOfMemory error 
   frequently.

   On Sat, Jul 24, 2010 at 3:47 PM, DanH danhi...@ieee.org wrote:
Yeah, I was assuming that the space for the bitmap is allocated in
Java heap, without thinking that many phones allocate graphics
separately. Obviously, if the bitmap is allocated outside of the Java
heap then freeMemory() does you zero good.  But my point was that
freeMemory() only returns the amount of heap not allocated to objects
at the moment.  If there is heap allocated to dead objects (that
would be collected by a GC) then that space is considered allocated,
from the standpoint of freeMemory().  And, of course, there's no way
to know how much dead heap storage there is without actually running
GC.

So whether or not the bitmap is allocated in Java heap, freeMemory()
is not real useful, at least not without actually running a (full) GC
cycle first.

On Jul 24, 5:20 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
First a small correction on DanH's reply, ARGB_ uses 32 bits (4
bytes), not 64 bits.

The memory used by a Bitmap is roughly Width*Height*Depth bytes. (e.g.
a 1MPixel image in RGB_565 uses 2MByte of memory). I say roughly,
because the Bitmap object itself, holding the raw data, occupies a few
bytes itself.

The problem is that the (garbage collector of) DalvikVM does not 'see'
the raw image data. It only sees the the memory usage of the Bitmap
object without the raw data (a few bytes). That's why the call to
'freeMemory()' does not seem correct. It only reports the difference
between the max available memory minus the memory used by Java objects
(which does not include raw image data).

However, the raw image data does affect the memory usage of your app's
Linux process, which is limited to either 16MByte or 24MByte.

E.g. if your app's free memory is 1.5MByte and you create a 2MByte
Bitmap, the DalvikVM does not see the need to run the garbage
collector to free up old un-referenced objects, because to DalvikVM it
looks like it only needs to create a few bytes for the Bitmap object
itself and does not see the danger of a possible out-of-memory
situation.

In my image-editing app, i try to mitigate this (not quite solve it),
by calling a System.gc() just before creating a (relatively) large
Bitmap. This reduces the chance of an out-of-memory error.

On Jul 24, 2:03 pm, ReyLith jesus...@gmail.com wrote:

 First of all thank you very much everyone for your help.

 I continue with a problem. I use Runtime.getRuntime().freeMemory() 
 for
 obtain the free memory and compare it with the real Bitmap memory.
 Sometimes I get a free memory less than that occupied by the image.
 However, if I remove the restriction on the size of the image, I can
 work with it without any problem. Am I using an incorrect function 
 to
 get the free memory?. Should I use another function?

 Thank you very much in advance.

 On 23 jul, 20:40, DanH danhi...@ieee.org wrote:

  Close as I can tell, you use a BitmapFactory.Options and put a
  BitmapConfig constant in that that specifies the type of internal
  representation you want.  If you use ARGB_ then each pixel 
  will be
  64 bits.  ARGB_ -- 32 bits, RGB_565 -- 16 bits.

  On Jul 23, 12:21 pm, ReyLith jesus...@gmail.com wrote:

   Thanks Nathan.

   With this option I can obtain the image characteristics but I 
   don't
   know the option that indicates me the depth of the pixel. Width 
   and
   Height are in outWidth and outHeight but I don't know where is 
   the
   depth. I thought use the getRowBytes() of Bitmap and product it 
   with
   getHeight() of Bitmap, but I don't know if there is correct.

   On 23 jul, 18:52, Nathan nathan.d.mel...@gmail.com wrote:

If you can get the width and height for the image without 
completely
opening it, then use the width*height*depth.

You probably have to use this 

[android-developers] Re: How to end a child activity and return to parent activity?

2010-07-25 Thread Joseph Earl
You can call finish() on the activities when you no longer need it.

On Jul 25, 1:21 pm, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I have a main screen with buttons to launch other subactivities.
 I have to press back button each time to go back to the main screen of
 my application.
 How do I finish a child activity and automatically return from the
 caller?

 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: Component-wise program on android market?

2010-07-25 Thread RichardC
see:

  Apps  Software libraries

on the Market


On Jul 25, 12:22 pm, nemo stone.c...@gmail.com wrote:
 Dear all:

 Could developer upload 'component'/SDK  to android market?
 Now it seems only have 2 type: 'application' and 'Game'.

 I just wonder if android market has the mechanism for developers to
 upload component-wise programs which can be used in others's
 application.
 Then developers may get benefit from earch others.

 Or Is android provide a easy way to invok and communicate with other
 application from one application?

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


[android-developers] Large jars in Android

2010-07-25 Thread kypriakos

Hi all,

I looked for any info on this but could not find much. Originally
I had a number of 3rd jars that I was importing into the Android
project. The general concensus I got was that I needed to find
the source for them and compile them in Android - well I  kicked
my behind and did all that and finally I have all jars in place for
my Android app. The compilation and packaging of apk of the
app with those jars sitting in the libs dir of the app takes 10-12
mins and towards the end it gives an Eclipse internal error
and it quits! I tried doing this outside Eclipse using ant and still
the same result. I have the java heap params jacked up for
-xmx and -xms to 256MB and still no luck. The jars sum up
to 6MB and the actual app to 0.25MB. The individual library
directories that use to compile each of the 3rd jars compile
fairly fast.

So I am wondering if anyone has any insights on this - is the
Android plugin or in general the Android devices not meant to
handle such large apks? Is there anything else I need to
configure or look into to get this packaged?

Thanks very much
Demetris

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


[android-developers] read default browser cookies for webview

2010-07-25 Thread andrew android
Can anyone tell me how to read the cookies from the default browser?
Any example ?

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 end a child activity and return to parent activity?

2010-07-25 Thread Mystique
Thanks, got it.

On Jul 25, 9:40 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 You can call finish() on the activities when you no longer need it.

 On Jul 25, 1:21 pm, Mystique joven.ch...@gmail.com wrote:



  Hi,

  I have a main screen with buttons to launch other subactivities.
  I have to press back button each time to go back to the main screen of
  my application.
  How do I finish a child activity and automatically return from the
  caller?

  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] Transfer database file to Android

2010-07-25 Thread Doug Gordon
I'm porting an app that I've supported for many years on PalmOS PDAs. 
In that world, the user runs a Windows program on his PC that creates a 
PalmOS database file, which is then Hotsynced to the handheld for the 
PalmOS app to use. For Android, it should work in a similar way, with 
the user periodically updating the database on the Android device by 
regenerating it on his PC.


So far, I've made the conversion on the Windows side to generate an 
SQLite database and can use adb push to transfer it to the emulator, 
where I've verified that I can run queries on it using the sqlite3 tool, 
etc.


What I'm unclear on at this early stage is how the file transfer can be 
accomplished with an actual Android device. These files can tend to be 
rather large, so perhaps the SD card would be a good place to put them, 
but in any case I'm unclear on if there is any built-in or automated way 
to transfer files from a PC to an Android device. My users tend to be 
non-techy people and I can't trust them to manually copy the file to the 
correct location, if that's even possible.


Another thought I've had is some way to store the converted file out in 
the cloud somewhere and then have my app retrieve it from there.


Any ideas or suggestions on this would be appreciated!

 Doug Gordon
 GHCS Systems

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

2010-07-25 Thread gizmor
does the HTC desire support multi touch?

On Jul 23, 2:38 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Also you might want to note that actually Android 1.5 does support
 multiple (well 2) touch points (it's not documented though)
 Sadly as far as I can tell Android 1.6 is the only version (post 1.1)
 that multi-touch won't work on.

 On Jul 22, 11:01 pm, Dianne Hackborn hack...@android.com wrote:

  Full multitouch is supported from when the APIs appeared -- API 5.
   multiple distinguishable touch points is a hardware limitations (some
  screen sensors don't support two completely separate touches at the same
  time).  You can determine this based on the feature defined in
  PackageManager.

  On Thu, Jul 22, 2010 at 1:41 PM, Joseph Earl joseph.w.e...@gmail.comwrote:

   API Level 4 and below support only a single touch pointer officially.
   API Level 5 - 7 support multiple indistinguishable touch points (for
   instance if you place one finger down, then a second one, then raise
   one of your fingers Android can detect a finger has been raised, but
   does not know which one)
   API Level 8 supports multiple distinguishable touch points (up to 256
   I believe)

   So yes from API level 5 onwards you can implement a Multi-Touch
   application on Android.

   On Jul 21, 9:16 pm, gizmor gilam...@gmail.com wrote:
Hi,
I'm new to Android, and I love it!
I was wondering how many touch are possible at the same time?

The user click and drag (move) and while he's dragging he clicks again
(Other finger) and drag it too..

mmm, piano (multi touched) app... (with dragging)... is that 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.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

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

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


[android-developers] Android Market, how do you manage license and piracy protection?

2010-07-25 Thread sblantipodi
As title.
How do you manage your activation on android market since this crappy
market doesn't offer
anything for dynamic licensing as other store like handango, mobihand
app world ecc. ecc...???

How do you protect your full copy from piracy?

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

2010-07-25 Thread Tim
Dear Raineesh,

You may wish to consider another approach to Android development such
as our MobiForms rapid application development tool.

MobiForms is the world's first rapid application development tool
designed for Google Android smartphones. Additionally MobiForms apps
will run on other platforms such as Windows Mobile without any
changes.

With MobiForms there is no need to download and learn Eclipse, the
Android SDK, Java or XML. MobiForms offers one compact tool for
development and deployment with most programming done with drag and
drop.

MobiForms is ideal for creating database orientated business apps.
Apps that would traditionally take hours or days to create can be
generated in minutes with MobiForms.

For more information please have a look at http://www.mobiforms.com

You may be interested to learn that we have also recently added Google
Android support for our MobiForms Sync Server. This enables online
synchronisation and offline database buffering for apps where
connectivity may not be guaranteed such as for Field Service, Surveys
and Risk Assessments.

Kind regards,

Tim @ MobiForms

Raineesh Pereira wrote:
 Need some good stuff to learn Android... Am a new Android Developer...

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


[android-developers] Re: Android Market, how do you manage license and piracy protection?

2010-07-25 Thread JP


On Jul 25, 9:28 am, sblantipodi perini.dav...@dpsoftware.org wrote:

 How do you protect your full copy from piracy?

There's a switch on the publishing page that turns on and off a Copy
protection feature. Reportedly, this does not work with absolute
authority and devs seem to have had their apps float away onto warez
sites. I personally include a kill switch that allows for some level
of control, admittedly rather crude, by kicking out users based on
criteria you define (I use the app version). There's some past
experience with this kind of approach that you can find researching
this list.

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


[android-developers] Re: Android Market, how do you manage license and piracy protection?

2010-07-25 Thread Maps.Huge.Info (Maps API Guru)
There are three sure ways to protect your app from piracy:

1. Never publish it.
2. Give it away for free.
3. Write such a crappy app that nobody would want to steal it.

Other than these, you're a babe in the wood to anyone who wants to
take your property. Bummer on that.

Maybe the new version of the market will address these issues better.

-John Coryat

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


[android-developers] Re: how do you guys feel about the develop tools?

2010-07-25 Thread Tim
Dear Bill,

There is another way without using Eclipse of the Android SDK!!! Have
a look at our MobiForms rapid application development tool.

MobiForms is the world's first rapid application development tool
designed for Google Android smartphones. Additionally MobiForms apps
will run on other platforms such as Windows Mobile without any
changes.

With MobiForms there is no need to download and learn Eclipse, the
Android SDK, Java or XML. MobiForms offers one compact tool for
development and deployment with most programming done with drag and
drop.

MobiForms is ideal for creating database orientated business apps.
Apps that would traditionally take hours or days to write can be
created in minutes with MobiForms.

For more information please have a look at http://www.mobiforms.com

You may also be interested to learn that we have recently added Google
Android support for our MobiForms Sync Server. This enables online
synchronisation and offline database buffering for apps where
connectivity may not be guaranteed such as for Field Service, Surveys
and Risk Assessments.

Kind regards,

Tim @ MobiForms

billconan wrote:
 hello guys,

 i really like android and hope that it can surpass iphone in the near
 future. I like it, because it's open.

 But i really don't like the develop tools of android. it is so slow
 and buggy.

 Specifically, I don't like these two things:
 Eclipse
 Android emulator.

 Sometimes, the debugger tool cannot show the log.
 Eclipse cannot install apk if the there is a apk with the same name
 running.
 occasionally Eclipse fails to pack the resource files correctly.
 .
 I can write a long problem list of these two.

 everyone can tell the difference by simply playing xcode and iphone
 sdk for awhile. one click on the build and run in xcode, the iphone
 simulator pops up immediately. and the xcode debugging tools are so
 easy to use.

 develop tools are so important, even more important than the platform
 itself, if not as equal important.
 I think the android team should pay more attention to that, say,
 improve the emulator performance and provide some other default ide
 other that eclipse. (the QT creator looks good)

 in addition, android should be more c++ friendly, because then
 millions of c++ projects can be easily ported to android.


 eclipse is just so so terrible

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 register a long click on a WebView somewhere else than on links?

2010-07-25 Thread Sephy
I think everything is in the title. I have been searching for this
problem for days, seen the question asked everywhere, but never
answered. SO maybe someone here knows how to do that.
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: Android to iPhone

2010-07-25 Thread andrej sarkic
Airplay is a pretty decent multi-platform SDK.

http://www.airplaysdk.com/index.php

It's not quite what you want, though. You have to write for the
Airplay Framework, and the look and feel is definitely not native on
either platform.


On Jul 25, 7:16 am, greg sep...@eduneer.com wrote:
 You may be interested in watching the Cross-Compiling Android
 Applications to the iPhone video at

    http://www.youtube.com/watch?v=TG-NIt2O5J8

 As Mr. Coryat suggests in this thread, the iOS terms are a bit of a
 legal sticky wicket for this type of cross-compilation.  Technically
 however, according to the video, the cross-compiler seems to work
 admirably well on game applications.

 - greg

 On Jul 25, 6:02 am, Joseph Earl joseph.w.e...@gmail.com wrote:

  Or Appcelerator.
  But non-of these is replacement yet for coding in the relevant
  platform language if you want access to all the features.

  On Jul 25, 9:25 am, Eelco eelcoaart...@gmail.com wrote:

   What about this:http://www.phonegap.com/

   PhoneGap is an open source development framework for building cross-
   platform mobile apps. Build apps in HTML and JavaScript and still take
   advantage of core features in iPhone/iTouch, iPad, Google Android,
   Palm, Symbian and Blackberry SDKs.

   Anybody experience with it?



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


[android-developers] Re: geoCoder: getFromLocationName ?

2010-07-25 Thread coy
Sorry, I need to practice more English.
Exactly.
I need my application to search the web for SOMETHING in SOMEWHERE.
Is there any way?

Thanks, TreKing.

On 25 jul, 01:59, TreKing treking...@gmail.com wrote:
 On Sat, Jul 24, 2010 at 4:27 PM, coy cawe...@gmail.com wrote:
  How do I do that?

 Search the web, parse the results?

  I tried this:

  adresses = geoCoder.getFromLocationName addresses = (
  Pizza in San Francisco, CA, United States, 5);

  but does not work.

 The function is getFromLocationName' not getFromArbitrarySearchTerm,
 i.e. it gets you a location from a specific name (landmark, address,
 intersection, zip code, etc). It's not supposed to do a search for you.

  And this function will only return addresses, does not return the
  url images.

 What are the url images?

  Probably I need to use a different function, but which one?

 None that I know of built in.

 Any idea?



 See question #1.

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

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


Re: [android-developers] FB Sync - date of birth

2010-07-25 Thread Nikhil Bhatia
Pls adivce.

Regards,
Nikhil Bhatia.
+91 9820964544.


On Fri, Jul 23, 2010 at 10:27 PM, Nikhil Bhatia nikebha...@gmail.comwrote:

 With Android I can sync my contacts with FB, but the date of birth
 does not get pushed.
 How can be get that.
 Also, if Bth date is present in contacts, how can I update in calendar
 with reminder.

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

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

[android-developers] Re: Android Market, how do you manage license and piracy protection?

2010-07-25 Thread Pent
 How do you protect your full copy from piracy?

1) Box in app to enter google order code
2) Script on server to query checkout CHARGED order codes

Pent

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


[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread DanH
Note that there is fairly good documentation for SQLite (though not
for the Java, JavaScript, and C/C++ interfaces) at http://www.sqlite.org/.
If you're going to be using SQLite you should review that
documentation a bit.

On Jul 25, 2:17 am, Federico Paolinelli fedep...@gmail.com wrote:
 Thanks a lot. You saved me from doing an ugly filth :-) .
 I didn't expect that the number with a + was suitable to be
 interpreted as a number.

 Thanks again, Federico

 On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

  Did you put quotes around the string?  If SQLite sees an un-quoted
  string it's going to interpret it as numeric if possible.  SQLite
  ignores the data type of columns.

  On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

   I spent a lot of time on this.

   I was trying to store an incoming call number in sqlite. I'm in Italy,
   so the number was something like +39123123.

   What happened was that after putting and removing it from sqlite as a
   string , the leading + was gone.

   In the table creation the record is a string.
   I call ContentValues.put(String, String) and then I get the value from
   the cursor using getString().

   Moreover; I tried to put something before the +, like aa+39123123,
   the query returns the expected value. I suspect that for some reason
   sqlite converts the String to a number, and when returns it back the +
   is not given back.

   What I think I am going to do (even if I am disgusted) is to add
   something to the string and remove it later.

   Anyway, does anybody has an explanation??
   Many thanks in advance,

   Federico

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


[android-developers] Re: Android Market paid app download errors

2010-07-25 Thread Edward Falk
I'm having the same issue -- several complaints about being able to
buy, but not download an app.  Complaints are on Droid X and
Incredible.

Does cancelling and re-ordering help?

I can tell you that rebooting the phone, making sure you're logged in
to Google Talk, or even updating the app on the market has not
helped.  My customers are getting frustrated.

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


[android-developers] Re: Android Market paid app download errors

2010-07-25 Thread Edward Falk
This issues *my* customers are seeing is that they can see the app on
the market, they can buy it, than can get billed for it, but they
can't download it.  Needless to say, they're not happy.

The app is a simple calculator.  The only permissions is uses are
vibrate and write to sd card.  It was originally released with target
API 2.  I tried updating that to API 4, with minSdk set to 3, but it
made no difference at 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: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
Sorry if I reply so late, but I wasn't at home. I can't manage it
work. The cursor.getString() method returns me the string with the
quote.
I used single quote ' but I also tried using double quotes  .

My method of stripping the quotes back works, but now I am so curious
of getting it work properly...

I also tried to open the source code but I didn't find it.
I'm pretty sure the quotes are not stripped when it retrieves the data
in CursorWindow (but I am quite new to this java stuff, I can be
wrong) whereas I got lost in the insert part (but it looks like it
prepares the statement with the data I pass to it).

If you want to check, I can write a simplified version of the code
that's not working for me.

I got a

  public long addNumber(String number)
  {

ContentValues contentValues = new ContentValues();
contentValues.put(NUMBER_DESC_KEY, number);
return db.insert(NUMBERS_TABLE, null, contentValues);
  }


and a


  public Cursor getAllNumbers () {
return db.query(NUMBERS_TABLE, new String[] {ROW_ID,

  NUMBER_DESC_KEY},
null, null, null, null, null);
  }


and this is the test that fails:

public void testAddnumberFails(){
String input = '+39123123231';
db.open();
db.addNumber(input);
db.close();

db.open();
Cursor c = db.getAllNumbers();

if(c.moveToFirst()){
do{
String number = 
c.getString(DbAdapter.NUMBER_DESC_COLUMN);
assertTrue(Number different, 
number.equals(input));
}while(c.moveToNext());
}
}


Where db is a DbHelper class as described in many tutorials.
The table was created with CALL_NUMBER_DESC_KEY field as a string.

DATABASE_NUMBERS_CREATE = create table  +
  NUMBERS_TABLE +  ( + ROW_ID +
   integer primary key autoincrement,  +
  NUMBER_DESC_KEY +  string);;





On 25 Lug, 15:39, DanH danhi...@ieee.org wrote:
 Yeah, AbstractCursor.getString() should return the stripped string
 value, if the appropriate quotes were used going in.

 On Jul 25, 4:30 am, YuviDroid yuvidr...@gmail.com wrote:

  What do you mean by remove the quotes?
  I store phone numbers on db and it works fine without dealing with adding
  quotes, then removing them.
  When I add/update stuff I use:

  contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);

  and when retrieving:
  String phoneNumber =
  cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));

  Uhm...maybe I misunderstood the whole problem here..:S:S

  Tra l'altro ciaoo!! ;)
  Yuvi

  On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli 
  fedep...@gmail.comwrote:

   Just to add more information to anybody who is interested in this
   topic, it is necessary to remove the quotes if you need the original
   data.

   On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
Thanks a lot. You saved me from doing an ugly filth :-) .
I didn't expect that the number with a + was suitable to be
interpreted as a number.

Thanks again, Federico

On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

 Did you put quotes around the string?  If SQLite sees an un-quoted
 string it's going to interpret it as numeric if possible.  SQLite
 ignores the data type of columns.

 On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

  I spent a lot of time on this.

  I was trying to store an incoming call number in sqlite. I'm in
   Italy,
  so the number was something like +39123123.

  What happened was that after putting and removing it from sqlite as 
  a
  string , the leading + was gone.

  In the table creation the record is a string.
  I call ContentValues.put(String, String) and then I get the value
   from
  the cursor using getString().

  Moreover; I tried to put something before the +, like
   aa+39123123,
  the query returns the expected value. I suspect that for some reason
  sqlite converts the String to a number, and when returns it back the
   +
  is not given back.

  What I think I am going to do (even if I am disgusted) is to add
  something to the string and remove it later.

  Anyway, does anybody has an explanation??
  Many thanks in advance,

  Federico

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

  --
  YuviDroid
  Check out 

[android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
As Dan stated, the problem is the leading + of an international number
that gets lost in the insert / get process.

If I put a number like +39123123, when I perform a getString I get
back something like 39123123, this is because sqllite thinks it is a
pure number.

(Ciao anche a te)

On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?
 I store phone numbers on db and it works fine without dealing with adding
 quotes, then removing them.
 When I add/update stuff I use:

 contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);

 and when retrieving:
 String phoneNumber =
 cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));

 Uhm...maybe I misunderstood the whole problem here..:S:S

 Tra l'altro ciaoo!! ;)
 Yuvi

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli 
 fedep...@gmail.comwrote:



  Just to add more information to anybody who is interested in this
  topic, it is necessary to remove the quotes if you need the original
  data.

  On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
   Thanks a lot. You saved me from doing an ugly filth :-) .
   I didn't expect that the number with a + was suitable to be
   interpreted as a number.

   Thanks again, Federico

   On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:

Did you put quotes around the string?  If SQLite sees an un-quoted
string it's going to interpret it as numeric if possible.  SQLite
ignores the data type of columns.

On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com wrote:

 I spent a lot of time on this.

 I was trying to store an incoming call number in sqlite. I'm in
  Italy,
 so the number was something like +39123123.

 What happened was that after putting and removing it from sqlite as a
 string , the leading + was gone.

 In the table creation the record is a string.
 I call ContentValues.put(String, String) and then I get the value
  from
 the cursor using getString().

 Moreover; I tried to put something before the +, like
  aa+39123123,
 the query returns the expected value. I suspect that for some reason
 sqlite converts the String to a number, and when returns it back the
  +
 is not given back.

 What I think I am going to do (even if I am disgusted) is to add
 something to the string and remove it later.

 Anyway, does anybody has an explanation??
 Many thanks in advance,

 Federico

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

 --
 YuviDroid
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
 quickly access your favorite apps and contacts!)http://android.yuvalsharon.net

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


Re: [android-developers] Re: Application works after reboot the phone

2010-07-25 Thread Dianne Hackborn
There is no public API for the download manager, so you should not be doing
anything that requires that permission.

On Sun, Jul 25, 2010 at 6:23 AM, mike hasitharand...@gmail.com wrote:

 Hi Joseph,

 this is the security exception i'm getting

 android.permission.ACCESS_DOWNLOAD_MANAGER
 regards,
 Mike

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




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

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

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

[android-developers] Emulating share dialog

2010-07-25 Thread Pinheiro
I'm creating an app that will use a dialog similar to the share dialog
(intent.action.SEND) with my own options.
Is there a built-in theme in the SDK I can use to emulate the look of
this dialog?

Note:  I don't want to create an Intent, I just want to create a
similar looking layout.

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


Re: [android-developers] Re: Application works after reboot the phone

2010-07-25 Thread Dianne Hackborn
Btw please post at least a stack crawl for error messages; you have not
supplied nearly enough information for anyone to help you.

On Sun, Jul 25, 2010 at 11:53 AM, Dianne Hackborn hack...@android.comwrote:

 There is no public API for the download manager, so you should not be doing
 anything that requires that permission.


 On Sun, Jul 25, 2010 at 6:23 AM, mike hasitharand...@gmail.com wrote:

 Hi Joseph,

 this is the security exception i'm getting

 android.permission.ACCESS_DOWNLOAD_MANAGER
 regards,
 Mike

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




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

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




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

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

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

Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread YuviDroid
What happens if you declare in the create table sql statement
NUMBER_DESC_KEY as
TEXT and not string?
I've always used TEXT.


On Sun, Jul 25, 2010 at 8:26 PM, Federico Paolinelli fedep...@gmail.comwrote:

 As Dan stated, the problem is the leading + of an international number
 that gets lost in the insert / get process.

 If I put a number like +39123123, when I perform a getString I get
 back something like 39123123, this is because sqllite thinks it is a
 pure number.

 (Ciao anche a te)

 On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
  What do you mean by remove the quotes?
  I store phone numbers on db and it works fine without dealing with adding
  quotes, then removing them.
  When I add/update stuff I use:
 
  contentValues.put(TableKeys.PHONE_NUMBER, phoneNumber);
 
  and when retrieving:
  String phoneNumber =
  cursor.getString(cursor.getColumnIndexOrThrow(TableKeys.PHONE_NUMBER));
 
  Uhm...maybe I misunderstood the whole problem here..:S:S
 
  Tra l'altro ciaoo!! ;)
  Yuvi
 
  On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli 
 fedep...@gmail.comwrote:
 
 
 
   Just to add more information to anybody who is interested in this
   topic, it is necessary to remove the quotes if you need the original
   data.
 
   On 25 Lug, 09:17, Federico Paolinelli fedep...@gmail.com wrote:
Thanks a lot. You saved me from doing an ugly filth :-) .
I didn't expect that the number with a + was suitable to be
interpreted as a number.
 
Thanks again, Federico
 
On Jul 25, 12:50 am, DanH danhi...@ieee.org wrote:
 
 Did you put quotes around the string?  If SQLite sees an un-quoted
 string it's going to interpret it as numeric if possible.  SQLite
 ignores the data type of columns.
 
 On Jul 24, 5:12 pm, Federico Paolinelli fedep...@gmail.com
 wrote:
 
  I spent a lot of time on this.
 
  I was trying to store an incoming call number in sqlite. I'm in
   Italy,
  so the number was something like +39123123.
 
  What happened was that after putting and removing it from sqlite
 as a
  string , the leading + was gone.
 
  In the table creation the record is a string.
  I call ContentValues.put(String, String) and then I get the value
   from
  the cursor using getString().
 
  Moreover; I tried to put something before the +, like
   aa+39123123,
  the query returns the expected value. I suspect that for some
 reason
  sqlite converts the String to a number, and when returns it back
 the
   +
  is not given back.
 
  What I think I am going to do (even if I am disgusted) is to add
  something to the string and remove it later.
 
  Anyway, does anybody has an explanation??
  Many thanks in advance,
 
  Federico
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  YuviDroid
  Check out Launch-X http://android.yuvalsharon.net/launchx.php (a
 widget to
  quickly access your favorite apps and contacts!)
 http://android.yuvalsharon.net

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




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

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

Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Kostya Vasilyev
Why not prefix the number with some arbitrary, predefined character?

Sort of like the leading single quote in Excel.

Then remove it after getting the value from the database.

Just make sure it's not a valid phone number character - like, any letter
from A to Z will work...

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

25.07.2010 22:26 пользователь Federico Paolinelli fedep...@gmail.com
написал:

As Dan stated, the problem is the leading + of an international number
that gets lost in the insert / get process.

If I put a number like +39123123, when I perform a getString I get
back something like 39123123, this is because sqllite thinks it is a
pure number.

(Ciao anche a te)


On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?...
 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli fedep...@gmail.com
wrote:




  Just to add more information to anybody who is interested in this
  topic, it is necessa...
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com


  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en...
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
to

 quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
You received t...

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

Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
That's what I did, as I said before:

What I think I am going to do (even if I am disgusted) is to add
something to the string and remove it later. 

 but I thought there was a more standard way to do it as suggested by Dan

2010/7/25 Kostya Vasilyev kmans...@gmail.com:
 Why not prefix the number with some arbitrary, predefined character?

 Sort of like the leading single quote in Excel.

 Then remove it after getting the value from the database.

 Just make sure it's not a valid phone number character - like, any letter
 from A to Z will work...

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

 25.07.2010 22:26 пользователь Federico Paolinelli fedep...@gmail.com
 написал:

 As Dan stated, the problem is the leading + of an international number
 that gets lost in the insert / get process.

 If I put a number like +39123123, when I perform a getString I get
 back something like 39123123, this is because sqllite thinks it is a
 pure number.

 (Ciao anche a te)

 On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?...

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli
 fedep...@gmail.comwrote:




  Just to add more information to anybody who is interested in this
  topic, it is necessa...

 
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com

  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en...

 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
 to

 quickly access your favorite apps and
 contacts!)http://android.yuvalsharon.net

 --
 You received t...

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



-- 

Federico

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


Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Dmitri Plotnikov
This should not be happening if the column type is declared correctly.  It
should be declared as TEXT.  See http://www.sqlite.org/datatype3.html

Cheers,
Dmitri
On Jul 25, 2010 12:14 PM, Federico Paolinelli fedep...@gmail.com wrote:
 That's what I did, as I said before:

 What I think I am going to do (even if I am disgusted) is to add
 something to the string and remove it later. 

 but I thought there was a more standard way to do it as suggested by Dan

 2010/7/25 Kostya Vasilyev kmans...@gmail.com:
 Why not prefix the number with some arbitrary, predefined character?

 Sort of like the leading single quote in Excel.

 Then remove it after getting the value from the database.

 Just make sure it's not a valid phone number character - like, any letter
 from A to Z will work...

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

 25.07.2010 22:26 пользователь Federico Paolinelli fedep...@gmail.com
 написал:

 As Dan stated, the problem is the leading + of an international number
 that gets lost in the insert / get process.

 If I put a number like +39123123, when I perform a getString I get
 back something like 39123123, this is because sqllite thinks it is a
 pure number.

 (Ciao anche a te)

 On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?...

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli
 fedep...@gmail.comwrote:




  Just to add more information to anybody who is interested in this
  topic, it is necessa...

 
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com


  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en...

 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a
widget
 to

 quickly access your favorite apps and
 contacts!)http://android.yuvalsharon.net

 --
 You received t...

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



 --
 
 Federico

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

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

Re: [android-developers] Re: Weird sqlite behaviour. Can somebody explain?

2010-07-25 Thread Federico Paolinelli
Ooops.
Thanks a lot, it was driving me mad. Sorry for having bothered you all.

2010/7/25 Dmitri Plotnikov dplotni...@google.com:
 This should not be happening if the column type is declared correctly.  It
 should be declared as TEXT.  See http://www.sqlite.org/datatype3.html

 Cheers,
 Dmitri

 On Jul 25, 2010 12:14 PM, Federico Paolinelli fedep...@gmail.com wrote:
 That's what I did, as I said before:

 What I think I am going to do (even if I am disgusted) is to add
 something to the string and remove it later. 

 but I thought there was a more standard way to do it as suggested by Dan

 2010/7/25 Kostya Vasilyev kmans...@gmail.com:
 Why not prefix the number with some arbitrary, predefined character?

 Sort of like the leading single quote in Excel.

 Then remove it after getting the value from the database.

 Just make sure it's not a valid phone number character - like, any letter
 from A to Z will work...

 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

 25.07.2010 22:26 пользователь Federico Paolinelli fedep...@gmail.com
 написал:

 As Dan stated, the problem is the leading + of an international number
 that gets lost in the insert / get process.

 If I put a number like +39123123, when I perform a getString I get
 back something like 39123123, this is because sqllite thinks it is a
 pure number.

 (Ciao anche a te)

 On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
 What do you mean by remove the quotes?...

 On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli
 fedep...@gmail.comwrote:




  Just to add more information to anybody who is interested in this
  topic, it is necessa...

 
 
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com

  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en...

 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a
 widget
 to

 quickly access your favorite apps and
 contacts!)http://android.yuvalsharon.net

 --
 You received t...

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



 --
 
 Federico

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

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



-- 

Federico

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


Re: [android-developers] read default browser cookies for webview

2010-07-25 Thread Mark Murphy
On Sun, Jul 25, 2010 at 10:48 AM, andrew android andygoldm...@gmail.com wrote:
 Can anyone tell me how to read the cookies from the default browser?

You cannot access other applications' data like this, for
privacy/security reasons. Sorry!

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

_Android Programming Tutorials_ Version 2.9 Available!

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


Re: [android-developers] Transfer database file to Android

2010-07-25 Thread Mark Murphy
On Sun, Jul 25, 2010 at 11:45 AM, Doug Gordon gordo...@gmail.com wrote:
 but
 in any case I'm unclear on if there is any built-in or automated way to
 transfer files from a PC to an Android device.

Neither. Android's focus is more on the cloud. Other than mounting
the SD card and copying it there, there is nothing else stock on
Android, for an end user setup. Moreover, you cannot use adb push on a
device to put a file in an application's local file store.

 Another thought I've had is some way to store the converted file out in the
 cloud somewhere and then have my app retrieve it from there.

That is probably the simplest for now.

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

_Android Programming Tutorials_ Version 2.9 Available!

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


[android-developers] service that maintains TTS

2010-07-25 Thread poohtbear
Hi.
I have an application that relies on TTS to work in real time upon
device events (such as new message\sms).
To do that i start my service on device init and when i start it i
start the TTS engine.
Once started my broadcast receivers sends it IPC's to play whatever is
needed.
Of course if an ipc is sent to the service and it's not on i'll have o
start it again, acquire the TTS again and pay the performance penalty
that the sound will be played only seconds after the event.

My question is, is there a better way to handle the TTS engine ? if i
keep the TTS engine instance will it prevent other apps from using
it ? if from a moment that event has occurred i need about 0-200 milli
response, is there a solution other then a service that keeps a live
instance of TTS engine that is already initialized ?

10x! ^^

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

2010-07-25 Thread DanH
Read the documentation carefully:

In SQLite, the datatype of a value is associated with the value
itself, not with its container.

Any column in an SQLite version 3 database, except an INTEGER PRIMARY
KEY column, may be used to store a value of any storage class.

There is what they call affinity, but it does not affect how a value
is interpreted in the query statement, only conversions that occur
after it's initially interpreted.

I've not used the Android interfaces, but with the standard
java.sql.ResultSet updateString/getString interface there's no need to
explicitly quote string values, or strip the quotes on retrieval.

Here's the code I've used for constructing an INSERT statement (since
oddly none of the APIs support a ResultSet style interface for
INSERT):

StringBuffer stmt = new StringBuffer();
stmt.append(INSERT INTO );
if ((schemaName != null)  (schemaName.length()  0)) {
stmt.append(schemaName);
stmt.append(.);
}
stmt.append(tableName);
stmt.append( VALUES ();
for (int i = 0; i  columnValues.length; i++) {
if (columnValues[i] instanceof String) {
stmt.append(');

stmt.append(doubleQuotes(columnValues[i].toString()));
stmt.append(');
}
else {
stmt.append(columnValues[i].toString());
}
if (i+1 == columnValues.length) {
stmt.append());
}
else {
stmt.append(, );
}
}


(Implementing method doubleQuotes is left as an exercise for the
student.)

On Jul 25, 2:24 pm, Dmitri Plotnikov dplotni...@google.com wrote:
 This should not be happening if the column type is declared correctly.  It
 should be declared as TEXT.  Seehttp://www.sqlite.org/datatype3.html

 Cheers,
 Dmitri
 On Jul 25, 2010 12:14 PM, Federico Paolinelli fedep...@gmail.com wrote:

  That's what I did, as I said before:

  What I think I am going to do (even if I am disgusted) is to add
  something to the string and remove it later. 

  but I thought there was a more standard way to do it as suggested by Dan

  2010/7/25 Kostya Vasilyev kmans...@gmail.com:
  Why not prefix the number with some arbitrary, predefined character?

  Sort of like the leading single quote in Excel.

  Then remove it after getting the value from the database.

  Just make sure it's not a valid phone number character - like, any letter
  from A to Z will work...

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com

  25.07.2010 22:26 пользователь Federico Paolinelli fedep...@gmail.com
  написал:

  As Dan stated, the problem is the leading + of an international number
  that gets lost in the insert / get process.

  If I put a number like +39123123, when I perform a getString I get
  back something like 39123123, this is because sqllite thinks it is a
  pure number.

  (Ciao anche a te)

  On 25 Lug, 11:30, YuviDroid yuvidr...@gmail.com wrote:
  What do you mean by remove the quotes?...

  On Sun, Jul 25, 2010 at 10:05 AM, Federico Paolinelli
  fedep...@gmail.comwrote:

   Just to add more information to anybody who is interested in this
   topic, it is necessa...

   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com

 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com



   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en...

  Check out Launch-X http://android.yuvalsharon.net/launchx.php (a
 widget
  to

  quickly access your favorite apps and
  contacts!)http://android.yuvalsharon.net

  --
  You received t...

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

  --
  
  Federico

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

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

[android-developers] Re: Transfer database file to Android

2010-07-25 Thread Joseph Earl
It is possible to copy an existing SQLite database from your assets
folder to the correct location on the device.
See: 
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

On Jul 25, 8:36 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sun, Jul 25, 2010 at 11:45 AM, Doug Gordon gordo...@gmail.com wrote:
  but
  in any case I'm unclear on if there is any built-in or automated way to
  transfer files from a PC to an Android device.

 Neither. Android's focus is more on the cloud. Other than mounting
 the SD card and copying it there, there is nothing else stock on
 Android, for an end user setup. Moreover, you cannot use adb push on a
 device to put a file in an application's local file store.

  Another thought I've had is some way to store the converted file out in the
  cloud somewhere and then have my app retrieve it from there.

 That is probably the simplest for now.

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

 _Android Programming Tutorials_ Version 2.9 Available!

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


[android-developers] allign text vertically in a text view

2010-07-25 Thread harshe
I have a textview placed vertically in an activity.. I Want the text
within the textview to be shown as bottom to top facing right side.
Can anyone please help me out..
my XML file is

TextView
android:layout_height=200dp
android:layout_width=50dp
android:paddingTop=100dp
android:text=ALL
android:textSize= 20px
android:autoText=true
 android:paddingLeft=5dp
 android:layout_gravity=fill_vertical
  /

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

2010-07-25 Thread harshe
i tried even this but still it doesnot work for me :( :(


On Jul 23, 8:30 pm, Matt Quigley matthew.quig...@gmail.com wrote:
 You might get it to work if you request the focus for EditText on
 creation.  Either add editText.requestFocus() in your onCreate(), or
 add a requestFocus/ tag inside the EditText's XML layout.
 EditText 
   requestFocus/
 /EditText

 -Matt

 On Jul 23, 4:52 am, harshe hars...@gmail.com wrote:

  no it didnot work :(
  am working in android sdk 2.2

  my manifest is
  ?xml version=1.0 encoding=utf-8?
  manifest xmlns:android=http://schemas.android.com/apk/res/android;
        package=com.android.keyboard
        android:versionCode=1
        android:versionName=1.0
        
      application android:icon=@drawable/icon android:label=@string/
  app_name
          activity android:name=.sample
                    android:label=@string/app_name

  android:windowSoftInputMode=stateAlwaysVisible
             intent-filter
                  action android:name=android.intent.action.MAIN /
                  category
  android:name=android.intent.category.LAUNCHER /
              /intent-filter

         /activity
          /application

      /manifest
  please help me ..
  Thanks
  Harshe

  On Jul 23, 5:51 am, Matt matthew.quig...@gmail.com wrote:

  http://developer.android.com/guide/topics/manifest/activity-element.h...

   On Jul 22, 8:54 am, harshe hars...@gmail.com wrote:

i have an activity with few edit text views and a button. TheSoft
   Keyboardis visible when I click the edit text view. But i want the
   softkeyboardto be visible  during the launch itself , without
clicking the edit text itself i must get thesoftkeyboardon the
screen. Can  anyone plzzz help me out in 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: Calling methods of an activity from another

2010-07-25 Thread Luca Carlon
  I need
  this as when an event of my C++ library arises, a method of Activity1
  is called, and I need then to call a method of Activity2.

 It sounds like your JNI ought to be in a service, rather than either
 activity. You do not even know if Activity1 will be in memory while
 Activity2 is in the foreground.

I completely agree with you. Unfortunately I was looking for a faster
way to achieve an acceptable result, so I temporarily archived the
service solution.
Anyway, I can understand what I asked is not a good solution. Two
activities is not a good choice.
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: NDK OpenGL - Mixing Java and Native (C) calls to OpenGL API?

2010-07-25 Thread Indicator Veritatis
Although I think there is a way of making this work, I have to
question why you would want to do this. It is the Java interface
(including JSR-239)that is well tested in Android.

Besides: if you use GLSurfaceView and override its methods, it really
does do a lot of the work for you. What do you hope to gain by using
the NDK here? What are you doing with OpenGL that would meet Google's
description of good candidates for NDK work?

Recall, http://developer.android.com/sdk/ndk/index.html#overview says:

The NDK will not benefit most applications. ... Typical good
candidates for the NDK are self-contained, CPU-intensive operations
that don't allocate much memory, such as signal processing, physics
simulation, and so on.

On Jul 24, 8:09 pm, SChaser crotalistig...@gmail.com wrote:
 I would like to be able to use the OpenGL API from both Java and C
 (via NDK).

 In Java, there is a GL object passed, which has all GL methods on it.

 In C, you just talk to the native library.

 In a single onDrawFrame callback (for which Java is passed a GL), can
 I use methods on the GL object, and also call NDK methods which access
 the openGL library?

 In other words, is the GL object just a wrapper for the same instance
 of the native library?

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


[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-25 Thread Indicator Veritatis
Where does it leave you? It could leave you considering alternatives
to Google's Android Market, such as http://slideme.org or 
http://www.getjar.com/.

The former in particular is proud of their achievement of being usable
for both buyers and sellers from almost any country in the world.

On Jul 24, 5:35 pm, William Ferguson william.ferguson...@gmail.com
wrote:
 So where does this leave those of us who are outside the half dozen
 countries that can't *sell* apps on the market?

 I had hoped to provide a free crippled version on the market, and
 provide a paid unlock key from another site.
 Is my crippled app allowed or disallowed under the market rules?

 On Jul 25, 4:19 am, Pent tas...@dinglisch.net wrote:

   So,I'm not authorized to put on the market a FREE trial version,
   and ask customers who want the full version to buy it on my official
   site?

  3.3 ...Such free trials for Products are encouraged. However, if you
  want to collect fees after the free trial expires, you must collect
  all fees for the full version of the Product through the Payment
  Processor on the Market

  Seems quite clear.

  Pent



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


[android-developers] Re: What is a WeakReference?

2010-07-25 Thread Indicator Veritatis
You are correct. My wording did not make it clear: soft references are
useful for memory-sensitive caches, weak references for
canonicalized mappings.

But as you point out, in the weak reference example that started this
thread, weak references really do not buy you much, since the memory
is going to get GC'd when the process is killed, anyway. So only in
yet rarer cases, when that moment is too long postponed, will weak
references be worth the effort.

On Jul 23, 8:25 am, Matt Quigley matthew.quig...@gmail.com wrote:
 On Jul 23, 2:37 am, Indicator Veritatis mej1...@yahoo.com wrote:

  You left out something very important: the code hidden under //
  reload the image must not assume that it is not itself interrupted by
  yet another call to the garbage collector. That is, instead of simply
  continuing to use the soft/weak reference, it should make a strong
  reference to the same object, allowing this latter reference to either
  go out of scope or be set to null when it is done.

 You are referring to the code that Joseph Earl wrote above.  That code
 snippet is NOT a proper way to use weak references; that cache should
 be using soft references.

 On the other hand, in the example blog post referred to by the OP,
 which uses weak references, that IS a proper way to use weak
 references.  The main Activity already has a strong reference to the
 objects.  The secondary thread does not need to create a strong
 reference; in fact, that would make the weak reference useless.

  But if we are making this strong reference, what was the point of
  using the weak/soft reference in the first place? Ah, that is the
  tricky thing about using them. Depending on when you can make and
  release the strong reference, they might not buy you much; they might
  not buy you anything at all. That is why they are not recommended for
  much outside of caches and normalized mappings.

 You are referring to a soft reference, not a weak reference.  Soft
 references are good for caches.  Weak references are definitely
 recommended for the idea given in the article, where the main thread
 has a strong reference, and the background thread has a weak
 reference.  That way if the main thread is killed (i.e. the app is
 finished), if the background thread is still running then it won't
 prevent the weakly referenced objects from being destroyed.

 I also hate to throw this bit of information into the mix, but it
 should be known that Android will kill your process, and hence
 background threads anyways, when all your main threads have been
 destroyed (i.e. all your activities are finished, and there aren't any
 services running).  This means that, even if you did have a background
 thread running, it would be killed, implying that weak references
 wouldn't help because everything is going to get killed anyways.  That
 being said, there are still circumstances where the weak references
 matter: just because one activity is finished, doesn't mean all of
 your app's activities are necessarily finished.  So it would be good
 if you went from your main activity into another sub-activity which
 began a download.  But then the user presses back, because they don't
 want to bother waiting on the download.  In that case your main
 activity is still alive, but the background thread is working on the
 sub-activity that was already finished.  If that background thread had
 weak references, then that background thread would no longer be
 holding on to the resources of the sub-activity with strong
 references, and the system could GC those resources already, before
 the background thread dies.

 -Matt

 -Matt

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


Re: [android-developers] Re: hi

2010-07-25 Thread Chris Stewart
Bury for advertisement?

Chris Stewart
cstewart...@gmail.com


On Sun, Jul 25, 2010 at 12:42 PM, Tim t...@mobiforms.com wrote:

 Dear Raineesh,

 You may wish to consider another approach to Android development such
 as our MobiForms rapid application development tool.

 MobiForms is the world's first rapid application development tool
 designed for Google Android smartphones. Additionally MobiForms apps
 will run on other platforms such as Windows Mobile without any
 changes.

 With MobiForms there is no need to download and learn Eclipse, the
 Android SDK, Java or XML. MobiForms offers one compact tool for
 development and deployment with most programming done with drag and
 drop.

 MobiForms is ideal for creating database orientated business apps.
 Apps that would traditionally take hours or days to create can be
 generated in minutes with MobiForms.

 For more information please have a look at http://www.mobiforms.com

 You may be interested to learn that we have also recently added Google
 Android support for our MobiForms Sync Server. This enables online
 synchronisation and offline database buffering for apps where
 connectivity may not be guaranteed such as for Field Service, Surveys
 and Risk Assessments.

 Kind regards,

 Tim @ MobiForms

 Raineesh Pereira wrote:
  Need some good stuff to learn Android... Am a new Android Developer...

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


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

[android-developers] Re: What is a WeakReference?

2010-07-25 Thread Indicator Veritatis
As the author of the IBM Developerworks article I referenced mentions,
that is not good enough. The Garbage Collector runs on a different
thread, you have no control over when it will be called. It is quite
possible that just after you test for null, the GC is called, and it
is no longer valid. Not likely, but possible.

If instead you create a strong reference and use that, discarding it
when done, then you have shut the door on a really nasty transient
bug.

Or perhaps the version of 'ref()' you found did this for you? What
package did you find it it?

On Jul 23, 5:21 am, DanH danhi...@ieee.org wrote:
 Yes, you must guard any use of the WeakReference by taking the ref()
 of it, testing that for null, and then proceeding to use the result of
 the ref() if not null.  The size of the guarded sections is up to
 the programmer -- if too large then the object will never get deleted,
 if too small then the code gets chopped up.

 On Jul 23, 1:37 am, Indicator Veritatis mej1...@yahoo.com wrote:

  You left out something very important: the code hidden under //
  reload the image must not assume that it is not itself interrupted by
  yet another call to the garbage collector. That is, instead of simply
  continuing to use the soft/weak reference, it should make a strong
  reference to the same object, allowing this latter reference to either
  go out of scope or be set to null when it is done.

  But if we are making this strong reference, what was the point of
  using the weak/soft reference in the first place? Ah, that is the
  tricky thing about using them. Depending on when you can make and
  release the strong reference, they might not buy you much; they might
  not buy you anything at all. That is why they are not recommended for
  much outside of caches and normalized mappings.

  On Jul 22, 11:07 am, Joseph Earl joseph.w.e...@gmail.com wrote:

   Suppose you had a long list of images. As the user scrolled down you
   load the images from the net, and then display them.
   To avoid having to reload the images again if the user scrolls back
   up, you put the images in a cache (probably something like a
   MapString, Drawable)

   However because it is a long list you don't want to run into an out of
   memory situation if the user scrolls very far down and lots of images
   are put in the cache.
   So instead of storing the Drawables directly in the map, you create a
   MapString, WeakReferenceType (although I would use SoftReference
   for the purpose described here).
   This means that if Android is going to encounter an out of memory
   situation it will clear all of the Soft/Weak references (and thus
   hopefully avoid running out of memory). You will have to load the
   images again since your cache has been cleared, but this is far better
   than your application running out of memory and crashing.

   So you do something like:

   // caching an image
   MapString, SoftReference cache = new HashMapString,
   SoftReferenceDrawable();
   cache.put(http://mysite.com/images/1.jpg;, new
   SoftReferenceDrawable.put(myDrawable));

   // retrieve an image
   if (cache.containsKey(url)) {
      // looks like we have this image cached
      Drawable drawable = cache.get(url).get();
      if (drawable == null) {
          // the softreference has been cleared by the GC, reload the
   image
      } else {
          // softreference is still valid, got our image
      }

   }

   Essentially a weak reference is a weaker reference than a soft
   reference - the GC should free weak references to regain memory before
   soft references.

   I think that's (mostly) correct, hope it helps.

   On Jul 22, 6:48 pm, GodsMoon godsm...@gmail.com wrote:

Google just posted a new blog post 
onhttp://android-developers.blogspot.com/2010/07/multithreading-for-per
I understand the AsyncTask and I'm even using one in a list with
images already.

But I don't understand what a WeakReference is. I gather is is a
garbage collector directive, but I thought I didn't need to manage
garbage collection on Android.

   http://developer.android.com/reference/java/lang/ref/WeakReference.html
isn't as helpful as I was hoping it would be.



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

2010-07-25 Thread Indicator Veritatis
If worse comes to worse, you could give up on doing the build in
Eclipse, do it in Ant, and set CLASSPATH yourself at build time, and
set it in the jar for runtime (in the manifest).

On Jul 23, 6:07 pm, DanH danhi...@ieee.org wrote:
 What you're really asking is whether it's possible to override the
 system classpath.  I don't know the answer, but that's the question.

 On Jul 23, 2:08 pm, Toby tob...@gmail.com wrote:

  I'm working on a SMIME application to decode .p7m signed and encrypted
  messages.  I've got a small Java app written using the latest Bouncy
  Castle libraries and everything is working great.  I ran into some
  issues moving the code into an Android app.  I've included the newest
  BC libraries in the app, but my guess is my problems...

  07-23 12:02:23.701: ERROR/AndroidRuntime(654):
  java.lang.NoSuchMethodError:
  org.bouncycastle.asn1.ASN1InputStream.readTagNumber

  ...are related to class loading since many older versions of these
  classes exist on the platform.

  07-23 12:02:19.151: INFO/dalvikvm(641): DexOpt: not resolving
  ambiguous class 'Lorg/bouncycastle/asn1/ASN1InputStream;'

  07-23 12:00:20.671: DEBUG/dalvikvm(567): DexOpt: 'Lorg/apache/harmony/
  misc/SystemUtils;' has an earlier definition; blocking out

  Is it possible to selectively over-ride packages and force the JVM to
  use the included libraries in the application?  This may be an
  entirely futile effort and completely the wrong approach but I've
  exhausted the search boxes in every forum i can find so I thought i'd
  toss it out here.



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

2010-07-25 Thread Zsolt Vasvari
I belive the layout used is resolve_list_item.xml

On Jul 26, 2:53 am, Pinheiro rui.c.pinhe...@gmail.com wrote:
 I'm creating an app that will use a dialog similar to the share dialog
 (intent.action.SEND) with my own options.
 Is there a built-in theme in the SDK I can use to emulate the look of
 this dialog?

 Note:  I don't want to create an Intent, I just want to create a
 similar looking layout.

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

2010-07-25 Thread DanH
It's not the classpath he needs to set, it's the system classpath.
Different beast.

On Jul 25, 8:03 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 If worse comes to worse, you could give up on doing the build in
 Eclipse, do it in Ant, and set CLASSPATH yourself at build time, and
 set it in the jar for runtime (in the manifest).

 On Jul 23, 6:07 pm, DanH danhi...@ieee.org wrote:

  What you're really asking is whether it's possible to override the
  system classpath.  I don't know the answer, but that's the question.

  On Jul 23, 2:08 pm, Toby tob...@gmail.com wrote:

   I'm working on a SMIME application to decode .p7m signed and encrypted
   messages.  I've got a small Java app written using the latest Bouncy
   Castle libraries and everything is working great.  I ran into some
   issues moving the code into an Android app.  I've included the newest
   BC libraries in the app, but my guess is my problems...

   07-23 12:02:23.701: ERROR/AndroidRuntime(654):
   java.lang.NoSuchMethodError:
   org.bouncycastle.asn1.ASN1InputStream.readTagNumber

   ...are related to class loading since many older versions of these
   classes exist on the platform.

   07-23 12:02:19.151: INFO/dalvikvm(641): DexOpt: not resolving
   ambiguous class 'Lorg/bouncycastle/asn1/ASN1InputStream;'

   07-23 12:00:20.671: DEBUG/dalvikvm(567): DexOpt: 'Lorg/apache/harmony/
   misc/SystemUtils;' has an earlier definition; blocking out

   Is it possible to selectively over-ride packages and force the JVM to
   use the included libraries in the application?  This may be an
   entirely futile effort and completely the wrong approach but I've
   exhausted the search boxes in every forum i can find so I thought i'd
   toss it out here.

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

2010-07-25 Thread DanH
If the garbage collector deletes an object I have a hard reference
to, it's broken.  Doesn't matter if it runs in a different thread or a
different country.  Once I have executed ref() and stored the result
somewhere in my VM (in stack or in another object) that object cannot
be deleted until I overwrite the value.

On Jul 25, 7:19 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 As the author of the IBM Developerworks article I referenced mentions,
 that is not good enough. The Garbage Collector runs on a different
 thread, you have no control over when it will be called. It is quite
 possible that just after you test for null, the GC is called, and it
 is no longer valid. Not likely, but possible.

 If instead you create a strong reference and use that, discarding it
 when done, then you have shut the door on a really nasty transient
 bug.

 Or perhaps the version of 'ref()' you found did this for you? What
 package did you find it it?

 On Jul 23, 5:21 am, DanH danhi...@ieee.org wrote:

  Yes, you must guard any use of the WeakReference by taking the ref()
  of it, testing that for null, and then proceeding to use the result of
  the ref() if not null.  The size of the guarded sections is up to
  the programmer -- if too large then the object will never get deleted,
  if too small then the code gets chopped up.

  On Jul 23, 1:37 am, Indicator Veritatis mej1...@yahoo.com wrote:

   You left out something very important: the code hidden under //
   reload the image must not assume that it is not itself interrupted by
   yet another call to the garbage collector. That is, instead of simply
   continuing to use the soft/weak reference, it should make a strong
   reference to the same object, allowing this latter reference to either
   go out of scope or be set to null when it is done.

   But if we are making this strong reference, what was the point of
   using the weak/soft reference in the first place? Ah, that is the
   tricky thing about using them. Depending on when you can make and
   release the strong reference, they might not buy you much; they might
   not buy you anything at all. That is why they are not recommended for
   much outside of caches and normalized mappings.

   On Jul 22, 11:07 am, Joseph Earl joseph.w.e...@gmail.com wrote:

Suppose you had a long list of images. As the user scrolled down you
load the images from the net, and then display them.
To avoid having to reload the images again if the user scrolls back
up, you put the images in a cache (probably something like a
MapString, Drawable)

However because it is a long list you don't want to run into an out of
memory situation if the user scrolls very far down and lots of images
are put in the cache.
So instead of storing the Drawables directly in the map, you create a
MapString, WeakReferenceType (although I would use SoftReference
for the purpose described here).
This means that if Android is going to encounter an out of memory
situation it will clear all of the Soft/Weak references (and thus
hopefully avoid running out of memory). You will have to load the
images again since your cache has been cleared, but this is far better
than your application running out of memory and crashing.

So you do something like:

// caching an image
MapString, SoftReference cache = new HashMapString,
SoftReferenceDrawable();
cache.put(http://mysite.com/images/1.jpg;, new
SoftReferenceDrawable.put(myDrawable));

// retrieve an image
if (cache.containsKey(url)) {
   // looks like we have this image cached
   Drawable drawable = cache.get(url).get();
   if (drawable == null) {
       // the softreference has been cleared by the GC, reload the
image
   } else {
       // softreference is still valid, got our image
   }

}

Essentially a weak reference is a weaker reference than a soft
reference - the GC should free weak references to regain memory before
soft references.

I think that's (mostly) correct, hope it helps.

On Jul 22, 6:48 pm, GodsMoon godsm...@gmail.com wrote:

 Google just posted a new blog post 
 onhttp://android-developers.blogspot.com/2010/07/multithreading-for-per
 I understand the AsyncTask and I'm even using one in a list with
 images already.

 But I don't understand what a WeakReference is. I gather is is a
 garbage collector directive, but I thought I didn't need to manage
 garbage collection on Android.

http://developer.android.com/reference/java/lang/ref/WeakReference.html
 isn't as helpful as I was hoping it would be.

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

[android-developers] Re: What is a WeakReference?

2010-07-25 Thread DanH
(The key is to assign ref() to a variable and test the variable, vs
testing ref().)

On Jul 25, 7:19 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 As the author of the IBM Developerworks article I referenced mentions,
 that is not good enough. The Garbage Collector runs on a different
 thread, you have no control over when it will be called. It is quite
 possible that just after you test for null, the GC is called, and it
 is no longer valid. Not likely, but possible.

 If instead you create a strong reference and use that, discarding it
 when done, then you have shut the door on a really nasty transient
 bug.

 Or perhaps the version of 'ref()' you found did this for you? What
 package did you find it it?

 On Jul 23, 5:21 am, DanH danhi...@ieee.org wrote:

  Yes, you must guard any use of the WeakReference by taking the ref()
  of it, testing that for null, and then proceeding to use the result of
  the ref() if not null.  The size of the guarded sections is up to
  the programmer -- if too large then the object will never get deleted,
  if too small then the code gets chopped up.

  On Jul 23, 1:37 am, Indicator Veritatis mej1...@yahoo.com wrote:

   You left out something very important: the code hidden under //
   reload the image must not assume that it is not itself interrupted by
   yet another call to the garbage collector. That is, instead of simply
   continuing to use the soft/weak reference, it should make a strong
   reference to the same object, allowing this latter reference to either
   go out of scope or be set to null when it is done.

   But if we are making this strong reference, what was the point of
   using the weak/soft reference in the first place? Ah, that is the
   tricky thing about using them. Depending on when you can make and
   release the strong reference, they might not buy you much; they might
   not buy you anything at all. That is why they are not recommended for
   much outside of caches and normalized mappings.

   On Jul 22, 11:07 am, Joseph Earl joseph.w.e...@gmail.com wrote:

Suppose you had a long list of images. As the user scrolled down you
load the images from the net, and then display them.
To avoid having to reload the images again if the user scrolls back
up, you put the images in a cache (probably something like a
MapString, Drawable)

However because it is a long list you don't want to run into an out of
memory situation if the user scrolls very far down and lots of images
are put in the cache.
So instead of storing the Drawables directly in the map, you create a
MapString, WeakReferenceType (although I would use SoftReference
for the purpose described here).
This means that if Android is going to encounter an out of memory
situation it will clear all of the Soft/Weak references (and thus
hopefully avoid running out of memory). You will have to load the
images again since your cache has been cleared, but this is far better
than your application running out of memory and crashing.

So you do something like:

// caching an image
MapString, SoftReference cache = new HashMapString,
SoftReferenceDrawable();
cache.put(http://mysite.com/images/1.jpg;, new
SoftReferenceDrawable.put(myDrawable));

// retrieve an image
if (cache.containsKey(url)) {
   // looks like we have this image cached
   Drawable drawable = cache.get(url).get();
   if (drawable == null) {
       // the softreference has been cleared by the GC, reload the
image
   } else {
       // softreference is still valid, got our image
   }

}

Essentially a weak reference is a weaker reference than a soft
reference - the GC should free weak references to regain memory before
soft references.

I think that's (mostly) correct, hope it helps.

On Jul 22, 6:48 pm, GodsMoon godsm...@gmail.com wrote:

 Google just posted a new blog post 
 onhttp://android-developers.blogspot.com/2010/07/multithreading-for-per
 I understand the AsyncTask and I'm even using one in a list with
 images already.

 But I don't understand what a WeakReference is. I gather is is a
 garbage collector directive, but I thought I didn't need to manage
 garbage collection on Android.

http://developer.android.com/reference/java/lang/ref/WeakReference.html
 isn't as helpful as I was hoping it would be.

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


Re: [android-developers] Re: geoCoder: getFromLocationName ?

2010-07-25 Thread TreKing
On Sun, Jul 25, 2010 at 12:32 PM, coy cawe...@gmail.com wrote:

 I need my application to search the web for SOMETHING in SOMEWHERE.
 Is there any way?


Hit Google.com and parse the results?

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

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

Re: [android-developers] how to return to root activity after the task is cleared?

2010-07-25 Thread Jenus Dong
At the Onpause of B when you click home, you can do something.

On Tue, Jul 13, 2010 at 5:41 PM, kevin0228ca kevin022...@gmail.com wrote:

 Hi everyone.
 I have a app with 2 activities, A B
 A has a button that launches a new intent for B.
 When at B I press home, then launch app again, B is resumed with
 onResume().
 But if after I press home, I use something like taskiller to clear
 tasks, then I launch app again, it still shows B, but onCreate() is
 called.
 What I want for the second situation is for the app to start A instead
 of B.
 How can that be done?
 Thanks.

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

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

Re: [android-developers] Re: Scanning a Text File In Android

2010-07-25 Thread TreKing
On Sun, Jul 25, 2010 at 1:33 AM, anil kukreti success.anil...@gmail.comwrote:

 I mean if theres' any phone no in file ,, the android application can call
 it.


I still have no idea what you're trying to do ...

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

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

[android-developers] Help with my listview.No data being shown in my listview.

2010-07-25 Thread jjteo
With the below code, nothing appears in the ListActivity as I would
expect.
No errors are shown in logcat.

Arrival.java

package one.two;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;

public class Arrival extends ListActivity
{
private ListView listView;


/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState)
{
ArrayListString retList = new ArrayListString();

System.out.println(Start onCreate Function\n);

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.out.println(In onCreate Function\n);
System.out.println(In of GetData\n);
DBAdapter db = new DBAdapter(this);

System.out.println(DB Open\n);
db.open();
System.out.println(DB Opened\n);
retList = getData();
System.out.println(Out of GetData\n);
// force count no. of records in table
// dump to check index
int cnt = 2;

int i=0;
for (i = 0; icnt; i++)
System.out.println(retList.toString());
System.out.println(Array 2 String\n);

Cursor c = db.getCursor();
String[] from = new String[] {DBAdapter.status};
int[] to = new int[] {R.id.txt1};


SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this,
R.layout.listtext, c, from, to);
this.setListAdapter(mAdapter);

System.out.println(Show List\n);
db.close();
}

public static ArrayListString getData()
 {


ArrayListString items = DBAdapter.getAllTitles();
System.out.println(Return a LIST titles\n);
 return items;
}


}
DBAdapter.java

package one.two;

import java.util.List;

import android.app.ListActivity;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

import java.util.ArrayList;

public class DBAdapter
{
public static String status = status;
public String id = id;
public String arrival = arrival;
public String destination = destination;
public String ferry = ferry;
private static String DB_PATH = /data/data/one.two/databases/;
private static final String DATABASE_NAME = ferry.db;
private static final String DATABASE_TABLE = port;
public static Context context;
public Cursor c;

public static SQLiteDatabase DbLib;

//overloaded non-null constructor
public DBAdapter(Context context)
{
DbLib = context.openOrCreateDatabase(DATABASE_NAME,
SQLiteDatabase.CREATE_IF_NECESSARY,null);
System.out.println(OpenOrCreateDB Done);
}

public class DatabaseHelper extends SQLiteOpenHelper
{
Context context;
DatabaseHelper(Context context)
{
super(context, DATABASE_NAME, null, DATABASE_VERSION);
this.context = context;

}//end constructor DatabaseHelper

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion,
int newVersion)
{
}//end onUpgrade()

@Override
public void onCreate(SQLiteDatabase db)
{
}//end onCreate()
}// end class DatabaseHelper

private static DatabaseHelper DBHelper;
//private static SQLiteDatabase DbLib;

private static final int DATABASE_VERSION = 1;


public static ArrayListString getAllTitles()
{

ArrayListString port = new ArrayListString();
Cursor c=null;


c = DbLib.query(port,
new String[] { status, id, arrival,
destination, ferry }, null, null,
null, null, null);
try {
if (c!=null) { // start - when there is at least 1
record
System.out.println(Cursor is NOT NULL);

int i =0;
for (c.moveToFirst(); !c.isAfterLast();
c.moveToNext())

{
// Debug Stm
System.out.println(Record No. +i);
System.out.println(c.getString(0));
System.out.println(c.getString(1));
System.out.println(c.getString(2));
System.out.println(c.getString(3));
System.out.println(c.getString(4));
// Assign database cursor.records to
arraylist
port.add(i,c.getString(0));
port.add(i,c.getString(1));
  

[android-developers] Re: Application works after reboot the phone

2010-07-25 Thread mike
this is the exact exception i'm getting

java.lang.SecurityException: Permission Denial: reading
com.android.providers.downloads.DownloadProvider uri 
content://downloads/download
from pid=249, uid=10003 requires
android.permission.ACCESS_DOWNLOAD_MANAGER

but when i run the same code in other android devices i din't get this
exception.

regards,
Mike

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


[android-developers] Cursor that will work with query for 2 tables

2010-07-25 Thread Marc
I have a little program that writes to a SQLite database with 4
tables. When I do a query (either with rawQuery or
SQLiteQueryBuilder.query) the cursor only has column's from the first
table. Does anybody know how to do a query on 2 tables that have been
joined on a key value?

some code

public void onCreate(final SQLiteDatabase database) {
String sqlCreate =
CREATE TABLE IF NOT EXISTS Catch (
+ ID integer primary key 
autoincrement,
+ GPSLON  FLOAT, 
+ GPSLAT  FLOAT, 
+ TimeTIMESTAMP, 
+ BaitID  INTEGER, 
+ RigsID  VARCHAR,
+ FishID  VARCHAR,
+ SyncStatus  INTEGER
+ );;
database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS bait (
+BaitID integer primary key 
autoincrement,
+SyncStatus  INTEGER,
+BaitNameVARCHAR unique);;
database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS rigs (
+RigsID integer primary key 
autoincrement,
+SyncStatus  INTEGER,
+RigsNameVARCHAR);;

database.execSQL(sqlCreate);

sqlCreate =
CREATE TABLE IF NOT EXISTS fishSpecies 
(
+FishID integer primary key 
autoincrement,
+SyncStatus INTEGER,
+FishName   VARCHAR);;
database.execSQL(sqlCreate);
}



private long addBait(final Catch c) {
long id=-1;
Cursor data = db.query(bait,
null,
BaitName = '+c.baitText+',
null,
null,
null,
BaitName DESC);

if (data!=null) {
if (data.moveToFirst()){
id = data.getInt(0);
}
}
data.close();
if (id==-1){
final ContentValues initialValues = new ContentValues();
initialValues.put(BaitName, c.baitText);
initialValues.put(SyncStatus, c.syncStatus);
id = db.insertOrThrow(bait, null, initialValues);
}
return id;
}

public long addCatch(final Catch c) {
long baitId = addBait(c);

final ContentValues initialValues = new ContentValues();
initialValues.put(GPSLON,c.lon);
initialValues.put(GPSLAT, c.lat);
initialValues.put(Time, c.time.toString());
initialValues.put(BaitID, baitId);
initialValues.put(SyncStatus, c.syncStatus);

final long addedRow = db.insertOrThrow(Catch, null,
initialValues);
return addedRow;
}


   public Cursor getAllMyFish() {
SQLiteQueryBuilder builder = new SQLiteQueryBuilder();
builder.setTables(Catch Bait);
Cursor c = builder.query(db, new String[]{}, null, new 
String[]{},
null, null, null);
return c;
}


It is the cursor that is returned from getAllMyFish() that I want to
have fields from both Catch and Bait but I only get fields from Catch
when I look at the values returned from the cursor's getColumnName()

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


[android-developers] Populating child list in Expandable lists using dynamic multidimensional arrays

2010-07-25 Thread Pravin Parulekar
Hello Gurus,
I am using a simple expandable list that is populated by two arrays
( group array for the groups and a multi dimensional children array
for the child).

The arrays are built dynamically in the program and some group items
have more children than others. So I end up defining the highest
number as the array size for the multidimensional child array.
After populating the child array, some positions are left null, as
there are no values for those group items (explained above).
When I associate this with the expandable list adapter, the
getChildView method throws a nullpointer exception when it comes
across a position in child array that does noto have value.
I have two questions:

1. Can I make the base adapter skip the shildview method if the value
in that child is null? The current implementation of getchildView
method has to return a view and even if I suppress the nullpointer
exception, it adds a blank element in the child position in the list.

2. Is there a better way of associated multidimensional arrays that
are populated at run time? The current set of examples only use
hardcoded string array values. Even the cursor adapters examples use
very basic setup.

thank you so much for your attention and response.

Best, Pravin

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

2010-07-25 Thread Kumar Bibek
I have never come across such a problem. But I am wondering which jars
you are using and what are there combined sizes?

-Kumar Bibek
http://tech-droid.blogspot.com

On Jul 25, 7:44 pm, kypriakos demet...@ece.neu.edu wrote:
 Hi all,

 I looked for any info on this but could not find much. Originally
 I had a number of 3rd jars that I was importing into the Android
 project. The general concensus I got was that I needed to find
 the source for them and compile them in Android - well I  kicked
 my behind and did all that and finally I have all jars in place for
 my Android app. The compilation and packaging of apk of the
 app with those jars sitting in the libs dir of the app takes 10-12
 mins and towards the end it gives an Eclipse internal error
 and it quits! I tried doing this outside Eclipse using ant and still
 the same result. I have the java heap params jacked up for
 -xmx and -xms to 256MB and still no luck. The jars sum up
 to 6MB and the actual app to 0.25MB. The individual library
 directories that use to compile each of the 3rd jars compile
 fairly fast.

 So I am wondering if anyone has any insights on this - is the
 Android plugin or in general the Android devices not meant to
 handle such large apks? Is there anything else I need to
 configure or look into to get this packaged?

 Thanks very much
 Demetris

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


[android-developers] New Vacancies in North America,Europe,Middle East,East Asia India

2010-07-25 Thread Biswajit
New Vacancies in North America,Europe,Middle East,East Asia  India

Get Direct  Instant Job Calls  from Leading Placement Consultants for
Any Sector.

Now, Get Direct  Instant Job Calls from Leading Placement
Consultants.

The Benefits which You will be Entitled been Clearly Mentioned Below:

1)Your Resume will be Zapped to 1000 Top Global Placements.

2) You will receive IMMEDIATE  CONFIRMED JOB CALLS from the Leading
Placement Consultants Of  North America,Europe,Middle East,East Asia 
India.

For Complete Information Just Copy  Paste the Below Mentioned Link in
Your Browser:

visit:http://indiaebazar.com/biswajit/prodesc.php?pid=51rid=biswajit


Or,Directly Write to Me At: biswajitsarka...@gmail.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: Large jars in Android

2010-07-25 Thread kypriakos

Hi Kumar,

here they are:

Bouncycastle jdk14
Mortbay
w3cdom
javaxservlet

they are needed by sun's jxta to compile - the resulting jxta jar is
about 1.8MB and
all jars together imported into my app are close to 5.2MB.

Thanks

On Jul 26, 12:09 am, Kumar Bibek coomar@gmail.com wrote:
 I have never come across such a problem. But I am wondering which jars
 you are using and what are there combined sizes?

 -Kumar Bibekhttp://tech-droid.blogspot.com

 On Jul 25, 7:44 pm, kypriakos demet...@ece.neu.edu wrote:

  Hi all,

  I looked for any info on this but could not find much. Originally
  I had a number of 3rd jars that I was importing into the Android
  project. The general concensus I got was that I needed to find
  the source for them and compile them in Android - well I  kicked
  my behind and did all that and finally I have all jars in place for
  my Android app. The compilation and packaging of apk of the
  app with those jars sitting in the libs dir of the app takes 10-12
  mins and towards the end it gives an Eclipse internal error
  and it quits! I tried doing this outside Eclipse using ant and still
  the same result. I have the java heap params jacked up for
  -xmx and -xms to 256MB and still no luck. The jars sum up
  to 6MB and the actual app to 0.25MB. The individual library
  directories that use to compile each of the 3rd jars compile
  fairly fast.

  So I am wondering if anyone has any insights on this - is the
  Android plugin or in general the Android devices not meant to
  handle such large apks? Is there anything else I need to
  configure or look into to get this packaged?

  Thanks very much
  Demetris

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

2010-07-25 Thread Kumar Bibek
Not layout_gravity, but only gravity.

There are several other types of gravity which you can apply to any
view.

center|center_vertical|center_horizontal

And there are a few others. Try those out.
-Kumar Bibek
http://tech-droid.blogspot.com

On Jul 26, 2:38 am, harshe hars...@gmail.com wrote:
 I have a textview placed vertically in an activity.. I Want the text
 within the textview to be shown as bottom to top facing right side.
 Can anyone please help me out..
 my XML file is

 TextView
     android:layout_height=200dp
     android:layout_width=50dp
     android:paddingTop=100dp
     android:text=ALL
     android:textSize= 20px
     android:autoText=true
      android:paddingLeft=5dp
      android:layout_gravity=fill_vertical
   /

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


Re: [android-developers] Re: Large jars in Android

2010-07-25 Thread Mark Murphy
On Mon, Jul 26, 2010 at 12:53 AM, kypriakos demet...@ece.neu.edu wrote:
 Bouncycastle jdk14

Bouncy Castle is used internally by Android, and it is accessible via
the javax.crypto package. You may have difficulty having another
edition of that code in your project.

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

_Android Programming Tutorials_ Version 2.9 Available!

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


Re: [android-developers] Cursor that will work with query for 2 tables

2010-07-25 Thread Mark Murphy
On Mon, Jul 26, 2010 at 12:03 AM, Marc gobl...@gmail.com wrote:
 I have a little program that writes to a SQLite database with 4
 tables. When I do a query (either with rawQuery or
 SQLiteQueryBuilder.query) the cursor only has column's from the first
 table. Does anybody know how to do a query on 2 tables that have been
 joined on a key value?

Use rawQuery() instead of query().

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

_Android Programming Tutorials_ Version 2.9 Available!

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