[android-developers] Re: eclipse HELIOS (3.6) Code Assist very slow

2010-10-18 Thread JonFHancock
Thank you an infinite number of times!

I was going out of my way to not allow assists in cases where I knew
it would be slow.

On Oct 16, 12:06 pm, SChaser crotalistig...@gmail.com wrote:
 If you are using the JEE edition of HELIOS, the assists can be speeded
 up by turning off JAX-WS assist in the edit/advanced preference
 (Window-Preferences-Java-Editor-Content Assist-Advanced.

 It also appears that the assists cycle through a list of suggestion
 sources, starting with a different one each time, which would explain
 why the assists are not always slow.

 Seehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=317979

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

2010-10-18 Thread Dianne Hackborn
What are you running this on?  In the standard platform implementation this
is pretty much not possible.  (All it does is call into the activity manager
which returns whether one of its variables is non-null.)

On Sun, Oct 17, 2010 at 8:24 PM, George bipi...@gmail.com wrote:

 // Short Msg: java.lang.RuntimeException
 // Long Msg: java.lang.RuntimeException: Unknown exception code: 1 msg
 null
 ...
 // Build Changelist: 1681
 // Build Time: 1286811002000
 // java.lang.RuntimeException: Unknown exception code: 1 msg null
 //  at android.os.Parcel.readException(Parcel.java:1257)
 //  at android.os.Parcel.readException(Parcel.java:1235)
 //  at
 android.app.ActivityManagerProxy.isUserAMonkey(ActivityManagerNative.java:
 2754)
 //  at
 android.app.ActivityManager.isUserAMonkey(ActivityManager.java:990)

 I get the following exception when trying to use the isUserAMonkey API
 on a keydown.
mAM =
 (android.app.ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
if (mAM.isUserAMonkey()) {
return true;
}
 Any reason why this may be happening?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.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] Re: using instrumentation testing framework if there is more than one activity

2010-10-18 Thread Mathias Lin
Hi Andrei, not directly answering your question, but just want to
point you to www.robotium.org, which is a testing framework and does
tests across multiple activities.


On Oct 18, 11:02 am, Andrei gml...@gmail.com wrote:
 How do I use instrumentation testing framework to test flow between
 activities?
 The example goog gives is for one activity only
 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: setting background of an imagebutton to transparent

2010-10-18 Thread grace
HI,
i think it should be #00FF

On Oct 17, 6:06 pm, Kumar Bibek coomar@gmail.com wrote:
 #



 On Sun, Oct 17, 2010 at 6:14 PM, dashman erjdri...@gmail.com wrote:

         ImageButton android:id=@+id/button
                         android:src=@drawable/button
                         android:background=???
                         android:layout_gravity=center_vertical
                                 android:layout_width=wrap_content
                 android:layout_height=wrap_content /

  @android:color/transparent - and almost every permutation

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

 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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: Need I-phone app converted into an Android app.

2010-10-18 Thread whitemice
According to a demo I watched at the last Berlin droidcon, the latest
version of the Unity 3D engine supports outputting to Android.  I
suggest you take this up with Unity.

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

2010-10-18 Thread Hatch
Thanks.

I did that in the meantime and it works fine.
thx!

On Oct 13, 11:27 am, Kumar Bibek coomar@gmail.com wrote:
 Don't put your toolbar inside your flipper then So that it won't change
 when the flipper changes the views.





 On Wed, Oct 13, 2010 at 2:56 PM, Hatch tomislav.hecimo...@gmail.com wrote:
  Hi all.

  I have a fixed toolbar on the bottom of my screen and would like it to
  remain static while flipping through views.

  Is that possible ?

  Currently my flipper will change the whole screen including the
  toolbar (and a custom made view that displays the currently active
  view, those small circles with the active one slightly larger size and
  brighter color ).

  Regards,

  Tomislav

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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

 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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] Location API. Detecting proximity to a given point

2010-10-18 Thread Hatch
Hi all.

I would like to 'be notified' when the user enters a given range of
certain Geo point(s).

For instance, one point could be School. When User is within 500m of
the School he would get a notification (for example.)

Is this the way to go:

1) Turn on LocationListener in a background service and ask for
location update every 5 minutes (is that a lot?)
on location update:
2) check whether new location is better than the last one
3) calculate distance of current location and School location.
4) if within range: do something.

Am I transgressing something with such design ?

The Idea is to have a kind of a 'proximity sensor' to certain
predefined points.


Thank you.

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


Re: [android-developers] Location API. Detecting proximity to a given point

2010-10-18 Thread Filip Havlicek
Hi Hatch,

you can always try this
http://developer.android.com/reference/android/location/LocationManager.html#addProximityAlert(double,
double, float, long, android.app.PendingIntent) although I'm not sure about
battery consumption compared to your proposed method.

Best regards,
Filip Havlicek

2010/10/18 Hatch tomislav.hecimo...@gmail.com

 Hi all.

 I would like to 'be notified' when the user enters a given range of
 certain Geo point(s).

 For instance, one point could be School. When User is within 500m of
 the School he would get a notification (for example.)

 Is this the way to go:

 1) Turn on LocationListener in a background service and ask for
 location update every 5 minutes (is that a lot?)
 on location update:
 2) check whether new location is better than the last one
 3) calculate distance of current location and School location.
 4) if within range: do something.

 Am I transgressing something with such design ?

 The Idea is to have a kind of a 'proximity sensor' to certain
 predefined points.


 Thank you.

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

2010-10-18 Thread Amit Mangal
Hi Developers,
Hope you are doing great. I need your help.
Please any body let me know how to draw image on view at run time after 3sec
i want to disappear that images.

Thank you.

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

[android-developers] Re: Location API. Detecting proximity to a given point

2010-10-18 Thread Hatch
Wow, that's great!

I missed those docs.

Thank you.

On Oct 18, 10:45 am, Filip Havlicek havlicek.fi...@gmail.com wrote:
 Hi Hatch,

 you can always try 
 thishttp://developer.android.com/reference/android/location/LocationManag...,
 double, float, long, android.app.PendingIntent) although I'm not sure about
 battery consumption compared to your proposed method.

 Best regards,
 Filip Havlicek

 2010/10/18 Hatch tomislav.hecimo...@gmail.com



  Hi all.

  I would like to 'be notified' when the user enters a given range of
  certain Geo point(s).

  For instance, one point could be School. When User is within 500m of
  the School he would get a notification (for example.)

  Is this the way to go:

  1) Turn on LocationListener in a background service and ask for
  location update every 5 minutes (is that a lot?)
  on location update:
  2) check whether new location is better than the last one
  3) calculate distance of current location and School location.
  4) if within range: do something.

  Am I transgressing something with such design ?

  The Idea is to have a kind of a 'proximity sensor' to certain
  predefined points.

  Thank you.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@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] Should I use synchronized for a boolean variable

2010-10-18 Thread xeagle
Hi,

I use a boolean variable flag both in main and child thread. This
flag is used to notify child thread to exit. I only use simple
operation, e.g., flag=false, if (flag) {}. As I know, in java,
get and set a boolean variable is atomic. So synchronized is not
needed for variable flag, declaring flag as volatile is enough.

Is this still true in Android?

Thanks
Jason He

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


[android-developers] padding and margin

2010-10-18 Thread parag
what is the difference between padding and margin?

i want to draw a view exactly at  200 dip from the top of the
screen(0,0).
there are some layout in the middle.

how do i draw a view exactly at 200 dip from the top?

thanks
Parag

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

2010-10-18 Thread Elan Emerging Technologies PVT Ltd.
Elan Technologies, A Android App Development Company Now an “ISO
9001:2008 certified”


Elan Technologies gives customize software development services to
ensure that clients’ potentiality and market far exceeds their
competition.

We at Elan Technologies visualize instilling intense human values in
our team, and inculcating wisdom, logic and a keen judgment of ethical
code of conduct to create Intelligence immeasurable that can deliver
the best praiseworthy business solutions for our clients.

Benchmark Certification has given Elan Technologies ISO 9001:2008 for
providing Customized and personalized  E-business Application and
customized software solutions. Company believes that ISO 9001:2008 is
an important driver of quality. ISO 9001:2008 certification recognizes
organizations that can link business objectives with operating
effectiveness. ISO 9001:2008 is a Quality Management Standard. Use it
to establish, upgrade, and certify your organization's Quality
Management System.

Companies that achieve Management System certification to ISO
9001:2008 have demonstrated effective execution of documentation and
records management, top management’s dedication to their customers,
establishment of policy, good planning and execution, good resource
management, resourceful process control, measurement and analysis.
Continual improvement has been institutionalized.

This certificate signifies every moment of our hard work to transform
Elan Technologies into a reliable Company,

Our CEO says “It is excellence initiative; recertification is a team
effort touching the responsibilities and accountability of every
department in our organization.”

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

2010-10-18 Thread Marcin Orlowski
On 17 October 2010 11:04, pouya pouya.de...@gmail.com wrote:
 Hi
 i as i know we can change the installing location With android SDK ,
 using USB cable
 But i wanna know is it possible to change the installing location
 Programmatically? is it yes how??

No. You can (as of Froyo) allow user to install apps to SD card,
but you can't decide where it goes.

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

2010-10-18 Thread Amit
Dear Parag,

For the purposes of determining the boundaries of a background,
padding
is considered inside the widget (and so padding area gets the
background) and margin is outside the widget (and so does not get
the
background).

On Oct 18, 2:22 pm, parag parag.shetgaon...@gmail.com wrote:
 what is the difference between padding and margin?

 i want to draw a view exactly at  200 dip from the top of the
 screen(0,0).
 there are some layout in the middle.

 how do i draw a view exactly at 200 dip from the top?

 thanks
 Parag

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

2010-10-18 Thread parag
thanks amit..

On Oct 18, 2:44 pm, Amit amitmishr...@gmail.com wrote:
 Dear Parag,

 For the purposes of determining the boundaries of a background,
 padding
 is considered inside the widget (and so padding area gets the
 background) and margin is outside the widget (and so does not get
 the
 background).

 On Oct 18, 2:22 pm, parag parag.shetgaon...@gmail.com wrote:



  what is the difference between padding and margin?

  i want to draw a view exactly at  200 dip from the top of the
  screen(0,0).
  there are some layout in the middle.

  how do i draw a view exactly at 200 dip from the top?

  thanks
  Parag- 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] How to write String to database

2010-10-18 Thread pramod.deore
Hi, I had created a database and I am writing some values ino that
database as.

sampleDB.execSQL(INSERT INTO  +
SAMPLE_TABLE_NAME +
 Values ('s','m'););

Then here the values are added as s and m respectively.It is fine. But
now I don't want to use hard coded value like's' and 'm'. Now I have 2
String as.
String nm = Pramod;
String add = deore;

Now I want to add these 2 String to database. When I write code as
sampleDB.execSQL(INSERT INTO  +
SAMPLE_TABLE_NAME +
 Values (nm,add'););

Then I got error as -
10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
Open the database.

How to add String to database?
Thanks

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


Re: [android-developers] Should I use synchronized for a boolean variable

2010-10-18 Thread Daniel Drozdzewski
On Mon, Oct 18, 2010 at 10:21 AM, xeagle xeagle...@gmail.com wrote:
 Hi,

 I use a boolean variable flag both in main and child thread. This
 flag is used to notify child thread to exit. I only use simple
 operation, e.g., flag=false, if (flag) {}. As I know, in java,
 get and set a boolean variable is atomic. So synchronized is not
 needed for variable flag, declaring flag as volatile is enough.

 Is this still true in Android?

It is. Android follows JLS' Memory Model, hence volatile will behave
exactly as it does in 'normal' JVMs.
Please mind that in the second statement you mention if (flag) {},
you should not modify the flag beyond the if part of the statement.

There are plenty helpers in *java.util.concurrent.atomic* that will
help you achieve further atomicity without the use of locks and perils
of *volatile* :
http://developer.android.com/reference/java/util/concurrent/atomic/package-descr.html

Daniel






-- 
Daniel Drozdzewski

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


[android-developers] Please help to test my app on HTC wildfire.

2010-10-18 Thread EvgenyV
Hi all,

I've just reported that my app doesn't work on HTC wildfire. I'm
developing and testing on G1 and Motorola xt701 without issues.

Please test it on HTC wildfire and let me know whether I have any
generic problem with mentioned device.

My app is ConvertMe(Beta)

Many thanks,
Evgeny

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


[android-developers] prefetch database values

2010-10-18 Thread nimish khandelwal
hi...i m developing an app in which when incoming call will there on user
android mobile. my app will check it from database and if incoming number is
in blocked list.call will blocked.it is running successfully. but
is there a way so that i can prefetch database value in an XML file or any
other way, becoz if user got 100 calls a day it will always connect to
server ,which is not possible every time.
so plz help me how could i implement this.


regards
nimi

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

Re: [android-developers] Re: I'm so confused with this problem~~~about urlConnection

2010-10-18 Thread xc s
其实官方上的例子灰常好.不好意思.我普通法不好.代码有好多.可以在code.google.com下

2010/10/18, Amy Wu geish...@gmail.com:
 First I want to thanks Veritatis's response.
 I want to deal the problem not because I think I'm good at Android, but
 I want to study.
 So for me, just read the code is very difficult,if tell me where you can
 go in your code,it will be help more.

 Last, I'm so sorry for my poor English,but I'll try best to write
 correctly, so please help me.

 Thanks all of your kinds.

 Amy Wu
 geish...@gmail.com

 On 2010-10-18 8:59, Indicator Veritatis wrote:
 People are more likely to help you out if you show that you have
 already done at least this much investigation on your own before
 posting.

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

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


Re: [android-developers] prefetch database values

2010-10-18 Thread A N K ! T
why dont you save the same blocked numbers in a local DB.

On Mon, Oct 18, 2010 at 3:34 PM, nimish khandelwal nimishk...@gmail.comwrote:

 hi...i m developing an app in which when incoming call will there on user
 android mobile. my app will check it from database and if incoming number is
 in blocked list.call will blocked.it is running successfully. but
 is there a way so that i can prefetch database value in an XML file or any
 other way, becoz if user got 100 calls a day it will always connect to
 server ,which is not possible every time.
 so plz help me how could i implement this.


 regards
 nimi

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




-- 

 A N K ! T..

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

Re: [android-developers] How to write String to database

2010-10-18 Thread Evgeny V
insert into my_table_name (string_type_column_name1,
integer_type_column_name2) values('string_value1', 777)


On Mon, Oct 18, 2010 at 11:46 AM, pramod.deore deore.pramo...@gmail.comwrote:

 Hi, I had created a database and I am writing some values ino that
 database as.

 sampleDB.execSQL(INSERT INTO  +
SAMPLE_TABLE_NAME +
 Values ('s','m'););

 Then here the values are added as s and m respectively.It is fine. But
 now I don't want to use hard coded value like's' and 'm'. Now I have 2
 String as.
 String nm = Pramod;
 String add = deore;

 Now I want to add these 2 String to database. When I write code as
 sampleDB.execSQL(INSERT INTO  +
SAMPLE_TABLE_NAME +
 Values (nm,add'););

 Then I got error as -
 10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
 s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
 10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
 Open the database.

 How to add String to database?
 Thanks

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

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

[android-developers] Re: layout problem

2010-10-18 Thread dashman

thanks - that was the problem.

but this seems like a layout bug.

if i have a LinearLayout with 3 elements in them
with the 1st and 3rd with layout_width of wrap_content and then
middle one with fill_parent. it seems relatively clear what i
want done. the middle element will take all the space after
the 1st and 3rd widths have been allocated.

even if i do a wrap_content, it doesn't work - tablelayout takes
the full rest of the row.

the only way it works - is with a hard pixel amount.

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

2010-10-18 Thread dashman

on further researh, it was the stretchColumns inside the
tablelayout - causing the problem

TableLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:stretchColumns=1

but again, that attribute should be subservient to the layout_width.

if i set the width to wrap_content - it still strectches even though
the content width is quite a bit less than the remaining width.

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


[android-developers] Problem in creating sound notifications

2010-10-18 Thread Suresh Pal
Hello Guys,

I am creating one notification based on some event. This notification
will only create sound. I just want to generate the sound using this
notification, but no UI.
Following is my code for this:
 // make notification sound whenever the device is connected or
disconnected
Notification notification = new Notification();
notification.defaults |= Notification.DEFAULT_SOUND;
notification.flags = Notification.FLAG_AUTO_CANCEL;
NotificationManager manager = (NotificationManager)
mContext.getSystemService(Context.NOTIFICATION_SERVICE);
// notify to all,
manager.notify(0, notification);

I am facing few problems and have some doubts. I tried to search for
answers in this post but could not find, so I am posting here for your
people's suggestions:
1. Here I am using 0 as id for the notification. Is it good in
practice. Since, I dont want to that this notification conflicts with
other.
2. I have one doubt, about notificaiton ids, e.g. if i keep my
notifications id as 1 and some other application also have set that as
1. In that case, will my notification be updated. or Android treats,
application's notifications differently.
3. Is it necessary to add FLAG_AUTO_CANCEL flag in my notification.
Because, I think this is used when notification will appear in the
status bar. But in my case, I have no UI. It means nothing will appear
in status bar.
4. Currently there is one problem. When my notification makes sound,
sometimes it seems that it is supressed or destorted by any other
sound or event. I am not sure what is happening there. So, If anyone
of you have some idea that will be helpful.

Await for your suggestions and help.

Thanks,

Suresh Pal

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

2010-10-18 Thread Hatch
One more thing (looks related enough not to start a new topic:)

The Location manager triggers the appropriate intents just fine (way
to go !), but it seems I have to manually match with the original
location.

For instance, I request 'proximity reporting' to locations A, B, and C
but by their parameters (lon, lat, and radius)
The Location manager will trigger the proximity entering and provide
me with location X.

So now I need to run through all my locations to match which one's
boundaries have been transgressed.

Am I missing something, or that's the only way ?

Thanks again.


On Oct 18, 10:51 am, Hatch tomislav.hecimo...@gmail.com wrote:
 Wow, that's great!

 I missed those docs.

 Thank you.

 On Oct 18, 10:45 am, Filip Havlicek havlicek.fi...@gmail.com wrote:



  HiHatch,

  you can always try 
  thishttp://developer.android.com/reference/android/location/LocationManag...,
  double, float, long, android.app.PendingIntent) although I'm not sure about
  battery consumption compared to your proposed method.

  Best regards,
  Filip Havlicek

  2010/10/18Hatchtomislav.hecimo...@gmail.com

   Hi all.

   I would like to 'be notified' when the user enters a given range of
   certain Geo point(s).

   For instance, one point could be School. When User is within 500m of
   the School he would get a notification (for example.)

   Is this the way to go:

   1) Turn on LocationListener in a background service and ask for
   location update every 5 minutes (is that a lot?)
   on location update:
   2) check whether new location is better than the last one
   3) calculate distance of current location and School location.
   4) if within range: do something.

   Am I transgressing something with such design ?

   The Idea is to have a kind of a 'proximity sensor' to certain
   predefined points.

   Thank you.

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
cr...@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] How to write String to database

2010-10-18 Thread Kostya Vasilyev

 Parmod,

There are several ways to do this:

1. Build the SQL statement string to include values:

String mysql = INSERT INTO  + SAMPLE_TABLE_NAME =   VALUES (' + nm + 
', ' + add + ');


The variable will get this value:

INSERT INTO whatever_your_table_name_is VALUES ('Pramod', 'Deore')

2. Use what's called variable binding to supply values:

SQLiteDatabase database = whatever;
SQLiteStatement stmt = database.compileStatement(INSERT INTO  + 
SAMPLE_TABLE_NAME +  VALUES (?, ?);


for ( insert many values  ) {
stmt.bindString(1, valueForColumn1);
stmt.bindLong(2, valueForColumn2);

long newRowId = stmt.executeInsert();
}

The second way is preferred for several reasons:

- If you insert several rows, each insert runs faster than technique #1.
- It uses less memory inside MySQL
- It is secure - the user can supply malicious values, and you don't 
take special care to detect or escape them, the first technique can 
result in the execution of arbitrary SQL statements



http://developer.android.com/reference/android/database/sqlite/SQLiteStatement.html
http://developer.android.com/reference/android/database/sqlite/SQLiteProgram.html

-- Kostya

18.10.2010 14:26, Evgeny V ?:
insert into my_table_name (string_type_column_name1, 
integer_type_column_name2) values('string_value1', 777)



On Mon, Oct 18, 2010 at 11:46 AM, pramod.deore 
deore.pramo...@gmail.com mailto:deore.pramo...@gmail.com wrote:


Hi, I had created a database and I am writing some values ino that
database as.

sampleDB.execSQL(INSERT INTO  +
   SAMPLE_TABLE_NAME +
Values ('s','m'););

Then here the values are added as s and m respectively.It is fine. But
now I don't want to use hard coded value like's' and 'm'. Now I have 2
String as.
String nm = Pramod;
String add = deore;

Now I want to add these 2 String to database. When I write code as
sampleDB.execSQL(INSERT INTO  +
   SAMPLE_TABLE_NAME +
Values (nm,add'););

Then I got error as -
10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
Open the database.

How to add String to database?
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
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-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 



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

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

[android-developers] Re: How to write String to database

2010-10-18 Thread pramod.deore

Hey Evgeny Thanks for reply. But I don't get it. See i have two
strings as String nm,add. Now I want to add these strings to my table
which name is SAMPLE_TABLE_NAME. How to do that?

On Oct 18, 3:26 pm, Evgeny V evgen...@gmail.com wrote:
 insert into my_table_name (string_type_column_name1,
 integer_type_column_name2) values('string_value1', 777)

 On Mon, Oct 18, 2010 at 11:46 AM, pramod.deore 
 deore.pramo...@gmail.comwrote:

  Hi, I had created a database and I am writing some values ino that
  database as.

  sampleDB.execSQL(INSERT INTO  +
                                 SAMPLE_TABLE_NAME +
                                  Values ('s','m'););

  Then here the values are added as s and m respectively.It is fine. But
  now I don't want to use hard coded value like's' and 'm'. Now I have 2
  String as.
  String nm = Pramod;
  String add = deore;

  Now I want to add these 2 String to database. When I write code as
  sampleDB.execSQL(INSERT INTO  +
                                 SAMPLE_TABLE_NAME +
                                  Values (nm,add'););

  Then I got error as -
  10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
  s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
  10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
  Open the database.

  How to add String to database?
  Thanks

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



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


[android-developers] Re: How to write String to database

2010-10-18 Thread pramod.deore
Hi Kostya Thanks.

On Oct 18, 3:59 pm, pramod.deore deore.pramo...@gmail.com wrote:
 Hey Evgeny Thanks for reply. But I don't get it. See i have two
 strings as String nm,add. Now I want to add these strings to my table
 which name is SAMPLE_TABLE_NAME. How to do that?

 On Oct 18, 3:26 pm, Evgeny V evgen...@gmail.com wrote:

  insert into my_table_name (string_type_column_name1,
  integer_type_column_name2) values('string_value1', 777)

  On Mon, Oct 18, 2010 at 11:46 AM, pramod.deore 
  deore.pramo...@gmail.comwrote:

   Hi, I had created a database and I am writing some values ino that
   database as.

   sampleDB.execSQL(INSERT INTO  +
                                  SAMPLE_TABLE_NAME +
                                   Values ('s','m'););

   Then here the values are added as s and m respectively.It is fine. But
   now I don't want to use hard coded value like's' and 'm'. Now I have 2
   String as.
   String nm = Pramod;
   String add = deore;

   Now I want to add these 2 String to database. When I write code as
   sampleDB.execSQL(INSERT INTO  +
                                  SAMPLE_TABLE_NAME +
                                   Values (nm,add'););

   Then I got error as -
   10-18 15:15:14.464: ERROR/Database(21408): Failure 1 (no such column:
   s) on 0x2fb288 when preparing 'INSERT INTO App Values (s,m);'.
   10-18 15:15:14.473: ERROR/ShowSwitches(21408): Could not create or
   Open the database.

   How to add String to database?
   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: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-10-18 Thread Kostya Vasilyev

 18.10.2010 4:54, perumal316 пишет:

Hi Kostya,

Yes, I am referring to WiFi as the particular network. But,

 You can monitor WiFi state, and just not do any networking while
it's not active...


You can monitor WiFi state using Broadcast Actions defined here:

http://developer.android.com/reference/android/net/wifi/WifiManager.html

or here:

http://developer.android.com/reference/android/net/ConnectivityManager.html

-I don't understand how to do this. Through an app? You can monitor
the WiFi state, but how to not do any networking?


Um, now it's my turn to not understand.

If this is your own application, you can tell it what to do (and not 
do), right?


-- Kostya


Regards,
Perumal


On Oct 18, 3:16 am, Kostya Vasilyevkmans...@gmail.com  wrote:

   If by particular network you mean WiFi vs. cellular, then yes.

You can monitor WiFi state, and just not do any networking while it's
not active...

Notifying the user that your app is doing this might be a good idea, too
- so he can take the phone in hand and run towards the nearest WiFi hotspot.

-- Kostya

17.10.2010 17:36, perumal316 пишет:






I am just wondering. Is it possible to make all data connection to a
particular network only?
Meaning even if 3G will be available it will only connect to a
particular network for all data related processing.
Regards,
Perumal
On Oct 15, 9:34 pm, Jensdunkingbikk...@gmail.comwrote:

Afaik - Android 2.1 has a bug related to hipri data, it *only* works
for Android 2.2 and later. That said, your probably better off asking
the user to turn of WiFi before using your app - or restrict it to sdk
level 8 and higher.
On 11 Okt, 17:38, Steven PERRAUDINunsee...@gmail.comwrote:

On 31 août, 13:36, Jensdunkingbikk...@gmail.comwrote:With Android 
2.2 you can route data over the 3G connection explicitly

while still using WiFi. The feature exists in Android 2.1 also but is
*broken* as the high-priority 3G data connection is torn down
incorrectly almost directly.

How do you get 3G and WiFi connected at the same time ?
So is this possible in Android 2.1 to route either to 3G or WiFi ?
If both interfaces are connected to a separate network, a simple
change of routing table would allow to choose the interface to send/
receive data no ? Or is there a simpler way to achieve this.

--
Kostya Vasilyev -- WiFi Manager + pretty widget 
--http://kmansoft.wordpress.com- Hide quoted text -

- Show quoted text -



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

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


Re: [android-developers] Re: OutOfMemoryError

2010-10-18 Thread Kostya Vasilyev

 I know this is going to sound sacrilegious, but:

If you have only one bitmap as the background, why free it at all?

As you already found out, its memory doesn't seem to be freed, so it's 
not going to help other applications after you've paused yours.


If Android runs into a out-of-memory situation, it will kill the entire 
process, freeing the bitmap along with everything else.


-- Kostya

18.10.2010 5:16, Lisa пишет:

hi, thank you very much、for your answers. (⌒.⌒)/

I moved recycle in onStop.

thanks, was solved this problem, the bitmap.
Canvas: trying to use a recycled bitmap
android.graphics.bit...@437d8e60
thank you very very much. (@⌒.⌒@)/

but OutOffMemory problems is cotinue. (;>_<;)
please, it can also help me. (つД`;)ふぇ~ん
m(_ _)m






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

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


Re: [android-developers] padding and margin

2010-10-18 Thread Kostya Vasilyev

 There are many ways, one is to use

layout_marginTop=200dp

for that particular view.

18.10.2010 13:22, parag пишет:

i want to draw a view exactly at  200 dip from the top of the
screen(0,0).
there are some layout in the middle.

how do i draw a view exactly at 200 dip from the top?



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

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


[android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-10-18 Thread perumal316
Hi Kostya,

I meant if I am connected to wifi, how to make sure other apps
requiring network access will only connect to the wifi I am connected
to and do not use the 3G network?

My app will only ensure I am connected to the wifi but can it control
the network system of the Android system? Meaning if I am going to
send a MMS and am connected to my preferred wifi using my app, can my
app prevent it from not switching to the 3G network?

Thanks and Regards,
Perumal

On Oct 18, 7:05 pm, Kostya Vasilyev kmans...@gmail.com wrote:
   18.10.2010 4:54, perumal316 пишет:

  Hi Kostya,

  Yes, I am referring to WiFi as the particular network. But,

   You can monitor WiFi state, and just not do any networking while
  it's not active...

 You can monitor WiFi state using Broadcast Actions defined here:

 http://developer.android.com/reference/android/net/wifi/WifiManager.html

 or here:

 http://developer.android.com/reference/android/net/ConnectivityManage...

  -I don't understand how to do this. Through an app? You can monitor
  the WiFi state, but how to not do any networking?

 Um, now it's my turn to not understand.

 If this is your own application, you can tell it what to do (and not
 do), right?

 -- Kostya





  Regards,
  Perumal

  On Oct 18, 3:16 am, Kostya Vasilyevkmans...@gmail.com  wrote:
     If by particular network you mean WiFi vs. cellular, then yes.

  You can monitor WiFi state, and just not do any networking while it's
  not active...

  Notifying the user that your app is doing this might be a good idea, too
  - so he can take the phone in hand and run towards the nearest WiFi 
  hotspot.

  -- Kostya

  17.10.2010 17:36, perumal316 пишет:

  I am just wondering. Is it possible to make all data connection to a
  particular network only?
  Meaning even if 3G will be available it will only connect to a
  particular network for all data related processing.
  Regards,
  Perumal
  On Oct 15, 9:34 pm, Jensdunkingbikk...@gmail.com    wrote:
  Afaik - Android 2.1 has a bug related to hipri data, it *only* works
  for Android 2.2 and later. That said, your probably better off asking
  the user to turn of WiFi before using your app - or restrict it to sdk
  level 8 and higher.
  On 11 Okt, 17:38, Steven PERRAUDINunsee...@gmail.com    wrote:
  On 31 août, 13:36, Jensdunkingbikk...@gmail.com    wrote:    With 
  Android 2.2 you can route data over the 3G connection explicitly
  while still using WiFi. The feature exists in Android 2.1 also but is
  *broken* as the high-priority 3G data connection is torn down
  incorrectly almost directly.
  How do you get 3G and WiFi connected at the same time ?
  So is this possible in Android 2.1 to route either to 3G or WiFi ?
  If both interfaces are connected to a separate network, a simple
  change of routing table would allow to choose the interface to send/
  receive data no ? Or is there a simpler way to achieve this.
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com-Hide quoted text -

  - Show quoted text -

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.com- 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: Animated background drawable

2010-10-18 Thread oriharel
Is this just for cross-fade?
can the transition be a slide and not fade?

On Oct 6, 2:19 pm, Kumar Bibek coomar@gmail.com wrote:
 Look at Transition Drawables.

 http://developer.android.com/guide/topics/resources/drawable-resource...





 On Wed, Oct 6, 2010 at 5:45 PM, oriharel ori.ha...@gmail.com wrote:
  Just like Twitter for android used to have (they removed it) - I need
  to display an animated background drawable.

  How to I show an image that is actually bigger then the given layout
  dimensions (without the image being shrink).

  What kind of animation do I need to use for the moving effect?

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

 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.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] XmlPullParser and CDATA

2010-10-18 Thread Neilz
Hi all. I'm using XmlPullParser The content I'm parsing has elements
containing CDATA, like:

abstract
 ![CDATA[
  Some text here.
  ]]
   /abstract

The parser ignores anything within the CDATA, however I actually want
it to continue parsing, as the data within contains tags which I need
to grab. Is there a way of telling the parser not to ignore these
sections?

Thanks.

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


Re: [android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-10-18 Thread Julie Andrews
A group of alumni, highly established in their careers, got together to
visit their old university lecturer. Conversation soon turned into
complaints about stress in work and life.

Offering his guests coffee, the lecturer went to the kitchen and returned
with a large pot of coffee and an assortment of cups: porcelain, plastic,
glass, some plain-looking and some expensive and exquisite, telling them to
help themselves to hot coffee.

When all the students had a cup of coffee in hand, the lecturer said: “If
you noticed, all the nice-looking, expensive cups were taken up, leaving
behind the plain and cheap ones. While it is but normal for you to want only
the best for yourselves, that is the source of your problems and stress.
What all of you really wanted was coffee, not the cup, but you consciously
went for the better cups and are eyeing each other’s cups.”

“Now, if Life is coffee, then the jobs, money and position in society are
the cups. They are just tools to hold and contain Life, but the quality of
Life doesn’t change.” “Sometimes, by concentrating only on the cup, we fail
to enjoy the coffee in it.”

So folks, don’t let the cups drive you… enjoy the coffee instead

On Mon, Oct 18, 2010 at 4:35 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  18.10.2010 4:54, perumal316 пишет:

  Hi Kostya,

 Yes, I am referring to WiFi as the particular network. But,

  You can monitor WiFi state, and just not do any networking while
 it's not active...


 You can monitor WiFi state using Broadcast Actions defined here:

 http://developer.android.com/reference/android/net/wifi/WifiManager.html

 or here:

 http://developer.android.com/reference/android/net/ConnectivityManager.html

  -I don't understand how to do this. Through an app? You can monitor
 the WiFi state, but how to not do any networking?


 Um, now it's my turn to not understand.

 If this is your own application, you can tell it what to do (and not do),
 right?

 -- Kostya


  Regards,
 Perumal


 On Oct 18, 3:16 am, Kostya Vasilyevkmans...@gmail.com  wrote:

   If by particular network you mean WiFi vs. cellular, then yes.

 You can monitor WiFi state, and just not do any networking while it's
 not active...

 Notifying the user that your app is doing this might be a good idea, too
 - so he can take the phone in hand and run towards the nearest WiFi
 hotspot.

 -- Kostya

 17.10.2010 17:36, perumal316 пишет:





  I am just wondering. Is it possible to make all data connection to a
 particular network only?
 Meaning even if 3G will be available it will only connect to a
 particular network for all data related processing.
 Regards,
 Perumal
 On Oct 15, 9:34 pm, Jensdunkingbikk...@gmail.comwrote:

 Afaik - Android 2.1 has a bug related to hipri data, it *only* works
 for Android 2.2 and later. That said, your probably better off asking
 the user to turn of WiFi before using your app - or restrict it to sdk
 level 8 and higher.
 On 11 Okt, 17:38, Steven PERRAUDINunsee...@gmail.comwrote:

 On 31 août, 13:36, Jensdunkingbikk...@gmail.comwrote:With
 Android 2.2 you can route data over the 3G connection explicitly

 while still using WiFi. The feature exists in Android 2.1 also but is
 *broken* as the high-priority 3G data connection is torn down
 incorrectly almost directly.

 How do you get 3G and WiFi connected at the same time ?
 So is this possible in Android 2.1 to route either to 3G or WiFi ?
 If both interfaces are connected to a separate network, a simple
 change of routing table would allow to choose the interface to send/
 receive data no ? Or is there a simpler way to achieve this.

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com- Hide quoted text -

 - Show quoted text -



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

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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.com/

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

Re: [android-developers] Re: Animated background drawable

2010-10-18 Thread Mark Murphy
On Mon, Oct 18, 2010 at 7:35 AM, oriharel ori.ha...@gmail.com wrote:
 Is this just for cross-fade?
 can the transition be a slide and not fade?

AnimationDrawable is a series of frames, each as a PNG (or JPEG, I
presume). You can draw your PNG files however you like.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2010-10-18 Thread Mark Murphy
If you use nextToken(), you should get a CDSECT token for the CDATA
section. However, AFAIK, it will not parse inside of the CDATA.

On Mon, Oct 18, 2010 at 7:37 AM, Neilz neilhorn...@gmail.com wrote:
 Hi all. I'm using XmlPullParser The content I'm parsing has elements
 containing CDATA, like:

 abstract
     ![CDATA[
          Some text here.
          ]]
   /abstract

 The parser ignores anything within the CDATA, however I actually want
 it to continue parsing, as the data within contains tags which I need
 to grab. Is there a way of telling the parser not to ignore these
 sections?

 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




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

Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] overriding a theme with external xml

2010-10-18 Thread poohtbear
I was wondering, if i'm to create a set of down-loadable themes , how
can i apply those themes to my Current activity ? all my activities ?

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


Re: [android-developers] overriding a theme with external xml

2010-10-18 Thread Julie Andrews
A man wanted to enter an exclusive club but did not know the password that
was required. He waited by the door and listened. A club member knocked on
the door and the doorman said, “twelve.” The member replied, “six ” and was
let in. A second member came to the door and the doorman said, “six.” The
member replied, “three” and was let in. The man thought he had heard enough
and walked up to the door. The doorman said ,”ten” and the man replied,
“five.” But he was not let in.
What should have he said?

On Mon, Oct 18, 2010 at 5:25 PM, poohtbear eyaltg...@gmail.com wrote:

 I was wondering, if i'm to create a set of down-loadable themes , how
 can i apply those themes to my Current activity ? all my activities ?

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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.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: XmlPullParser and CDATA

2010-10-18 Thread Neilz
Mark, I was looking at this in the docs, but I'm confused by it.
nextToken() returns an int, right, which I can identify as CDSECT. But
I don't quite get how that gives me the text within the CDATA...?

On Oct 18, 12:43 pm, Mark Murphy mmur...@commonsware.com wrote:
 If you use nextToken(), you should get a CDSECT token for the CDATA
 section. However, AFAIK, it will not parse inside of the CDATA.

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

2010-10-18 Thread poohtbear
First answer mine, then i'll try to answer yours :-)

On Oct 18, 1:59 pm, Julie Andrews julieonli...@gmail.com wrote:
 A man wanted to enter an exclusive club but did not know the password that
 was required. He waited by the door and listened. A club member knocked on
 the door and the doorman said, “twelve.” The member replied, “six ” and was
 let in. A second member came to the door and the doorman said, “six.” The
 member replied, “three” and was let in. The man thought he had heard enough
 and walked up to the door. The doorman said ,”ten” and the man replied,
 “five.” But he was not let in.
 What should have he said?

 On Mon, Oct 18, 2010 at 5:25 PM, poohtbear eyaltg...@gmail.com wrote:
  I was wondering, if i'm to create a set of down-loadable themes , how
  can i apply those themes to my Current activity ? all my activities ?

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

 --
 Juliehttp://tradinglogically.blogspot.comhttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blogspot.com/

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


Re: [android-developers] XmlPullParser and CDATA

2010-10-18 Thread Julie Andrews
Paul’s height is six feet, he’s an assistant at a butcher’s shop, and wears
size 9 shoes. What does he weigh?
ans: - .
.
.
.
.
.
.
.
.
meat

On Mon, Oct 18, 2010 at 5:13 PM, Mark Murphy mmur...@commonsware.comwrote:

 If you use nextToken(), you should get a CDSECT token for the CDATA
 section. However, AFAIK, it will not parse inside of the CDATA.

 On Mon, Oct 18, 2010 at 7:37 AM, Neilz neilhorn...@gmail.com wrote:
  Hi all. I'm using XmlPullParser The content I'm parsing has elements
  containing CDATA, like:
 
  abstract
  ![CDATA[
   Some text here.
   ]]
/abstract
 
  The parser ignores anything within the CDATA, however I actually want
  it to continue parsing, as the data within contains tags which I need
  to grab. Is there a way of telling the parser not to ignore these
  sections?
 
  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
 



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

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.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: Animated background drawable

2010-10-18 Thread oriharel
but how do I control the transition of items in the AnimationDrawable?

in fact, that might deviate from my real purpose.

What I really what is to create an animated background to my activity.
one that the Twitter-For-Android used, initially.
Romain suggested to use a custom drawable or a custom view, but I need
some more guidance there.

1. how to have an image, that is bigger then the container's size, set
as the background/src without it being shrunk (just show part of the
image if necessary).
2. how to have it in motion repeatedly.

for number 1 - I don't have any idea yet (is there a property for
that?)
for number 2 - I tried stuff like translate animation and
TranslateDrawable, but those are not what I'm looking for. (or am I
wrong...?)

thanks!

Ori


On Oct 18, 1:41 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Oct 18, 2010 at 7:35 AM, oriharel ori.ha...@gmail.com wrote:
  Is this just for cross-fade?
  can the transition be a slide and not fade?

 AnimationDrawable is a series of frames, each as aPNG(or JPEG, I
 presume). You can draw yourPNGfiles however you like.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

2010-10-18 Thread Julie Andrews
When you have me, you feel like sharing me. But, if you do share me, you
don’t have me. What am I?

On Wed, Oct 6, 2010 at 5:45 PM, oriharel ori.ha...@gmail.com wrote:

 Just like Twitter for android used to have (they removed it) - I need
 to display an animated background drawable.

 How to I show an image that is actually bigger then the given layout
 dimensions (without the image being shrink).

 What kind of animation do I need to use for the moving effect?

 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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.com/

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

Re: [android-developers] Re: Can Android 2.X connect to 3G and Wifi data networks simultaneously?

2010-10-18 Thread Kostya Vasilyev

 Perumal,

Tethering and internal APIs aside, there is only one active network 
connection. If the phone is currently connected to WiFi, then network 
traffic from all applications goes through that.


Don't know the answer to your MMS quesiton.

-- Kostya

18.10.2010 15:31, perumal316 пишет:

Hi Kostya,

I meant if I am connected to wifi, how to make sure other apps
requiring network access will only connect to the wifi I am connected
to and do not use the 3G network?

My app will only ensure I am connected to the wifi but can it control
the network system of the Android system? Meaning if I am going to
send a MMS and am connected to my preferred wifi using my app, can my
app prevent it from not switching to the 3G network?

Thanks and Regards,
Perumal

On Oct 18, 7:05 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

   18.10.2010 4:54, perumal316 пишет:


Hi Kostya,
Yes, I am referring to WiFi as the particular network. But,
 You can monitor WiFi state, and just not do any networking while
it's not active...

You can monitor WiFi state using Broadcast Actions defined here:

http://developer.android.com/reference/android/net/wifi/WifiManager.html

or here:

http://developer.android.com/reference/android/net/ConnectivityManage...


-I don't understand how to do this. Through an app? You can monitor
the WiFi state, but how to not do any networking?

Um, now it's my turn to not understand.

If this is your own application, you can tell it what to do (and not
do), right?

-- Kostya






Regards,
Perumal
On Oct 18, 3:16 am, Kostya Vasilyevkmans...@gmail.comwrote:

If by particular network you mean WiFi vs. cellular, then yes.
You can monitor WiFi state, and just not do any networking while it's
not active...
Notifying the user that your app is doing this might be a good idea, too
- so he can take the phone in hand and run towards the nearest WiFi hotspot.
-- Kostya
17.10.2010 17:36, perumal316 пишет:

I am just wondering. Is it possible to make all data connection to a
particular network only?
Meaning even if 3G will be available it will only connect to a
particular network for all data related processing.
Regards,
Perumal
On Oct 15, 9:34 pm, Jensdunkingbikk...@gmail.com  wrote:

Afaik - Android 2.1 has a bug related to hipri data, it *only* works
for Android 2.2 and later. That said, your probably better off asking
the user to turn of WiFi before using your app - or restrict it to sdk
level 8 and higher.
On 11 Okt, 17:38, Steven PERRAUDINunsee...@gmail.com  wrote:

On 31 août, 13:36, Jensdunkingbikk...@gmail.com  wrote:  With 
Android 2.2 you can route data over the 3G connection explicitly

while still using WiFi. The feature exists in Android 2.1 also but is
*broken* as the high-priority 3G data connection is torn down
incorrectly almost directly.

How do you get 3G and WiFi connected at the same time ?
So is this possible in Android 2.1 to route either to 3G or WiFi ?
If both interfaces are connected to a separate network, a simple
change of routing table would allow to choose the interface to send/
receive data no ? Or is there a simpler way to achieve this.

--
Kostya Vasilyev -- WiFi Manager + pretty widget 
--http://kmansoft.wordpress.com-Hide quoted text -
- Show quoted text -

--
Kostya Vasilyev -- WiFi Manager + pretty widget 
--http://kmansoft.wordpress.com- Hide quoted text -

- Show quoted text -



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

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


Re: [android-developers] Re: Animated background drawable

2010-10-18 Thread Mark Murphy
On Mon, Oct 18, 2010 at 8:10 AM, oriharel ori.ha...@gmail.com wrote:
 but how do I control the transition of items in the AnimationDrawable?

You design your frames appropriately. Frame animations are roughly
equivalent to animated GIFs in this respect.

 What I really what is to create an animated background to my activity.
 one that the Twitter-For-Android used, initially.

I have no idea what you are referring to, as I do not use the Android
Twitter app, and so have never seen whatever animated effect you are
referring to.

 1. how to have an image, that is bigger then the container's size, set
 as the background/src without it being shrunk (just show part of the
 image if necessary).

You could use RelativeLayout and have your background simply be the
earliest child of the RelativeLayout, so everything else stacks on top
of it.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2010-10-18 Thread Mark Murphy
On Mon, Oct 18, 2010 at 8:05 AM, Neilz neilhorn...@gmail.com wrote:
 Mark, I was looking at this in the docs, but I'm confused by it.
 nextToken() returns an int, right, which I can identify as CDSECT. But
 I don't quite get how that gives me the text within the CDATA...?

Use getText() or getTextCharacters(). From the nextToken() documentation:

Here is the list of tokens that can be returned from nextToken() and
what getText() and getTextCharacters() returns:
...
CDSECT: return text inside CDATA (ex. 'foo' from !CDATA[foo]])

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2010-10-18 Thread Julie Andrews
Which is the longest word in English?
Smiles – Because a ‘mile’ exists between the two S’s. While that is a good
answer to the riddle, the actual longest English word is
‘floccinaucinihilipilification’- which means’to describe something as
worthless, or turning something into being worthless by deprecating it.’

On Tue, Oct 12, 2010 at 5:07 PM, Lisa lpk...@gmail.com wrote:

 Hi, My name is Lisa .
 I am studying Android development.

 So I have a problem

 It immediately has trouble with memory.
 In the LogCat this error is displayed,

  java.lang.OutOfMemoryError: bitmap size exceeds VM budget

 I'm using recycle () and System.gc ()  but I get the same error.
 My application, is pressing a button switches to the next image and
 the images are 854x480
 Loading images from the SD Card.
 show the images as follows

 Bitmap imageB;
 ImageView imgV;

 imageB = BitmapFactory.decodeFile (sdcard / img.png);
 imgV.setImageBitmap (imageB);

 Release is as follow.

 @ Override
 protected void onDestroy () {
super.onPause ();
imageBG = null;
System.gc ();

 }

 please help me out to solve the issu.
 sorry for my bad English

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.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] ScrollView Problem

2010-10-18 Thread zeeshan mirza
Hello Friends,
I am having a scrollview problem. There are 2 EditText fields which
are broken. here is my layout file. Please let me know how can i solve
it.

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_height=wrap_content android:layout_width=fill_parent
 ScrollView
android:id=@+id/ScrollView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginBottom=50dip 
RelativeLayout
android:id=@+id/layoutR
android:layout_width=fill_parent
android:layout_height=wrap_content
ImageView
android:id=@+id/galleryPic
android:layout_width=140px
android:layout_height=175px
android:background=#ff66 /
TextView
android:id=@+id/lblmail
android:layout_width=wrap_content
android:layout_height=21px
android:layout_alignParentTop=true
android:layout_marginLeft=5dip
android:text=E_mail:
android:typeface=serif
android:textStyle=bold

android:layout_toRightOf=@+id/galleryPic/
EditText
android:id=@+id/txt_email
android:layout_width=170px
android:layout_height=32px
android:layout_marginLeft=5dip
android:hint=e-mail
android:maxLines=1
android:textSize=10sp
android:typeface=serif
android:textStyle=bold

android:layout_toRightOf=@+id/galleryPic
android:layout_below=@+id/lblmail/
TextView
android:id=@+id/lblpass
android:layout_width=wrap_content
android:layout_height=21px
android:layout_marginLeft=5dip
android:text=Password:
android:typeface=serif
android:textStyle=bold

android:layout_toRightOf=@+id/galleryPic
android:layout_below=@+id/txt_email/
EditText
android:id=@+id/txt_pass
android:layout_width=170px
android:layout_height=32px
android:password=true
android:maxLines=1
android:layout_marginLeft=5dip
android:hint=password
android:textSize=10sp
android:typeface=serif
android:textStyle=bold

android:layout_toRightOf=@+id/galleryPic
android:layout_below=@+id/lblpass/
TextView
android:id=@+id/lblrepass
android:layout_width=wrap_content
android:layout_height=21px
android:layout_marginLeft=5dip
android:text=Re-Password:
android:typeface=serif
android:textStyle=bold

android:layout_toRightOf=@+id/galleryPic
android:layout_below=@+id/txt_pass/  
EditText
android:id=@+id/txt_repass
android:layout_width=170px
android:layout_height=32px
android:password=true
  

[android-developers] Re: XmlPullParser and CDATA

2010-10-18 Thread Neilz
Yep, got it, thanks.

On Oct 18, 1:29 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Oct 18, 2010 at 8:05 AM, Neilz neilhorn...@gmail.com wrote:
  Mark, I was looking at this in the docs, but I'm confused by it.
  nextToken() returns an int, right, which I can identify as CDSECT. But
  I don't quite get how that gives me the text within the CDATA...?

 Use getText() or getTextCharacters(). From the nextToken() documentation:

 Here is the list of tokens that can be returned from nextToken() and
 what getText() and getTextCharacters() returns:
 ...
 CDSECT: return text inside CDATA (ex. 'foo' from !CDATA[foo]])

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] another weird layout issue

2010-10-18 Thread dashman
i've got a list

each child is horz linear layout w/ 3 children:
 image view, linear layout container and then an image button

if the image button is GONE - then i get click notifications
when someone clicks on the list entry.

if the image button is VISIBLE (even if i don't intercept onclick) -
i don't get the list click event notification.

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

2010-10-18 Thread dashman

after further research, looks like it related to focus.

if i do the following in the code it works (i.e. i can select a row
(get onclick event)
and also click on the imagebutton.

ImageButton imgBttn = (ImageButton)
view.findViewById(R.id.status_button);

imgBttn.setFocusable(false);

but in xml

android:focusable=false

does not work.

also, with the working solution, if i select a list row, the
associated
image-button flashes like someone clicked on it.

any way to avoid that.

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


[android-developers] Storage

2010-10-18 Thread Andy
Hi,

Does anyone know how to access programatically the internal(flash) and
external(sd card) storage values such as space used and space
available? I cant seem to find an api anywhere?

Thanks for any help.

Andy

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


[android-developers] ImageView scaling/layout problem

2010-10-18 Thread Tim S
I have a view where I'm trying to show images the largest possible
size they can be.  So I have the ImageView set to fill_parent for both
width and height with a scaleType of fitCenter.  However, I have a
caption area (currently a LinearLayout) that I'd like to align with
the bottom of the actual image.  The problem is, if the image has more
of a landscape orientation, the bottom of the image won't go all the
way to the bottom of the ImageView so my caption ends up way below the
image.  Is there any easy way to accomplish 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] Making a game pack.

2010-10-18 Thread Leigh McRae
I want to do an update for my game that adds more missions and hence a
fair amount of new data (2-4Megs).  I already have have people
complaining about the space asking me to support install to SD.  So
far I have resisted the install to SD since the game doesn't have the
new licensing support.  Also isn't install to SD only 2.2?
Anyway I was considering making an app that was pretty much only
data.  When you run the app it will ask you to unpack all the data to
the SD.  Then the main game app will look in a specific spot for an
data and use it.  Other than version problems I think this will work.
Any thoughts?

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

2010-10-18 Thread Julie Andrews
*Resignation Letter*

*Dear Sir,*

It is with great regret and sorrow that I’m writing you, but I’m leaving the
job. The offer was too lucrative and attractive for me to turn down. I had
to abscond because I wanted to avoid a scene with the HR and you. I am sorry
but I had no choice.* TaTa – Bye Bye…*

The project is working fine. There are only 108 issues pending, out of which
only 38% issues are High Priority. Hence I am sure there is no need to worry
about. The next Phase of major enhancements I have been working upon, have
been completed halfway. I am sure the new person who would replace me would
not understand what all I had done so far. Hence, for his and your
convenience, I have taken care to remove all the work that I had been doing
this far for nearly 3 months now. I am sure you will appreciate my insight
and “big heart”. *A great gesture…*

Also, I have changed my contact number. So you will not be able to get in
touch with me, to congratulate me. But I know your blessings are always with
me. Last but not the least, I also have the Rs. 12000 entrusted to me by our
company’s cultural events group, for the upcoming movie event. I am sure you
would have wanted me to keep it with myself as an added bonus from our
company. I respect you very much, hence your wish is my command.*Bless me
always…*

Don’t worry sir. I am 2 years experienced now, learning so much from your
company. So I will surely use this knowledge to write better programs for
the new company. Someday I’m sure we will meet sometime in the future. If
you wish, I will surely be glad to give my employee reference for you to
apply for a job in the new company which I am joining. *Always yours
faithfully…*

*Your faithful employee,
SW Engineer*

*PS:*
Dearest Boss, none of the above is true. I’m am still busy working at the
client side. I just wanted to remind you that there are worse things in life
than my “Request to reconsider my Salary Appraisal” attached with this mail.
Please approve it and call when it is safe for me to come to our Office to
discuss this.

My respect and Best Regards to you!


On Mon, Oct 18, 2010 at 8:35 PM, Tim S t...@schmidthole.com wrote:

 I have a view where I'm trying to show images the largest possible
 size they can be.  So I have the ImageView set to fill_parent for both
 width and height with a scaleType of fitCenter.  However, I have a
 caption area (currently a LinearLayout) that I'd like to align with
 the bottom of the actual image.  The problem is, if the image has more
 of a landscape orientation, the bottom of the image won't go all the
 way to the bottom of the ImageView so my caption ends up way below the
 image.  Is there any easy way to accomplish 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.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] A novel way to write resignation letter

2010-10-18 Thread Julie Andrews
*Resignation Letter*

*Dear Sir,*

It is with great regret and sorrow that I’m writing you, but I’m leaving the
job. The offer was too lucrative and attractive for me to turn down. I had
to abscond because I wanted to avoid a scene with the HR and you. I am sorry
but I had no choice.* TaTa – Bye Bye…*

The project is working fine. There are only 108 issues pending, out of which
only 38% issues are High Priority. Hence I am sure there is no need to worry
about. The next Phase of major enhancements I have been working upon, have
been completed halfway. I am sure the new person who would replace me would
not understand what all I had done so far. Hence, for his and your
convenience, I have taken care to remove all the work that I had been doing
this far for nearly 3 months now. I am sure you will appreciate my insight
and “big heart”. *A great gesture…*

Also, I have changed my contact number. So you will not be able to get in
touch with me, to congratulate me. But I know your blessings are always with
me. Last but not the least, I also have the Rs. 12000 entrusted to me by our
company’s cultural events group, for the upcoming movie event. I am sure you
would have wanted me to keep it with myself as an added bonus from our
company. I respect you very much, hence your wish is my command.*Bless me
always…*

Don’t worry sir. I am 2 years experienced now, learning so much from your
company. So I will surely use this knowledge to write better programs for
the new company. Someday I’m sure we will meet sometime in the future. If
you wish, I will surely be glad to give my employee reference for you to
apply for a job in the new company which I am joining. *Always yours
faithfully…*

*Your faithful employee,
SW Engineer*

*PS:*
Dearest Boss, none of the above is true. I’m am still busy working at the
client side. I just wanted to remind you that there are worse things in life
than my “Request to reconsider my Salary Appraisal” attached with this mail.
Please approve it and call when it is safe for me to come to our Office to
discuss this.

My respect and Best Regards to you!




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.com/




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.com/

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

Re: [android-developers] Making a game pack.

2010-10-18 Thread Julie Andrews
 If Mars had earthquake would they be called marsquakes?

On Mon, Oct 18, 2010 at 8:51 PM, Leigh McRae leigh.mc...@lonedwarfgames.com
 wrote:

 I want to do an update for my game that adds more missions and hence a
 fair amount of new data (2-4Megs).  I already have have people
 complaining about the space asking me to support install to SD.  So
 far I have resisted the install to SD since the game doesn't have the
 new licensing support.  Also isn't install to SD only 2.2?
 Anyway I was considering making an app that was pretty much only
 data.  When you run the app it will ask you to unpack all the data to
 the SD.  Then the main game app will look in a specific spot for an
 data and use it.  Other than version problems I think this will work.
 Any thoughts?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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




-- 
Julie
http://tradinglogically.blogspot.com http://tradinglogically.blogspot.com
http://vikitionary.blogspot.com
http://gandhi-the-man-of-millenium.blogspot.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: Storage

2010-10-18 Thread Bret Foreman
private long getAvailableMemory() {
  File path = Environment.getDataDirectory();
  StatFs stat = new StatFs(path.getPath());
  return stat.getAvailableBlocks() * stat.getBlockSize();
}

private long getTotalMemory() {
  File path = Environment.getDataDirectory();
  StatFs stat = new StatFs(path.getPath());
  return stat.getBlockCount() * stat.getBlockSize();
   }

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


[android-developers] Which Javascript Framework?

2010-10-18 Thread rovi
I am going to develop an app runs on both Android and desktop, so UI
will be built on html , javascript, css. User experience is very
important, I am looking for a javascript UI framework has great UI,
animation and response time. A great UI framework but slow (cause user
annoying) is not acceptable in my case.

There are many javascript frameworks available. Can you guys share the
experience of how they behave on Android ?

1. JQuery / JQueryMobile
2. JQtouch
3. Xui
4. Sencha Touch

Thanks a lot

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


[android-developers] Re: isUserAMonkey throws exception

2010-10-18 Thread andrew_esh
Perhaps this is Android's way of saying: Take your stinking paws off
me, you damned dirty ape!
(I couldn't resist.)

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

2010-10-18 Thread Bret Foreman
Proof that the forum moderators here sleep in late on Monday mornings.

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

2010-10-18 Thread Daniel Drozdzewski
On Mon, Oct 18, 2010 at 4:29 PM, Julie Andrews julieonli...@gmail.com wrote:
  If Mars had earthquake would they be called marsquakes?

troll!

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


[android-developers] Memory Leaks

2010-10-18 Thread John Gaby
I appear to have a memory leak(s) in my application, and I am trying
to get a handle on it by trying to understand more about garbage
collection.  I have created the following application.

Here I have a class 'MyClass', and I create an instance of that class
in my 'onCreate'.  I then null out the pointer which should leave no
references to that instance.

In 'MyClass', I override the finalize method so that I can see when
the object is destroyed.  When I run this program, the finalize method
is never called, even if I call System.gc(), from within my program,
or use the 'Cause GC' button using DDMS.  (This is the same behavior
that I see in my full application, by the way).

Can someone explain to me more about what is going on here.  I believe
that in my main application, that I have objects that are not being
freed.  Is there some strategy for identifying those objects?

Thanks.


/*
 * Main Activity
 */

package com.gabysoft.memoryleak;

import android.app.Activity;
import android.os.Bundle;

public class MemoryLeak extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

MyClass mc = new MyClass();
mc = null;

setContentView(R.layout.main);

System.gc();
}
}


/*
 * My Class
 */

package com.gabysoft.memoryleak;

import android.util.Log;

public class MyClass extends Object
{
MyClass()
{
Log.d(GabySoft, MyClass::MyClass()  + this);
}

@Override
protected void finalize()
{
Log.d(Gabysoft, MyClass::finalize()  + 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] Monitor a task activity (view data activity)

2010-10-18 Thread steven yuan
Hi guys,
I ran into an issue when testing an app. I appreciate that very much if any
one can help me out.

It's an app that installs apps for users.
What it does is simply to send out an intent very much like this:

URI uri = ...; // uri to apk
intent =  Intent(Intent.VIEW_ACTION, uri);
intent.setType(application/...);
startActivity(intent);

After this, Android will pop up an activity asking user whether to install
the app or not.
So far, it's fine.

Problem is, when testing the app automatically, I found I can't dismiss the
activity created by Android.
I tried creating a monitor to monitor it, like:

IntentFilter filter = new IntentFilter(Intent.VIEW_ACTION,
application/...); // line 1
ActivityMonitor am = new ActivityMonitor(filter, null, true); // line 2
Activity activity = am.waitForActivity(); // line 3

Unfortunately, line 3 never returns and the consequence is I can't dismiss
the activity.

Please help...

Thanks,
Steven Y.

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

[android-developers] Select behavior of a TextView

2010-10-18 Thread Bret Foreman
I have a TextView which is inside a LinearLayout which is in the child
position of an ExpandableListView. Without assigning a color state
selector to the text view, the following behavior is observed:

Text unselected - text paints as white
Text selected - text paints as black

If I add a color state selector with a call to
text.setTextColor(R.color.textcolorstatelist) then the following
behavior is observed:

Text unselected - text paints as black
Text selected - text paints as black

I tried two versions of textcolorstatelist.xml and both produced the
results above:

Version 1)

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:color=#/
item android:state_selected=false android:color=#/
item android:color=#/
/selector

Version 2)

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:color=#00FF/
item android:state_selected=false android:color=#00FF/
item android:color=#00FF/
/selector

Is it possible that the color state list needs to be applied to the
whole LinearLayout rather than just the TextView?


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


[android-developers] Instantiating a layout defined via XML at runtime

2010-10-18 Thread FractalBob
Hi,

I have a ListView that I want to populate with objects whose layout is
defined via XML. Is there a way to instantiate a layout at runtime,
editing stuff like the Android layout ID, etc., and then load the new
layout into the list? TIA!

Bob

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

2010-10-18 Thread DanH
finalize isn't guaranteed to be called.  If you want to know if an
object has been GCed, create a WeakReference to it and test that after
the GC.

But note that full GC isn't guaranteed to occur when you do gc
either.  And some systems require two GCs to trigger finalize (or
clear a WeakReference).

And nulling out the only visible reference doesn't necessarily free
an object either.  There still may be a hidden temporary pointer to
the object in the method invocation.

On Oct 18, 10:58 am, John Gaby jg...@gabysoft.com wrote:
 I appear to have a memory leak(s) in my application, and I am trying
 to get a handle on it by trying to understand more about garbage
 collection.  I have created the following application.

 Here I have a class 'MyClass', and I create an instance of that class
 in my 'onCreate'.  I then null out the pointer which should leave no
 references to that instance.

 In 'MyClass', I override the finalize method so that I can see when
 the object is destroyed.  When I run this program, the finalize method
 is never called, even if I call System.gc(), from within my program,
 or use the 'Cause GC' button using DDMS.  (This is the same behavior
 that I see in my full application, by the way).

 Can someone explain to me more about what is going on here.  I believe
 that in my main application, that I have objects that are not being
 freed.  Is there some strategy for identifying those objects?

 Thanks.

 /*
  * Main Activity
  */

 package com.gabysoft.memoryleak;

 import android.app.Activity;
 import android.os.Bundle;

 public class MemoryLeak extends Activity {
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);

         MyClass mc = new MyClass();
         mc = null;

         setContentView(R.layout.main);

         System.gc();
     }

 }

 /*
  * My Class
  */

 package com.gabysoft.memoryleak;

 import android.util.Log;

 public class MyClass extends Object
 {
     MyClass()
     {
         Log.d(GabySoft, MyClass::MyClass()  + this);
     }

     @Override
     protected void finalize()
     {
         Log.d(Gabysoft, MyClass::finalize()  + 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: Select behavior of a TextView

2010-10-18 Thread Bret Foreman
By the way, when I edit the textcolorstatelist.xml file I get the
following warning from Eclipse:

'default' is not a best match for any device/locale combination.
Displaying it with 'Normal, Not Long, Landscape, Medium Density,
Finger, Soft, Qwerty, Trackball, 480x320'

I'm not sure if this has any bearing on the behavior I'm seeing.

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

2010-10-18 Thread Bret Foreman
Everything that is defined in XML is also available via the Java APIs.
The docs often have them arranged in table form with the XML keyword
and Java method name side-by-side.

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

2010-10-18 Thread Daniel Drozdzewski
On Mon, Oct 18, 2010 at 4:58 PM, John Gaby jg...@gabysoft.com wrote:
 I appear to have a memory leak(s) in my application, and I am trying
 to get a handle on it by trying to understand more about garbage
 collection.  I have created the following application.

 Here I have a class 'MyClass', and I create an instance of that class
 in my 'onCreate'.  I then null out the pointer which should leave no
 references to that instance.

 In 'MyClass', I override the finalize method so that I can see when
 the object is destroyed.  When I run this program, the finalize method
 is never called, even if I call System.gc(), from within my program,
 or use the 'Cause GC' button using DDMS.  (This is the same behavior
 that I see in my full application, by the way).

 Can someone explain to me more about what is going on here.  I believe
 that in my main application, that I have objects that are not being
 freed.  Is there some strategy for identifying those objects?

 Thanks.

Ok, few things first:
- Android does not reclaim the memory straight away even after the
application gets closed.
- System.gc() does not guarantee garbage collection in a timely manner.
- When overriding finalize() you have to call super.finalize().

The fact that you did not see the log from finalize() does not mean it
did not happen.

Daniel

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

2010-10-18 Thread DanH
How do you handle a problem like Maria??

On Oct 18, 10:34 am, Julie Andrews julieonli...@gmail.com wrote:
 Scroll down slowly and be honest to yourself.

 *man
 1. 
 board*

 Ans. = man overboard

 *stand
 2. 
 i*

 Ans. = I understand

 OK?…. Got the drift?

 Let’s try a few now and see how you fair?

 *3. /r/e/a/d/i/n/ g/*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 ..

 .
 Ans. = reading between the lines

 *4. r
 road
 a
 d*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 Ans. = cross road

 *5. cycle
 cycle
 cycle*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 Ans. = tricycle

 *0
 6. 
 M.D.
 Ph.D.*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = two degrees below zero

 *knee
 7. 
 light*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = neon light (knee-on-light)

 *ground
 8.  ——— —
 feet feet feet feet feet feet*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = six feet underground

 *9. he’s / himself*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = he’s by himself

 *10. ecnalg*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = backward glance

 *11. death ….. life*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. = life after death
 12. THINK

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. think big !!

 And the last one is real fundoo ..

 *13. ababaaa ababaabbaaa. …*

 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .

 Ans. long time no ‘C’ (see)



 On Mon, Oct 18, 2010 at 8:10 PM, Andy a...@fendley.com wrote:
  Hi,

  Does anyone know how to access programatically the internal(flash) and
  external(sd card) storage values such as space used and space
  available? I cant seem to find an api anywhere?

  Thanks for any help.

  Andy

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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

 --
 Juliehttp://tradinglogically.blogspot.comhttp://tradinglogically.blogspot.comhttp://vikitionary.blogspot.comhttp://gandhi-the-man-of-millenium.blogspot.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] Ksoap2 Android project revived and new release

2010-10-18 Thread Manfred Moser
Hi!

I just wanted to give you all a heads up that the dormant ksaop2-
android project has been revived

http://www.simpligility.com/2010/10/reviving-ksoap2-for-android/

and a new release 2.5.1 has been created. Among other things it fixed
problems with attribute parsing and soapfault catching. There are also
new convenience parsing methods and we have plans for some more
enhancement with the next release.

Please check out the overhauled site and wiki
http://code.google.com/p/ksoap2-android/

and join the brand new mailing list.

http://groups.google.com/group/ksoap2-android

Manfred Moser
http://www.simpligility.com

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


Re: [android-developers] Instantiating a layout defined via XML at runtime

2010-10-18 Thread Romain Guy
Hi,

To inflate (what you call instantiate) an XML layout file at runtime,
use a LayoutInflater. Usually the LayoutInflater.inflate()'s method is
invoked form the adapter's getView() method when the convertView
parameter is null.

On Mon, Oct 18, 2010 at 9:20 AM, FractalBob ruom...@gmail.com wrote:
 Hi,

 I have a ListView that I want to populate with objects whose layout is
 defined via XML. Is there a way to instantiate a layout at runtime,
 editing stuff like the Android layout ID, etc., and then load the new
 layout into the list? TIA!

 Bob

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




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

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

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


[android-developers] Re: Memory Leaks

2010-10-18 Thread John Gaby
Thanks for the input.  I am a little confused about your comment:

'The fact that you did not see the log from finalize() does not mean
it did not happen.'

Are you saying that the finalize can be called and yet I may not get
the log?  How is that possible?

I added the call to super.finalize() as you suggested (it didn't
change anything), but please note that I really don't care about the
finalize being called, except as a debugging tool.  What I really want
is a way to find out whether an object has been freed (or will be
freed) or not.  I believe that I must have objects that are not being
freed, and I would like to try and identify them.

Thanks



On Oct 18, 9:26 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com
wrote:
 On Mon, Oct 18, 2010 at 4:58 PM, John Gaby jg...@gabysoft.com wrote:
  I appear to have a memory leak(s) in my application, and I am trying
  to get a handle on it by trying to understand more about garbage
  collection.  I have created the following application.

  Here I have a class 'MyClass', and I create an instance of that class
  in my 'onCreate'.  I then null out the pointer which should leave no
  references to that instance.

  In 'MyClass', I override the finalize method so that I can see when
  the object is destroyed.  When I run this program, the finalize method
  is never called, even if I call System.gc(), from within my program,
  or use the 'Cause GC' button using DDMS.  (This is the same behavior
  that I see in my full application, by the way).

  Can someone explain to me more about what is going on here.  I believe
  that in my main application, that I have objects that are not being
  freed.  Is there some strategy for identifying those objects?

  Thanks.

 Ok, few things first:
 - Android does not reclaim the memory straight away even after the
 application gets closed.
 - System.gc() does not guarantee garbage collection in a timely manner.
 - When overriding finalize() you have to call super.finalize().

 The fact that you did not see the log from finalize() does not mean it
 did not happen.

 Daniel

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

2010-10-18 Thread Daniel Drozdzewski
On Mon, Oct 18, 2010 at 5:40 PM, John Gaby jg...@gabysoft.com wrote:
 Thanks for the input.  I am a little confused about your comment:

 'The fact that you did not see the log from finalize() does not mean
 it did not happen.'

It is possible that the finalize() has been called at much later point.
I should have probably said that lack of finalize() does not mean that
the memory has not been regained.

As Dan points out, finalizers don't necessary run.

If Android decided to kill the process running finished application,
then it would simply do it on a system level, without trying to clean
the heap within that VM first.

If you want to see finalizers at work, allocate many objects that you
don't hold on to:

for(int i=0; i1; i++ ) {
MyClass x = new MyClass();
}

...and then call the following:

System.runFinalization();
System.gc();

You should see your log statements.

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

2010-10-18 Thread DanH
 What I really want
 is a way to find out whether an object has been freed (or will be
 freed) or not.  I believe that I must have objects that are not being
 freed, and I would like to try and identify them.

You can use WeakReferences for that.  Create a WeakReference for the
object.  If the WeakReference get method returns null the object has
been collected.  (Or you can get fancy and use the ReferenceQueue
feature.)

On Oct 18, 11:40 am, John Gaby jg...@gabysoft.com wrote:
 Thanks for the input.  I am a little confused about your comment:

 'The fact that you did not see the log from finalize() does not mean
 it did not happen.'

 Are you saying that the finalize can be called and yet I may not get
 the log?  How is that possible?

 I added the call to super.finalize() as you suggested (it didn't
 change anything), but please note that I really don't care about the
 finalize being called, except as a debugging tool.  What I really want
 is a way to find out whether an object has been freed (or will be
 freed) or not.  I believe that I must have objects that are not being
 freed, and I would like to try and identify them.

 Thanks

 On Oct 18, 9:26 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com
 wrote:

  On Mon, Oct 18, 2010 at 4:58 PM, John Gaby jg...@gabysoft.com wrote:
   I appear to have a memory leak(s) in my application, and I am trying
   to get a handle on it by trying to understand more about garbage
   collection.  I have created the following application.

   Here I have a class 'MyClass', and I create an instance of that class
   in my 'onCreate'.  I then null out the pointer which should leave no
   references to that instance.

   In 'MyClass', I override the finalize method so that I can see when
   the object is destroyed.  When I run this program, the finalize method
   is never called, even if I call System.gc(), from within my program,
   or use the 'Cause GC' button using DDMS.  (This is the same behavior
   that I see in my full application, by the way).

   Can someone explain to me more about what is going on here.  I believe
   that in my main application, that I have objects that are not being
   freed.  Is there some strategy for identifying those objects?

   Thanks.

  Ok, few things first:
  - Android does not reclaim the memory straight away even after the
  application gets closed.
  - System.gc() does not guarantee garbage collection in a timely manner.
  - When overriding finalize() you have to call super.finalize().

  The fact that you did not see the log from finalize() does not mean it
  did not happen.

  Daniel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Instantiating a layout defined via XML at runtime

2010-10-18 Thread Kostya Vasilyev

 18.10.2010 20:20, FractalBob пишет:

Hi,

I have a ListView that I want to populate with objects whose layout is
defined via XML. Is there a way to instantiate a layout at runtime,


Yes, take a look at LayoutInflater.


editing stuff like the Android layout ID, etc., and then load the new
layout into the list? TIA!


Attributes of a given view can be changed by calling Java methods on 
that view: setPadding, setViewId, seVisibility, etc.


Layout attributes normally defined as layout_blah in XML can be 
changed by calling setLayoutParams.


The params need to be of a class that matches the actual parent layout 
of that view: LinearLayout.LayoutParams, RelativeLayout.LayoutParams, etc.



Bob




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

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


Re: [android-developers] Re: Memory Leaks

2010-10-18 Thread Daniel Drozdzewski
On Mon, Oct 18, 2010 at 5:54 PM, Daniel Drozdzewski
daniel.drozdzew...@gmail.com wrote:
 On Mon, Oct 18, 2010 at 5:40 PM, John Gaby jg...@gabysoft.com wrote:
 Thanks for the input.  I am a little confused about your comment:

 'The fact that you did not see the log from finalize() does not mean
 it did not happen.'

 It is possible that the finalize() has been called at much later point.
 I should have probably said that lack of finalize() does not mean that
 the memory has not been regained.

 As Dan points out, finalizers don't necessary run.

 If Android decided to kill the process running finished application,
 then it would simply do it on a system level, without trying to clean
 the heap within that VM first.

 If you want to see finalizers at work, allocate many objects that you
 don't hold on to:

        for(int i=0; i1; i++ ) {
            MyClass x = new MyClass();
        }

 ...and then call the following:

        System.runFinalization();
        System.gc();

 You should see your log statements.


btw, it would also help, if you made MyClass a bit heavier say by
adding a member String and assigning to it some longish string literal
in MyClass' constructor.




-- 
Daniel Drozdzewski

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

2010-10-18 Thread Bret Foreman
A quick google search shoes that many people have had this exception
and generated questions about it. I haven't seen an answer anywhere,
though.

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

2010-10-18 Thread Bret Foreman
By the way, the isUserAMonkey method is missing from the
ActivityManager in the SDK version 8 install I have. Is it possible
that this method was removed due to unreliable behavior?

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

2010-10-18 Thread Daniel Drozdzewski
btw^2

Rather than assigning the same literal in the constructor, create new
String each time around the same literal:

/*
 * My Class
 */

package com.gabysoft.memoryleak;

import android.util.Log;

public class MyClass extends Object
{
   String balast;

   MyClass()
   {
   balast = new String(some long text, just to make this class
consume more memory, so that the system has strong inclination to
regain it);
   Log.d(GabySoft, MyClass::MyClass()  + this);
   }

   @Override
   protected void finalize()
   {
   try {
   Log.d(Gabysoft, MyClass::finalize()  + this);
   } finally {
   super.finalize();
   }
   }

}

--
Daniel

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

2010-10-18 Thread DanH
I doubt that adding content to the object would make it any more
likely to be collected.  The garbage collector doesn't generally
weigh objects as to whether they should be collected or not.  The
only differentiating factors are 1) the absolute size of the object
itself (not counting references to other objects), 2) the number of
times the object has survived garbage collection, and (sometimes) 3)
the class of the object.

On Oct 18, 11:57 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com
wrote:
 On Mon, Oct 18, 2010 at 5:54 PM, Daniel Drozdzewski



 daniel.drozdzew...@gmail.com wrote:
  On Mon, Oct 18, 2010 at 5:40 PM, John Gaby jg...@gabysoft.com wrote:
  Thanks for the input.  I am a little confused about your comment:

  'The fact that you did not see the log from finalize() does not mean
  it did not happen.'

  It is possible that the finalize() has been called at much later point.
  I should have probably said that lack of finalize() does not mean that
  the memory has not been regained.

  As Dan points out, finalizers don't necessary run.

  If Android decided to kill the process running finished application,
  then it would simply do it on a system level, without trying to clean
  the heap within that VM first.

  If you want to see finalizers at work, allocate many objects that you
  don't hold on to:

         for(int i=0; i1; i++ ) {
             MyClass x = new MyClass();
         }

  ...and then call the following:

         System.runFinalization();
         System.gc();

  You should see your log statements.

 btw, it would also help, if you made MyClass a bit heavier say by
 adding a member String and assigning to it some longish string literal
 in MyClass' constructor.

 --
 Daniel Drozdzewski

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

2010-10-18 Thread TreKing
On Fri, Oct 15, 2010 at 12:25 AM, pramod.deore deore.pramo...@gmail.comwrote:

 It creates rows when I hit menu button (after hitting add room submenu
 button). But what I want is - create 2 columns for each row.


If you want rows and columns, look into TableLayout.


 If you are not understanding this code well,


I'm really not.


 then please give me just example in which after clicking button it creates
 row and 2 columns for each row.


Sorry, I'm not doing your work for you. Look at TableLayout and go from
there.

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

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

[android-developers] Re: using instrumentation testing framework if there is more than one activity

2010-10-18 Thread A. Elk
The instrumentation testing framework is designed to do unit tests.
It's not a replacement for a full testing framework; instead, it
allows you to do true JUnit-style unit testing on Android component
classes.

Robotium is more of a functional/application-level testing framework.
Within object-oriented programming (strictly speaking), a unit test
tests an individual method by calling it in a controlled environment
and evaluating its results. The structure of test cases that Robotium
uses is similar to that of JUnit, but Robotium's level of work is a
class (an Activity, for example), not a method. In that sense, it's a
test harness for functional testing of a class.

Automated functional testing is necessary, but so is unit testing. The
latter is particularly important when you are modifying existing
behavior. IMHO, unit testing is also better at identifying
dependencies.

Android itself has monkey, which is *a* tool for doing functional
testing, but has limited applicability.

On Oct 18, 12:18 am, Mathias Lin m...@mathiaslin.com wrote:
 Hi Andrei, not directly answering your question, but just want to
 point you towww.robotium.org, which is a testing framework and does
 tests across multiple activities.

 On Oct 18, 11:02 am, Andrei gml...@gmail.com wrote:



  How do I use instrumentation testing framework to test flow between
  activities?
  The example goog gives is for one activity only
  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: Select behavior of a TextView

2010-10-18 Thread Bret Foreman
As another experiment, I added a call to setTextColor inside the
setOnChildClickListener of the ExpandableListView and it has no
effect. It looks like the text color is getting changed after the
click processing.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Photo + info stored in database...Question bout linking the two together

2010-10-18 Thread Stephen Pengilley
Many thanks for the reply. I'll take that into consideration :)

On Oct 15, 6:48 pm, Kumar Bibek coomar@gmail.com wrote:
 You can get both the Uri and the filepath. You can use both to keep a
 local DB for your app. But I would suggest to keep the Uri in your DB
 and query the MediaStore whenever you want to display the picture.
 This is a way is better than saving the path only.

 On Oct 15, 2:53 pm, StephenPengilleyspengil...@gmail.com wrote:



  Hi all,

  I am building an app which will let the user take a photo, then add
  some details which will be stored in a database. I want to be able to
  store some information (URI?) in the database so that when the user
  clicks the database entry from a listview it retrieves the photo.  I
  hope it is clear what I want to do.  Could I instead use a file path
  to locate the photo? Or do I need the URI? If I do need the URI then
  how do I get it?

  Stephen

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


[android-developers] Spinner in ListView Activity

2010-10-18 Thread SImplyG2010
Hi,

Has anyone seen a a onItemSelected not being called when using a
spinner inside a listviewActivity. I have the code below Inside a
listViewActivity.

 protected void onCreate(Bundle savedInstanceState){
 super.onCreate(savedInstanceState);
 setContentView(R.layout.listview);

 Spinner sortOption = new Spinner(this);
 String[] items = CursorCollection.getSortOptions(this);
 sortOption.setOnItemSelectedListener(this);
 ArrayAdapterString adapter = new
ArrayAdapterString(this,android.R.layout.simple_spinner_item,
items);
 
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

  searchButton.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
sortOption.performClick();
}
});



 }

   public void onItemSelected(AdapterView? parent, View v, int
position, long id) {
Log.V(Info, Doing some stuff);
 }

The spinner is shown on screen by pressing a button (not the spinner)
which in turn calls performClick() on the spinner. When I select an
item from the spinner the onItemSelected function is not called. Does
anyone know why this might 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: Select behavior of a TextView

2010-10-18 Thread Bret Foreman
Also note that the TextView lives at the same level in the hierarchy
(in the LinearLayout) as an icon that is used to indicated the
selected state. That icon is changing state correctly according to the
selector that I have defined. The text, however remains a problem.

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


[android-developers] Re: Spinner in ListView Activity

2010-10-18 Thread Bret Foreman
Are you calling the super of the onClick method in the onClickListener?

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

2010-10-18 Thread Kostya Vasilyev

 18.10.2010 20:40, John Gaby пишет:

What I really want
is a way to find out whether an object has been freed (or will be
freed) or not.  I believe that I must have objects that are not being
freed, and I would like to try and identify them.

This might be useful:

http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

It appears that some of the steps described in this blog post have since 
then been automated.


In particular, Eclipse's DDMS perspective has a button to dump HPROF 
file on the device and load into the memory analyzer. It's the button 
that looks like a green half-empty glass with a red arrow.


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

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


[android-developers] Re: Memory Leaks

2010-10-18 Thread John Gaby
So there is no way to force all objects that no longer have references
to them to be garbage collected?

Once again, I really don't need to know when the object is actually
freed.  What I am interested in is finding out whether it CAN be
freed.  That is whether all the references to it are gone.  In my real
application, the objects in questions are much larger and more
complex.  Yet, I never see the finalize called for them.  This make me
think that I still have references to them, but since I don't see the
finalize called even in a simple case where I am sure there are no
references, I cannot be sure.  I definitely have a leak, however,
since if I perform the same operation enough times, the application
eventually gets an Out Of Memory error.

I am taking a look at using ReferenceQueue, or PhantomReference for
that purpose but they seem to be way more complicated that I need.

Thanks again.

On Oct 18, 10:21 am, DanH danhi...@ieee.org wrote:
 I doubt that adding content to the object would make it any more
 likely to be collected.  The garbage collector doesn't generally
 weigh objects as to whether they should be collected or not.  The
 only differentiating factors are 1) the absolute size of the object
 itself (not counting references to other objects), 2) the number of
 times the object has survived garbage collection, and (sometimes) 3)
 the class of the object.

 On Oct 18, 11:57 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com
 wrote:

  On Mon, Oct 18, 2010 at 5:54 PM, Daniel Drozdzewski

  daniel.drozdzew...@gmail.com wrote:
   On Mon, Oct 18, 2010 at 5:40 PM, John Gaby jg...@gabysoft.com wrote:
   Thanks for the input.  I am a little confused about your comment:

   'The fact that you did not see the log from finalize() does not mean
   it did not happen.'

   It is possible that the finalize() has been called at much later point.
   I should have probably said that lack of finalize() does not mean that
   the memory has not been regained.

   As Dan points out, finalizers don't necessary run.

   If Android decided to kill the process running finished application,
   then it would simply do it on a system level, without trying to clean
   the heap within that VM first.

   If you want to see finalizers at work, allocate many objects that you
   don't hold on to:

          for(int i=0; i1; i++ ) {
              MyClass x = new MyClass();
          }

   ...and then call the following:

          System.runFinalization();
          System.gc();

   You should see your log statements.

  btw, it would also help, if you made MyClass a bit heavier say by
  adding a member String and assigning to it some longish string literal
  in MyClass' constructor.

  --
  Daniel Drozdzewski

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


[android-developers] NoClassDefFoundError when running the app

2010-10-18 Thread ping
Hi.
I have a problem with a library which i would like to use in my
project.
Here is the situtation:
I have an android project which has another Java Project in its build
path. Thats fine. The other java project reffers to another *.jar
library on its buildpath. Eclipse does not show any errors. But when i
try to call a method of the java project out of my android project it
cannot find the classes which are in the *.jar file of the java
project. It throws a NoClassDefFoundException.

Android seems to doesnt find the *.jar file within the other java-
project.

Can anyone tell me what's the problem here

Again: the projectstructure:

ANDROID PROJECT ---uses--- JAVA PROJECT --uses--- *.jar
when I call a method of the javaproject out of the android project a
NoClassDefFoundException is thrown at the point where classes of the
*.jar file were used :/


greets

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


[android-developers] Re: Get all images taken by the camera?

2010-10-18 Thread joebowbeer
The native camera app generally behaves like a, well, digital
camera, and saves its images to a child folder of the DCIM directory.
(DCIM stands for Digital Camera IMages.) You can filter for these
images by adding a selector to your query.  Something along these
lines:

  MediaColumns.DATA +  like '%/DCIM/%'

(If the content is a file, the DATA column holds the full path to the
file.)

On Oct 16, 7:58 pm, Chris - Diddo Team cbo...@gmail.com wrote:
 Hi all!

 Is it possible to get a list/cursor of all images taken by the
 camera?  I would like to somehow be notified when the camera takes a
 picture, ie when the database of images changes.

 Currently I can use a contentobserver with the
 MediaStore.Images.Media.External_Content_URI, but that fires off a
 notification if any photo is added to the SD (ie a photo is download,
 another app adds one...)...is there any way to do this?

 Thanks so much 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: Spinner in ListView Activity

2010-10-18 Thread SImplyG2010
Sorry Bret I do not understand in which onClickListener? The button or
the onItemSelected listener?

On Oct 18, 1:31 pm, Bret Foreman bret.fore...@gmail.com wrote:
 Are you calling the super of the onClick method in the onClickListener?

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

2010-10-18 Thread Kumar Bibek
Some classes in your jar might be referencing some other classes which you
don't have in your class path. Eclipse would will show you compile time
problems. Not having referenced classes is only detected at the runtime in
this case.

On Mon, Oct 18, 2010 at 11:18 PM, ping bernd.warm...@gmail.com wrote:

 Hi.
 I have a problem with a library which i would like to use in my
 project.
 Here is the situtation:
 I have an android project which has another Java Project in its build
 path. Thats fine. The other java project reffers to another *.jar
 library on its buildpath. Eclipse does not show any errors. But when i
 try to call a method of the java project out of my android project it
 cannot find the classes which are in the *.jar file of the java
 project. It throws a NoClassDefFoundException.

 Android seems to doesnt find the *.jar file within the other java-
 project.

 Can anyone tell me what's the problem here

 Again: the projectstructure:

 ANDROID PROJECT ---uses--- JAVA PROJECT --uses--- *.jar
 when I call a method of the javaproject out of the android project a
 NoClassDefFoundException is thrown at the point where classes of the
 *.jar file were used :/


 greets

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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




-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.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: isUserAMonkey throws exception

2010-10-18 Thread joebowbeer
DeviceAdminSample in the Android-8 ApiDemos calls this method in some
cases. Does this sample work in your installation?

On Oct 18, 10:10 am, Bret Foreman bret.fore...@gmail.com wrote:
 By the way, the isUserAMonkey method is missing from the
 ActivityManager in the SDK version 8 install I have. Is it possible
 that this method was removed due to unreliable behavior?

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

2010-10-18 Thread DanH
Note that NoClassDefFound can also occur because the class was found
but was incompatible with other classes it links to.

On Oct 18, 12:48 pm, ping bernd.warm...@gmail.com wrote:
 Hi.
 I have a problem with a library which i would like to use in my
 project.
 Here is the situtation:
 I have an android project which has another Java Project in its build
 path. Thats fine. The other java project reffers to another *.jar
 library on its buildpath. Eclipse does not show any errors. But when i
 try to call a method of the java project out of my android project it
 cannot find the classes which are in the *.jar file of the java
 project. It throws a NoClassDefFoundException.

 Android seems to doesnt find the *.jar file within the other java-
 project.

 Can anyone tell me what's the problem here

 Again: the projectstructure:

 ANDROID PROJECT ---uses--- JAVA PROJECT --uses--- *.jar
 when I call a method of the javaproject out of the android project a
 NoClassDefFoundException is thrown at the point where classes of the
 *.jar file were used :/

 greets

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


  1   2   >