Re: [android-developers] Re: Mount sdcard from code

2011-02-09 Thread Marcin Orlowski
On 9 February 2011 06:36, maikelalonso maikelalonsob...@gmail.com wrote:
 With the mount command works correctly but the icon of the API shows
 like the SDCARD is not mounted when really if it is.

Quite likely it's because you, contrary to the OS, did not send
ACTION_MEDIA_MOUNTED broadcast on manual mount

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

2011-02-09 Thread Matthias
http://code.google.com/p/android/issues/detail?id=14616

On Feb 8, 6:42 pm, Matthias m.kaepp...@googlemail.com wrote:
 I'm pretty sure it's a bug. When running this directly in the test
 case, I get the same error:

         getInstrumentation().runOnMainSync(new Runnable() {

             @Override
             public void run() {
                 AlertDialog.Builder b = new
 AlertDialog.Builder(getInstrumentation()
                         .getTargetContext());
                 b.show();
             }
         });

 Time for another bug report I guess.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Task killer kills my application but android restarts my service, which i dont want

2011-02-09 Thread JC
Hello Hackborn,

You just need to handle this case correctly, as it will happen even without a 
task killer

I used intent in starting service and checking that extra in
myService:StartupHandler() to identify if service recovered from
crash(if intent is null).

If that is the case i do gracefull shutdown of my service by calling
stopSelf(),(which calls myService::onDestroy()).

Thanks
JRC

On Feb 8, 11:11 am, Dianne Hackborn hack...@android.com wrote:
 As of 2.2 all a task manager can to is kill a process while it is in the
 background, which could also happen to it from the OOM killer.  You just
 need to handle this case correctly, as it will happen even without a task
 killer

 I don't know what you are actually trying to do in order to say what handle
 correctly means.





 On Mon, Feb 7, 2011 at 8:09 PM, JC jay.chadderw...@gmail.com wrote:
  Thanks Hackbon,

  I am running on 2.2, task killer is able to kill the process and new
  process/service is restarted.

  Have i used correct  flags in service while binding and starting
  service ?

  Mainly my notification icon is not cleared my icon.

  Thanks,
  JRC

  On Feb 7, 11:04 pm, Dianne Hackborn hack...@android.com wrote:
   Yes if another process is bound, the service will be restarted.

   As of 2.2 a task killer simply can't do what you are asking.  The force
   stop button in Manage Applications will do this.

   On Mon, Feb 7, 2011 at 2:00 AM, JC jay.chadderw...@gmail.com wrote:
Hello All,

I have service running in background and notification is shown in GUI.

When i do force close from application=manage application, my
service, application and icon in notification bar goes off.

But when i kill my application via TaskKiller application, my service
stopped and then Android OS restarts service(i can see from logcat)
and icon in my notification area remains. while my background work (of
downloading image) is closed.

I return START_STICKY (also tried with STArT_NOT_STICKY flag) from
OnStartCommand(), but no luck. My GUI activity, binds to service via
Context.BIND_AUTO_CREATE, is it because of that flag?

What should i do if i want my application,service and notification
area icon to go off, when application is killed by task killer.

I have searched through

Thanks in advance.
JRC

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

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

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

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

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

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

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


Re: [android-developers] Re: Minimize CursorAdapter view recycling?

2011-02-09 Thread Kostya Vasilyev
Ok. AFAIK, refreshing a list view with notifyDataSetChanged / 
Invalidated is asynchronous: it requests a layout change, which is then 
processed by a handler message.


Perhaps clicks go through within that window - between the time when you 
change your data structure and call notifyDataSetXXX and then time when 
the list view actually gets repopulated. You blocking the UI thread 
makes it more likely to happen, as that causes unprocessed messages to 
accumulate and then go through all at once.


One way to fix this would be to add a call to adapter.getItem() or 
getCount() in your button's click handler: those functions know when the 
adapter is in a pending refresh state and return null / 0:


http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/CursorAdapter.java;h=baa6833fb1a8ca36559bbffb6b5cb9aa54453236;hb=refs/heads/froyo#l130

Note the use of mDataValid.

-- Kostya

09.02.2011 2:22, ivan пишет:

I guess the cursor position tag would/could present a problem if the
data size were changing, but it's not (in this particular instance)
and the query/requery results are sorted in a specific order per the
_id.

Weird.

On Feb 8, 4:03 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Then perhaps the cursor gets requeried and the position changes.

You can track down requeries with a cursor factory and some logging, but
perhaps it's easier to set a tag to the item's _id value, as that should not
change (and you need the _id to delete, anyway).

--
Kostya Vasilyev --http://kmansoft.wordpress.com
09.02.2011 1:54 пользователь ivanistas...@gmail.com  написал:


You were saying something about buttons - how are you creating them,
and
mapping to the right data item? 
I set a tag to the cursor position in the bindView() function.
On Feb 8, 3:20 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

No, waiting on synchronized block or thread.wait blocks the waiting

thread

and only lets other threads run.
But, that synchronization doesn't sound good for a different reason,

since

you are blocking the UI thread, and that should not happen.
One way around it is to make that cached data item available in the query
used to populate the list, and fire off update requests to the worker

thread

as needed. Once the worker thread updates the cached item, the list

should

update automatically (since you mentioned that your data is in a content
provider).
You were saying something about buttons - how are you creating them, and
mapping to the right data item?
--
Kostya Vasilyev --http://kmansoft.wordpress.com
09.02.2011 1:04 пользователь ivanistas...@gmail.com  написал:

The only manipulation to the view object is via the non-overridden
ResourseCursorAdapter bindView() function. On occasion this function
will block for a couple seconds maximum if a drm data cache is
occurring in another thread, but that thread never touches the view
object. Maybe waiting on a synchronized block of code (in the UI
thread) to get values from the multi-threaded cache causes the UI
thread to wait, releasing cycles to the UI thread, which in turn
allows the misplaced event to occur?
On Feb 8, 12:32 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Are you sure that you only touch the ListView and its adapter from the
UI thread?
-- Kostya
08.02.2011 22:11, ivan пишет:

Thanks for the reply.
The button events are -- nine times out of ten -- tied to the

correct

data, but if you rapidly push a button you can throw an event that
will be tied to the wrong data.  I thought that this didn't make

sense

since everything should be occurring on the UI thread (right?).  But
it appears that the event can sneak in before the screen is actually
refreshed.
On Feb 8, 11:24 am, Kostya Vasilyevkmans...@gmail.comwrote:

If the button is linked to the wrong item, then you have a bug in

your

adapter's getView, where you're not properly associating the button

with

the item for the case where convertView != null.
As for performance, I find it useful, when refreshing a ListView

item

in

response to some event, to go through the visible list items, find

the

ones that are affected, and push new values into them right then

and

there, rather than calling notifyDataSetChanged / Invalidated.
-- Kostya
08.02.2011 19:47, ivan пишет:

Anyone?
On Feb 7, 4:33 pm, ivanistas...@gmail.com  wrote:

I'm using a ResourceCursorAdapter to display a list of downloads

from

a ContentProvider that track's my application's downloads --

modeled

after Android's DownloadProvider.
The problem is that when a download is actively running it

frequently

calls bind view--every few seconds--to update a download progress

bar,

with a view object that is NOT currently associated with a given
cursor position.  Thus, bind view is constantly recycling and

binding

view objects to new item/cursor positions.
This is especially a problem if the user attempts to push a

button

on

one of the items while it's being bound to a different view

object


[android-developers] Re: Can apps that use device-specific permissions be published to Android Market?

2011-02-09 Thread String
I'm pretty sure they can. I have apps that interface with the SonyEricsson 
LiveView, and in order to do so they have this in their manifest:

uses-permission 
android:name=com.sonyericsson.extras.liveview.permission.LIVEVIEW_API /

This has never interfered with publishing, it seems to be ignored by 
the Market.

String

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

Re: [android-developers] Bluetooth socket connection issue

2011-02-09 Thread Laurent Lugon
Hi,

I've try to add delay before, after, before and after but the result still
unchanger...

It's not a headset it's a device used to protect your valuables, it checks
the bluetooth connection and when it to far from the mobile phone (= loose
the bluetooth connection)  an alarm is started.

Any more idea ?

Thank you

  Best regards


SECU4 SA
Laurent Lugon Moulin

Technical  Development Assistant
 Technopôle 5
3960 Sierre – Switzerland

Office  :   +4127 4567 931
Fax  :   +4127 4567
935
Mobile :   +4179 4509 566

Skype :   laurent.lugon.moulin

www.secu4.com






On Wed, Feb 9, 2011 at 05:02, Ajith Kamath sjce.aj...@gmail.com wrote:

 Hi

 Checked the logs. Everything seems to be fine.
 I'm not sure what the prob is. Try adding some delay before bluetooth
 socket connect takes place.
 this might be needed if you are connecting to some headsets/handsfree.

 If Still it doesn solve the problem.. Add logs upto jni level and send the
 logs.
 The logs which you have added so far does not point out any problems .

 Also tell what kind of device are you trying to connect to you mobile.?

 Regards,
 Ajith

 On Tue, Feb 8, 2011 at 7:40 PM, Laurent Lugon laurent.lu...@secu4.comwrote:

 Hi Ajith,

 I've add logs in the connectThread and connectedThread.

 See the result in attached files.


 Thank you for your help !

   Best regards


 SECU4 SA
 Laurent Lugon Moulin

 Technical  Development Assistant
 Technopôle 5
 3960 Sierre – Switzerland

 Office  :   +4127 4567 931 +41274567931
 Fax  :   +4127 4567 935 +41274567935

 Mobile :   +4179 4509 566 +41794509566

 Skype :   laurent.lugon.moulin

 www.secu4.com






 On Tue, Feb 8, 2011 at 06:10, Ajith Kamath sjce.aj...@gmail.com wrote:

 Hi

 Sorry I rechecked logs again. *BEGIN mConnectedThread *seems to be
 called.
 my bad.

 Still please add logs before and after connect and send

 Regards,
 Ajith

   On Tue, Feb 8, 2011 at 10:39 AM, Ajith Kamath sjce.aj...@gmail.comwrote:


 Hi

 From the attached logs, its unclear what is the error.
 Discovery seems to be stopped in an odd manner, but that should not
 generate any problem
 You need to rig the code , add more logs.

 Since the connect thread was called, add more logs in Connect thread
 It seems that *BEGIN mConnectedThread* is never displayed.
 I think there exists problem in connect thread. Please check this.

 Also what I meant by my previous question is that, What kind of h/w are
 you trying to connect to your mobile(Ex: headset, handsfree, carkit etc 
 etc)

 Regards,
 Ajith






 On Mon, Feb 7, 2011 at 6:16 PM, Laurent Lugon 
 laurent.lu...@secu4.comwrote:

 Hi Ajith,

 You will find the logs attached.

 I use our own hardware device. It's the product we develop :
 http://www.secu4.com/en/product.html
 It's works realy good with the actual software so it's not a hardware
 issue. I'm developing the new version of the software related to our 
 product
 and we change different things on the bluetooth connection procedure.

   Best regards


 SECU4 SA
 Laurent Lugon Moulin

 Technical  Development Assistant
 Technopôle 5
 3960 Sierre – Switzerland

 Office  :   +41274567931+4127 4567 931 +41274567931

 Fax  :   +41274567935+4127 4567 935 +41274567935

 Mobile :   +41794509566+4179 4509 566 +41794509566
 Skype :   laurent.lugon.moulin

 www.secu4.com






 On Mon, Feb 7, 2011 at 12:01, Ajith Kamath sjce.aj...@gmail.comwrote:

 please paste the logs. And what bluetooth h/w are you trying to
 connect to your mobile device

 Regards,
 Ajith

   On Mon, Feb 7, 2011 at 4:21 PM, Laurent Lugon 
 laurent.lu...@secu4.com wrote:

  Hi all,

 I use a hardware bluetooth device and I need to connect it to my
 mobile phone. I've follow the instruction on developer.android.comto 
 set up a bluetooth connection but I still have a problem. When I'm
 connecting to the Bluetooth Socket with bluetoothSocket.connect() I 
 don't
 catch any exception so according to the docs, that mean I'm connected 
 to my
 device. The problem is I'm not... Here is my code :

 private class AcceptThread extends Thread {
 // The local server socket
 private final BluetoothServerSocket mmServerSocket;

 public AcceptThread() {
 BluetoothServerSocket tmp = null;

 // Create a new listening server socket
 try {
 tmp = mAdapter
 .listenUsingRfcommWithServiceRecord(NAME,
 MY_UUID);
 } catch (IOException e) {
 Log.e(TAG, listen() failed, e);
 }
 mmServerSocket = tmp;
 }

 public void run() {
 if (D)
 Log.d(TAG, BEGIN mAcceptThread + this);
 setName(AcceptThread);
 BluetoothSocket socket = null;

 // Listen to the server socket if we're not connected
 while (mState != STATE_CONNECTED) {
 try {
 // This is a blocking call and will only return
 on a
 

[android-developers] Optimization - Memory - Garbage collection

2011-02-09 Thread Kacee
Hi all,

I have a static instance singleton class object. I want that object to
be garbage collected/null as soon as I close my application using back
button.

Whats happening is - My Object is alive, between two launch of
application and hence retains the state. However,I am taking care of
all instance variables by resetting them after their use by my own
class.reset() method.

What I want is to make my Class object eligible for gc as soon as I
have come out of my applciation using back button. I dont want my
object to stay on heap between two launches. As there may be a gap of
few hrs / days between two launches of app on actual device. So dont
want the object to be alive unnecessarily.

I know, android will take care of gc when it will call ondestroy() at
its own, but I think one should not rely on ondestroy().

Can anyone please suggest any way to destroy objects right after
application is stopped ? (although process is still visible in ddms)

Thansk 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] Redrawing a view when the transparent activity closes

2011-02-09 Thread vivin joy
Hi All,
   i have an Activity called MainActivity. It has a custom view on
it and a button. When i press a button, it opens a new Activity with a
translucent theme so that MainActiivty is paused. The Second Activity
has got a EditText. and i type something over there and press a button
which closes the second activity and it returns back to MainActivity.
When we return back to MainActivity, i need to redraw the custom view
depending on what i typed in the second Activity. but it doesn't get
re-drawn immediately after i have returned. It gets re-drawn only
after i touch the custom view. How do i make a custom view re-draw
immediately when i return to an activity? plz people help me with
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


Re: [android-developers] Re: Can apps that use device-specific permissions be published to Android Market?

2011-02-09 Thread Marcin Orlowski
On 9 February 2011 11:24, String sterling.ud...@googlemail.com wrote:
 I'm pretty sure they can. I have apps that interface with the SonyEricsson
 LiveView, and in order to do so they have this in their manifest:
     uses-permission
 android:name=com.sonyericsson.extras.liveview.permission.LIVEVIEW_API /
 This has never interfered with publishing, it seems to be ignored by
 the Market.

Their permission is no different that any other custom permision (i.e. yours)
and you can publish app using such w/o any problems. Market knows
own permisions and ignore unknown/custom.

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

2011-02-09 Thread Adriano B. Godinho
Hi,

Did you try to call View.invalidate?

On Wed, Feb 9, 2011 at 9:02 AM, vivin joy joy.viv...@gmail.com wrote:

 Hi All,
   i have an Activity called MainActivity. It has a custom view on
 it and a button. When i press a button, it opens a new Activity with a
 translucent theme so that MainActiivty is paused. The Second Activity
 has got a EditText. and i type something over there and press a button
 which closes the second activity and it returns back to MainActivity.
 When we return back to MainActivity, i need to redraw the custom view
 depending on what i typed in the second Activity. but it doesn't get
 re-drawn immediately after i have returned. It gets re-drawn only
 after i touch the custom view. How do i make a custom view re-draw
 immediately when i return to an activity? plz people help me with
 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




-- 
Adriano Godinho

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

2011-02-09 Thread Johan Abramsson
In the firmware 2.0.A.504 of Xperia X10 there seems to have sneaked in
a problem regarding usage of the undocumented orientation
parameters. That parameter is not correctly implemented. Work is
ongoing to solve this issue, (although it is not documented in the
android vanilla doc's) however I recommend to lock the activity in a
orientation mode in the mean time.

 
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);


Good luck.

  /Johan

On Jan 31, 1:27 pm, himen patel himen.pa...@gmail.com wrote:
 hi i am an android developer.

 i am making a camera application in android.
 i have a sony Experia X10. version 2.1
 i am launching a hardware camera. but when the
 preview is start it come with noise in portrait mode or 90 degree anti
 clockwise
 but in landscape it comes better.

 but if i checked same appliction in sony Experia X8. version 2.1
 preview comes good in both mode landscape or portrait.

 i can't understand where is the issue.

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


[android-developers] Using fragments between Applications

2011-02-09 Thread shankar
Hi,
Now in honeycomb we can  fragments in an activity, so how about
using the fragments between different applications.
i.e. I would like to use the fragment of one application in to
another application.

if any one know about this, please suggest me, this will solve lot
of my work.

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

2011-02-09 Thread Mark Murphy
On Wed, Feb 9, 2011 at 5:55 AM, Kacee komal...@gmail.com wrote:
 I have a static instance singleton class object. I want that object to
 be garbage collected/null as soon as I close my application using back
 button.

Your application is not closed using the BACK button. Your activity is
destroyed using the BACK button.

 Whats happening is - My Object is alive, between two launch of
 application and hence retains the state.

Your process is not immediately destroyed when all components (e.g.,
activities) have been destroyed.

 What I want is to make my Class object eligible for gc as soon as I
 have come out of my applciation using back button.

Your application is not closed using the BACK button. Your activity is
destroyed using the BACK button.

 I know, android will take care of gc when it will call ondestroy() at
 its own, but I think one should not rely on ondestroy().

Either onDestroy() will be called, or the process will be terminated.

 Can anyone please suggest any way to destroy objects right after
 application is stopped ? (although process is still visible in ddms)

Set static data members to null when you are done with them.

Or, don't put data in static data members that you are concerned about
from a space standpoint.

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

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

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

2011-02-09 Thread FrankG
BTW .. the Settings app simply uses the AIDL Interface to the
mount service via IMountService and calls mount.

And com.android.server.MountService sends the notifications.

The mountVolume call has this check inside :

validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS);

The MountService then communicates using the NativeDaemonConnector via
sockets
( I assume with then native SystemServer  )

Good luck ! Frank




On 9 Feb., 06:32, maikelalonso maikelalonsob...@gmail.com wrote:
 Thanks for the reply. The solution might be to run a portion of code
 that makes the same as Menu- Settings- External Storage- Mount
 SDCARD. I understand you're telling me that's impossible.

 (Congratulations for your blog. Is very interesting).

 On 8 feb, 19:34, Kostya Vasilyev kmans...@gmail.com wrote:



  How about checking the source yourself?

 http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;...

  However, Settings might be using an internal API not available to
  applications (most likely is), and, AFAIK, is signed with the platform
  key, which you can't replicate in your code, root or not.

  Your best bet might be to directly exec mount with appropriate
  parameters. Also try asking on android-porting or 
  onhttp://www.xda-developers.com/-programmers there should be able to
  tell you for sure.

  -- Kostya

  08.02.2011 20:04, maikelalonso пишет:

   Hi,  I've rooted my device and I've root privileges. All is Ok. The
   only one problem is the code to run in order to get mounted the sd
   card.
   What's the command running in Android when I make Menu-Settings-
   External storage-Mount SD CARD?
   On 8 feb, 17:45, Marcin Orlowskiwebnet.andr...@gmail.com  wrote:
   On 8 February 2011 16:41, maikelalonsomaikelalonsob...@gmail.com  
   wrote:

   Hi:
   Anyone know how to mount the sdcard from code? I umount this storage
   from menu-settings-umount sd card and I want to mount it from an
   androd application.  I can get the state with getExternalStorageState
   and the path to the mounted sdcard folder but I dont know if it's
   possible to mount the device from java code.
   Mount requires certain privileges your app simply does not have unless
   you got rooted device (and grant yourself root rights)

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

 - Zitierten Text anzeigen -

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


Re: [android-developers] Using fragments between Applications

2011-02-09 Thread Mark Murphy
On Wed, Feb 9, 2011 at 7:26 AM, shankar jayashankar...@gmail.com wrote:
    Now in honeycomb we can  fragments in an activity, so how about
 using the fragments between different applications.

At runtime, applications are in different processes, and you cannot
share fragments between them.

At compile time, put your fragments in an Android library project, and
use them from multiple projects.

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

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

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

2011-02-09 Thread Mark Murphy
On Wed, Feb 9, 2011 at 1:48 AM, b_t bartata...@gmail.com wrote:
 Some device has 2 SD-card. Is there any way in the API to get all of
 them?

No. Android supports one spot for external storage. Device
manufacturers that offer more than one would need to document for you
the rules for their specific device(s).

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

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

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

2011-02-09 Thread DanH
Classes (and class-scope objects) are not collected until the class
loader that loaded the class is collected.  If you want this class to
be collected you need to load it with its own class loader.  However,
be aware that class collection may not be fully implemented on
Android.

On Feb 9, 4:55 am, Kacee komal...@gmail.com wrote:
 Hi all,

 I have a static instance singleton class object. I want that object to
 be garbage collected/null as soon as I close my application using back
 button.

 Whats happening is - My Object is alive, between two launch of
 application and hence retains the state. However,I am taking care of
 all instance variables by resetting them after their use by my own
 class.reset() method.

 What I want is to make my Class object eligible for gc as soon as I
 have come out of my applciation using back button. I dont want my
 object to stay on heap between two launches. As there may be a gap of
 few hrs / days between two launches of app on actual device. So dont
 want the object to be alive unnecessarily.

 I know, android will take care of gc when it will call ondestroy() at
 its own, but I think one should not rely on ondestroy().

 Can anyone please suggest any way to destroy objects right after
 application is stopped ? (although process is still visible in ddms)

 Thansk 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] [ASK] Charting and SVG in android

2011-02-09 Thread Handita Okviyanto
Hello. I need your help. I want to make an application in android that
has a charting features and a map. I have a plan to use SVG in my
application in the future. But I'm just a newbie in android. Anyone
can help me finding a charting library or how to use SVG in android??

I want to make a representation data in various of chart and one of
them use a map that I want to view data on this map. Anyone has a try
before or Somebody can help me. Thanks for the attention.

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

2011-02-09 Thread Mark Murphy
On Wed, Feb 9, 2011 at 8:17 AM, Handita Okviyanto viyanatm...@gmail.com wrote:
 Hello. I need your help. I want to make an application in android that
 has a charting features and a map. I have a plan to use SVG in my
 application in the future. But I'm just a newbie in android. Anyone
 can help me finding a charting library or how to use SVG in android??

http://stackoverflow.com/questions/424752/any-good-graphing-packages-for-android
http://stackoverflow.com/questions/3889882/svg-support-on-android
http://stackoverflow.com/questions/4202030/how-to-read-svg-file
http://stackoverflow.com/questions/2969037/svg-to-android-shape

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

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

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


[android-developers] Insrumentation testing in Android

2011-02-09 Thread Oleg Popenov
Hi,

I've tried to run Instrumentation Tests on device from adb shell and I get a
strange error, could you please help me?
If I run tests for any internal android application (email for example) as
it written in AndroidManifest.xml,

* !--*
* This declares that this app uses the instrumentation test runner targeting
*
* the package of com.android.email.  To run the tests use the command:*
* adb shell am instrument -w
com.android.email.tests/android.test.InstrumentationTestRunner*
* --*

then I get an error:

*am instrument -w
com.android.email.tests/android.test.InstrumentationTestRunner
**INSTRUMENTATION_STATUS: id=ActivityManagerService
**INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for:
Component
**Info{com.android.email.tests/android.test.InstrumentationTestRunner}
**INSTRUMENTATION_STATUS_CODE: -1
**android.util.AndroidException: INSTRUMENTATION_FAILED:
com.android.email.tests/a*
*ndroid.test.InstrumentationTestRunner*

 *
*
The result of the command *'pm list instrumentation' *is empty.
How can I run tests?

Thanks in advance!
Most sincerely, Oleg

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

2011-02-09 Thread astegic astegic
Or you can try view.requestlayout

On Wed, Feb 9, 2011 at 4:58 PM, Adriano B. Godinho
adri...@godinho.eng.brwrote:

 Hi,

 Did you try to call View.invalidate?

 On Wed, Feb 9, 2011 at 9:02 AM, vivin joy joy.viv...@gmail.com wrote:

 Hi All,
   i have an Activity called MainActivity. It has a custom view on
 it and a button. When i press a button, it opens a new Activity with a
 translucent theme so that MainActiivty is paused. The Second Activity
 has got a EditText. and i type something over there and press a button
 which closes the second activity and it returns back to MainActivity.
 When we return back to MainActivity, i need to redraw the custom view
 depending on what i typed in the second Activity. but it doesn't get
 re-drawn immediately after i have returned. It gets re-drawn only
 after i touch the custom view. How do i make a custom view re-draw
 immediately when i return to an activity? plz people help me with
 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




 --
 Adriano Godinho

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


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

[android-developers] Re: DDMS does not show VM list

2011-02-09 Thread jotobjects

On Feb 8, 9:35 pm, Xavier Ducrohet x...@android.com wrote:
 Looks like you have a phone running a debug build where all the apps
 are debuggable by default and the other one is running a production
 build (user build) where the apps are not debuggable unless they
 declare debuggable=true in their manifest.

How can you tell when a phone is a user build?

I am building the two apps that I want to debug.  Both have
debuggable=true

   android:debuggable=true

I install them from the same USB cable with this command

   adb -d install -r foobar.apk

The apps use a library app that does not have
android:debuggable=true in its manifest.

The identical APK files are installed on both phones.  In one phone
the app processes show up in DDMS. In the other they don't.

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


[android-developers] Caching of sensor events

2011-02-09 Thread Heiko
Hi,

I'm currently testing the impact of heavy CPU workload on
accelerometer sampling frequency. It appears, that when CPU workload
is high, the samplerate oscillates between higher and lower than
average values. I'm also storing the timestamp diff between two events
and the test reveals, that there is also an oscillation here.

You can see the time diff between sensor events here):
http://cl.ly/2S3o2T0w3A1W181i3g3F

N is the phase with normal CPU load, Y the phase with high CPU load
(around 95%+).

The influence on the sample rate can be seen in this chart):
http://cl.ly/1T253P041O0R2m1U3Z1V

How does android process events in case of high CPU load? Does it
collect events and then sends many of them in a burst phase to the
handler of an app?

Best
Heiko

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


[android-developers] Android Market anomaly in limiting distribution

2011-02-09 Thread DanaH
I am preparing to release the latest update to our company's app. This
application is intended to be released only within the United States,
and in the past this has not presented any difficulty. Apparently with
the recent updates to the Android Market publishing page, I am no
longer able to select only the United States as my intended country.
When I unselect the default All Countries option, and then select
United States, the All Countries check box again becomes selected.
This anomalous behavior is not unique to selecting the U.S.; selecting
any country causes the All Countries check box to become selected.

Has anyone else seen this behavior? This functionality worked as
expected in the previous release of Android Market.

I am running on Windows XP Professional, and I see this behavior both
with Internet Explorer and Safari web browsers.

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

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 10:20 AM, DanaH dhauk...@gmail.com wrote:

 Apparently with
 the recent updates to the Android Market publishing page, I am no
 longer able to select only the United States as my intended country.
 When I unselect the default All Countries option, and then select
 United States, the All Countries check box again becomes selected.
 This anomalous behavior is not unique to selecting the U.S.; selecting
 any country causes the All Countries check box to become selected.


http://www.google.com/support/androidmarket/bin/request.py?contact_type=bugs

-
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: Android Market anomaly in limiting distribution

2011-02-09 Thread Maps.Huge.Info (Maps API Guru)
I see the same thing. If it is indeed the case, shortly I'll be seeing
a bunch of one star comments in different languages. Our weather app
(Radar Now!) only functions in the US and border regions of Canada and
Mexico. I'll post back if that's the case.

-John Coryat

On Feb 9, 10:20 am, DanaH dhauk...@gmail.com wrote:
 I am preparing to release the latest update to our company's app. This
 application is intended to be released only within the United States,
 and in the past this has not presented any difficulty. Apparently with
 the recent updates to the Android Market publishing page, I am no
 longer able to select only the United States as my intended country.
 When I unselect the default All Countries option, and then select
 United States, the All Countries check box again becomes selected.
 This anomalous behavior is not unique to selecting the U.S.; selecting
 any country causes the All Countries check box to become selected.

 Has anyone else seen this behavior? This functionality worked as
 expected in the previous release of Android Market.

 I am running on Windows XP Professional, and I see this behavior both
 with Internet Explorer and Safari web browsers.

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


[android-developers] Telling 2.2 vs 2.2.1

2011-02-09 Thread DulcetTone
How can I tell, robustly, whether my app is running under Android 2.2
vs 2.2.1 (or later within 2.2)?

tone

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

2011-02-09 Thread Ed Burnette
Hard info to replace the rumors would be most welcome. :)

According to Viewsonic, there will be a release in between 2.3 and 3.0
(http://www.pocket-lint.com/news/38311/android-2-4-april-release-
date). That means it must be under development somewhere now, which
means some folks (the involved devs and project leads at least) have
an idea what will go in it. Without roadmaps or public source trees or
development work-blogs, the rest of us are left to guess and
speculate. I'd much rather we didn't have to.


On Feb 8, 1:14 am, Dianne Hackborn hack...@android.com wrote:
 The Honeycomb framework APIs are introduced in 3.0.  Any platform that has
 them would be 3.0 or later.  (And more important, any platform that has them
 would have an API level that is at least that of Honeycomb.)

 Rumors, so much fun. :p









 On Mon, Feb 7, 2011 at 8:43 PM, Kevin Duffey andjar...@gmail.com wrote:
  There is a 2.4 in the works if the rumor mill is correct, from my
  understanding of potentially bad sources, 2.4 will be a sort of reduced
  honeycomb for phones, hopefully giving it the same UI but perhaps a few
  different things? I am really curious how this is going to play out.
  Naturally the apple fanboys are shouting fragmentation again, but I am
  really interested in the UI differences between 3.0 and any new version for
  phones that come out. Will phones go the way of tablets, no buttons, same
  UI, etc? I personally hope so, the 3.0 UI looks fantastic.

  On Mon, Feb 7, 2011 at 5:17 PM, Mark Murphy mmur...@commonsware.comwrote:

  My initial reaction was that it was an homage to Spinal Tap.

  On Mon, Feb 7, 2011 at 7:47 PM, Ed Burnette ed.burne...@gmail.com
  wrote:
   11? Does that mean the next 2.x release will be API level 10 and that
   there will only be one more 2.x release with API changes? Or am I
   reading too much into it? I was wondering how that numbering hiccup
   was going to be handled.

   On Feb 7, 3:01 am, Dianne Hackborn hack...@android.com wrote:
   I don't know why it says that about minSdkVersion.  The value of
   minSdkVersion doesn't matter; all that matters is that
   targetSdkVersion=Honeycomb.  (Or 11 in the final API.)

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

  Android 2.3 Programming Books:http://commonsware.com/books

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

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

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

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

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


Re: [android-developers] Telling 2.2 vs 2.2.1

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 11:16 AM, DulcetTone dulcett...@gmail.com wrote:

 How can I tell, robustly, whether my app is running under Android 2.2 vs
 2.2.1 (or later within 2.2)?



Not sure what difference it makes, but:
http://developer.android.com/reference/android/os/Build.VERSION.html#RELEASE

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

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

Re: [android-developers] help needed in youtube api for android and using it

2011-02-09 Thread TreKing
On Tue, Feb 8, 2011 at 11:52 PM, kavitha b kkavith...@gmail.com wrote:

 I am fed up of searching a working example for using youtube gdata api for
 displaying videos in android.

 Can anybody please provide a working example of using gdata for android?


I doubt someone is just going to give you code because you're fed up with
searching.
What have you done so far? Where are you stuck? What, precisely, are you
having trouble with?

-
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] ArrayList with contacts view issue

2011-02-09 Thread Abalufaske
Hi, with the code above I got an unexpected error, how can I fix it?
Do I have to override de ArrayAdapter?

The objets code are in: 
http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/3/

this is the code:
package org.interfaz;


import java.util.ArrayList;

import org.interfaz.contactsApi.Objects.Address;
import org.interfaz.contactsApi.Objects.Contact;
import org.interfaz.contactsApi.Objects.Email;
import org.interfaz.contactsApi.Objects.IM;
import org.interfaz.contactsApi.Objects.Organization;
import org.interfaz.contactsApi.Objects.Phone;

import android.app.Activity;
import android.content.ContentResolver;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;


public class start extends Activity {
private Cursor cur;
private ContentResolver cr;


public Cursor getCur() {
return cur;
}

public void setCur(Cursor cur) {
this.cur = cur;
}

public ContentResolver getCr() {
return cr;
}

public void setCr(ContentResolver cr) {
this.cr = cr;
}

public Intent getContactIntent() {
return(new Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI));
}
  /** Called when the activity is first created. */
  public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Inflate your view
setContentView(R.layout.main);

// Get references to UI widgets
ListView myListView = (ListView)findViewById(R.id.myListView);
final EditText myEditText =
(EditText)findViewById(R.id.myEditText);

// Create the array list of to do items
final ArrayListContact todoItems =   new ArrayListContact();

String id;
if (this.cur.getCount()  0) {
while (cur.moveToNext()) {
this.cur = this.cr.query(ContactsContract.Contacts.CONTENT_URI,
 null, null, null, null);

Contact c = new Contact();
id =
cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
c.setId(id);

c.setDisplayName(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)));
if
(Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER)))
 0) {
c.setPhone(this.getPhoneNumbers(id));
}
c.setEmail(this.getEmailAddresses(id));
c.setNotes(this.getContactNotes(id));
c.setAddresses(this.getContactAddresses(id));
c.setImAddresses(this.getIM(id));
c.setOrganization(this.getContactOrg(id));
todoItems.add(c);


}}


// Create the array adapter to bind the array to the listview
final ArrayAdapterContact aa;
aa = new ArrayAdapterContact(this,
  android.R.layout.simple_list_item_1,
  todoItems);
// Bind the array adapter to the listview.
myListView.setAdapter(aa);

myEditText.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
  if (event.getAction() == KeyEvent.ACTION_DOWN)
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER)
{
 // todoItems.add(0, myEditText.getText().toString());
  aa.notifyDataSetChanged();
  myEditText.setText();
  return true;
}
  return false;
}
  });
  }

public ArrayListPhone getPhoneNumbers(String id) {
ArrayListPhone phones = new ArrayListPhone();

Cursor pCur = this.cr.query(

ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
null,

ContactsContract.CommonDataKinds.Phone.CONTACT_ID + = ?,
new String[]{id}, null);
while (pCur.moveToNext()) {
phones.add(new Phone(
 
pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER))
,
pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))
));

}
pCur.close();
return(phones);
}

public ArrayListEmail getEmailAddresses(String id) {
   

[android-developers] Disable autosuggest/correct

2011-02-09 Thread André
I have an edittext where i want the user to have the choice to turn
off the autosuggest when typing. I tried to change the inputType but
it only changed the edittext to singel line edittext which I don't
want even when I included
android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
Any suggestions of how to do that?

//André

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


[android-developers] Read files to edittext

2011-02-09 Thread André
What would be the best way of reading large text files from the
sdcard?

Right now I'm using this in my browser activity:

File f = new File(filePath);
FileInputStream file = new FileInputStream(f);
BufferedReader in = new BufferedReader(new InputStreamReader(file));
do {
st = in.readLine();
vector.add(st);
} while (st != null);
in.close();

and in the other activity where I want to edit the file I have:

char lf = 10;
int k = 0;
String s = null;
for (int i = 0; i  browseractivity.vector.size(); i++) {
s = browseractivity.vector.get(k);
if (s != null) {
editText.append(s);
editText.append(String.valueOf(lf));
}
k++;
}

When trying this on a file of 24648 bytes which corresponds to 24097
chars on 555 lines
I looked in Notepad++ at which characters it cuts.
It displays 8764 characters which corresponds exactly to 9000 bytes
and 237 lines

Does any one have a better suggestion of how to do this so I can read
larger files?

//André

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


[android-developers] Re: Android Market anomaly in limiting distribution

2011-02-09 Thread Hari Edo

Try signing out of the Market console, shutting down your web browser
instance completely, and forcing a refresh of the page.  This sounds
similar to a complaint where Free apps were reported with 'invalid
price' in many countries; a clean browser session fixed the problems.

On Feb 9, 12:01 pm, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 I see the same thing. If it is indeed the case, shortly I'll be seeing
 a bunch of one star comments in different languages. Our weather app
 (Radar Now!) only functions in the US and border regions of Canada and
 Mexico. I'll post back if that's the case.

 -John Coryat

 On Feb 9, 10:20 am, DanaH dhauk...@gmail.com wrote:



  I am preparing to release the latest update to our company's app. This
  application is intended to be released only within the United States,
  and in the past this has not presented any difficulty. Apparently with
  the recent updates to the Android Market publishing page, I am no
  longer able to select only the United States as my intended country.
  When I unselect the default All Countries option, and then select
  United States, the All Countries check box again becomes selected.
  This anomalous behavior is not unique to selecting the U.S.; selecting
  any country causes the All Countries check box to become selected.

  Has anyone else seen this behavior? This functionality worked as
  expected in the previous release of Android Market.

  I am running on Windows XP Professional, and I see this behavior both
  with Internet Explorer and Safari web browsers.

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

2011-02-09 Thread Kostya Vasilyev

Andre,

This works for me:

android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences

on a Motorola Milestone with the Motorola Keyboard, but still gives 
suggestions with the Mobidiv Keyboard.


So it looks to be up to the IME to respect that flag, and if it ignores 
it, then well, it ignores it.


-- Kostya

09.02.2011 20:54, André пишет:

I have an edittext where i want the user to have the choice to turn
off the autosuggest when typing. I tried to change the inputType but
it only changed the edittext to singel line edittext which I don't
want even when I included
android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
Any suggestions of how to do that?

//André




--
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: Honeycomb SDK

2011-02-09 Thread Xavier Ducrohet
I'm not commenting on rumors, but Android 2.3.3 (API *10*) is out as an SDK.

Xav

On Wed, Feb 9, 2011 at 9:27 AM, Ed Burnette ed.burne...@gmail.com wrote:
 Hard info to replace the rumors would be most welcome. :)

 According to Viewsonic, there will be a release in between 2.3 and 3.0
 (http://www.pocket-lint.com/news/38311/android-2-4-april-release-
 date). That means it must be under development somewhere now, which
 means some folks (the involved devs and project leads at least) have
 an idea what will go in it. Without roadmaps or public source trees or
 development work-blogs, the rest of us are left to guess and
 speculate. I'd much rather we didn't have to.


 On Feb 8, 1:14 am, Dianne Hackborn hack...@android.com wrote:
 The Honeycomb framework APIs are introduced in 3.0.  Any platform that has
 them would be 3.0 or later.  (And more important, any platform that has them
 would have an API level that is at least that of Honeycomb.)

 Rumors, so much fun. :p









 On Mon, Feb 7, 2011 at 8:43 PM, Kevin Duffey andjar...@gmail.com wrote:
  There is a 2.4 in the works if the rumor mill is correct, from my
  understanding of potentially bad sources, 2.4 will be a sort of reduced
  honeycomb for phones, hopefully giving it the same UI but perhaps a few
  different things? I am really curious how this is going to play out.
  Naturally the apple fanboys are shouting fragmentation again, but I am
  really interested in the UI differences between 3.0 and any new version for
  phones that come out. Will phones go the way of tablets, no buttons, same
  UI, etc? I personally hope so, the 3.0 UI looks fantastic.

  On Mon, Feb 7, 2011 at 5:17 PM, Mark Murphy mmur...@commonsware.comwrote:

  My initial reaction was that it was an homage to Spinal Tap.

  On Mon, Feb 7, 2011 at 7:47 PM, Ed Burnette ed.burne...@gmail.com
  wrote:
   11? Does that mean the next 2.x release will be API level 10 and that
   there will only be one more 2.x release with API changes? Or am I
   reading too much into it? I was wondering how that numbering hiccup
   was going to be handled.

   On Feb 7, 3:01 am, Dianne Hackborn hack...@android.com wrote:
   I don't know why it says that about minSdkVersion.  The value of
   minSdkVersion doesn't matter; all that matters is that
   targetSdkVersion=Honeycomb.  (Or 11 in the final API.)

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

  Android 2.3 Programming Books:http://commonsware.com/books

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

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

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

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

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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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


[android-developers] Re: Disable autosuggest/correct

2011-02-09 Thread André
Thanks Kostya

How do I do that in java? Since I want it to be an option.

On Feb 9, 7:24 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Andre,

 This works for me:

 android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences

 on a Motorola Milestone with the Motorola Keyboard, but still gives
 suggestions with the Mobidiv Keyboard.

 So it looks to be up to the IME to respect that flag, and if it ignores
 it, then well, it ignores it.

 -- Kostya

 09.02.2011 20:54, André пишет:

  I have an edittext where i want the user to have the choice to turn
  off the autosuggest when typing. I tried to change the inputType but
  it only changed the edittext to singel line edittext which I don't
  want even when I included
  android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
  Any suggestions of how to do that?

  //André

 --
 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: DDMS does not show VM list

2011-02-09 Thread Xavier Ducrohet
The device view in ddms should show the type of build for the device
in the top level tree node.

If your app is set to debuggable through the manifest, I don't know
why it wouldn't show up on the 2nd device.

On Wed, Feb 9, 2011 at 6:39 AM, jotobjects jotobje...@gmail.com wrote:

 On Feb 8, 9:35 pm, Xavier Ducrohet x...@android.com wrote:
 Looks like you have a phone running a debug build where all the apps
 are debuggable by default and the other one is running a production
 build (user build) where the apps are not debuggable unless they
 declare debuggable=true in their manifest.

 How can you tell when a phone is a user build?

 I am building the two apps that I want to debug.  Both have
 debuggable=true

   android:debuggable=true

 I install them from the same USB cable with this command

   adb -d install -r foobar.apk

 The apps use a library app that does not have
 android:debuggable=true in its manifest.

 The identical APK files are installed on both phones.  In one phone
 the app processes show up in DDMS. In the other they don'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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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


[android-developers] Re: Amazon to Policy Android Market Place

2011-02-09 Thread niko20
Amazon's pretty much screwing the pooch on this whole store thing
anyway, taking next to forever for it to actually appear in real
form...so far just been a huge waste of my time..

-nik

On Jan 15, 3:08 am, blindfold seeingwithso...@gmail.com wrote:
 Indeed that can work for some, at the expense of a bloated APK (ZXing
 is about twice as large as my app, so it would likely triple my APK
 size), and at the expense of updates to ZXing not automatically
 becoming available to your users until you release your own update
 that bundles an updated ZXing, or unless you add additional checks to
 see if ZXing is already installed and use that external one instead of
 your baked-in copy of ZXing.

 For me this approach would not work anyway, because apart from ZXing
 my app also launches Google Goggles and if not installed searches for
 it on Android Market, while I am working on third-party product
 referrals via Android Market. Again I have no idea if those third-
 party products will ever land in theAmazonAppstore.

 In relation to some discussion notes by others: I welcome alternatives
 for Android Market, and I distribute my app also via for instance
 Phoload, AndAppStore and Getjar, as well as via my own website, but in
 all those cases I need not change a bit to my APK and can rely on
 Android Market for extending basic functionality of my app.Amazon
 Appstore sets a precedent, and leaves the whole burden of sorting out
 how to best deal with it to the developer.

 Thanks

 On Jan 15, 4:14 am, Brill Pappin br...@pappin.ca wrote:







  @blindfold I have an experimental app that does the same thing. Luck
  for us, the Xzing code can be pulled down an added to your local app.
  However this is apparently a drawback to multiple app stores!

  - Brill Pappin

  On Jan 14, 4:26 pm, blindfold seeingwithso...@gmail.com wrote:

   My app got rejected byAmazonAppstore today because it searches for a
   third-party app (the well-known free ZXing barcode reader) on Android

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


Re: [android-developers] Re: Camerapreview

2011-02-09 Thread Kevin Duffey
Email intent.. which you can use to bring up email app and attach photo to
it, to/subject/etc lines

final Intent i = new Intent(Intent.ACTION_SEND);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setType(image/jpg);
i.putExtra(android.content.Intent.EXTRA_EMAIL,
new String[] {yourem...@yourcompany.com });
i.putExtra(android.content.Intent.EXTRA_SUBJECT,
Subject);
i.putExtra(android.content.Intent.EXTRA_TEXT,
Body of email here);

// attach saved photo from sdcard location
i.putExtra(Intent.EXTRA_STREAM,
Uri.parse(file:///sdcard/data/photo.jpg));
// pop up the email program for user to preview and send from
startActivity(i);

As for your first issue, in your camera takepicture handler, you save the
image to whever you want. That is the path you use in the Uri.parse() call
above.


On Tue, Feb 8, 2011 at 11:34 PM, Jayanthi jaia...@gmail.com wrote:

 Yes , I have seen loads of example but now I am trying this for
 Samsung Galaxy Tab ,here my problem is I couldn't able to set Image
 path to ImageButton
 Thanks,

 On Feb 9, 1:57 am, Joe McCann joseph.is...@gmail.com wrote:
  Seriously, did you google it?  There are loads of examples.
 
  On Feb 8, 3:12 am, Jayanthi jaia...@gmail.com wrote:
 
   Hi,
   I am new to android I want to send mail with image attached to it
   I need solution for two question
   1.How to get the path of image saved in sd card using camera preview
   2.How to send mail by attaching image
 
 

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


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

2011-02-09 Thread Kevin Duffey
Wait.. a server running in the emulator? So your app is a server that will
run on android devices? I am a bit lost as to why a client device would
run a server, especially on a mobile phone. Is there a reason you need to do
this? If you're trying to push data from a page to the mobile phone, using
a server app on the phone is not the way to go. But perhaps you have another
reason you need to run a server on the phone?

On Tue, Feb 8, 2011 at 9:04 PM, SREEHARI harisre...@gmail.com wrote:


 Hi Kevin,

 Thanks for the reply. What I am trying is to contact the android
 server application from an html(jscript) page running in normal
 windows browser. I want to fetch the data and want to display it in
 the web page. I think ur 3rd suggession will help me. But my doubt is
 how can I make the connection from normal html(Browser) with sever
 running in Android emulator?

 Regards,
 Hari

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


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

Re: [android-developers] Re: Disable autosuggest/correct

2011-02-09 Thread Kostya Vasilyev

Umm, you call setInputType with flags according to this:

http://developer.android.com/reference/android/text/InputType.html

InputType.TYPE_CLASS_TEXT
| InputType.TYPE_TEXT_FLAG_MULTI_LINE
| InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS

seems about right.

-- Kostya

09.02.2011 21:27, André пишет:

Thanks Kostya

How do I do that in java? Since I want it to be an option.

On Feb 9, 7:24 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Andre,

This works for me:

android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences

on a Motorola Milestone with the Motorola Keyboard, but still gives
suggestions with the Mobidiv Keyboard.

So it looks to be up to the IME to respect that flag, and if it ignores
it, then well, it ignores it.

-- Kostya

09.02.2011 20:54, André пишет:


I have an edittext where i want the user to have the choice to turn
off the autosuggest when typing. I tried to change the inputType but
it only changed the edittext to singel line edittext which I don't
want even when I included
android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
Any suggestions of how to do that?
//André

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



--
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: DDMS does not show VM list

2011-02-09 Thread Kostya Vasilyev
FWIW, my Motorola Milestone (not a Droid2, but same manufacturer and 
roughly same hardware) drops from DDMS every few hours.


When that happens, I still see it in the DDMS view, but it goes from 
Online to Offline - which does your bad one show?


I then unplug it from the computer, wait for Windows to make the usb 
disconnected sound, and plug it back in. After that it works for a 
while again.


-- Kostya

09.02.2011 21:28, Xavier Ducrohet пишет:

The device view in ddms should show the type of build for the device
in the top level tree node.

If your app is set to debuggable through the manifest, I don't know
why it wouldn't show up on the 2nd device.

On Wed, Feb 9, 2011 at 6:39 AM, jotobjectsjotobje...@gmail.com  wrote:

On Feb 8, 9:35 pm, Xavier Ducrohetx...@android.com  wrote:

Looks like you have a phone running a debug build where all the apps
are debuggable by default and the other one is running a production
build (user build) where the apps are not debuggable unless they
declare debuggable=true in their manifest.

How can you tell when a phone is a user build?

I am building the two apps that I want to debug.  Both have
debuggable=true

   android:debuggable=true

I install them from the same USB cable with this command

   adb -d install -r foobar.apk

The apps use a library app that does not have
android:debuggable=true in its manifest.

The identical APK files are installed on both phones.  In one phone
the app processes show up in DDMS. In the other they don'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







--
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: Disable autosuggest/correct

2011-02-09 Thread André
That doesn't work when I try it on my Desire. Could that be because
HTC has change their version of android a little?

// André

On Feb 9, 7:38 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Umm, you call setInputType with flags according to this:

 http://developer.android.com/reference/android/text/InputType.html

 InputType.TYPE_CLASS_TEXT
      | InputType.TYPE_TEXT_FLAG_MULTI_LINE
      | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS

 seems about right.

 -- Kostya

 09.02.2011 21:27, André пишет:









  Thanks Kostya

  How do I do that in java? Since I want it to be an option.

  On Feb 9, 7:24 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  Andre,

  This works for me:

  android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences

  on a Motorola Milestone with the Motorola Keyboard, but still gives
  suggestions with the Mobidiv Keyboard.

  So it looks to be up to the IME to respect that flag, and if it ignores
  it, then well, it ignores it.

  -- Kostya

  09.02.2011 20:54, André пишет:

  I have an edittext where i want the user to have the choice to turn
  off the autosuggest when typing. I tried to change the inputType but
  it only changed the edittext to singel line edittext which I don't
  want even when I included
  android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
  Any suggestions of how to do that?
  //André
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 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: Honeycomb SDK

2011-02-09 Thread Dianne Hackborn
When there is actual good hard info to provide, it is.  Many of these rumors
get started by companies saying things based on incomplete knowledge or
understanding before any firm decisions have been made.  Trust me, you
probably don't want to try to follow the changing world that exists before
real announcements are made; that would give you more of a headache, not
less.

On Wed, Feb 9, 2011 at 9:27 AM, Ed Burnette ed.burne...@gmail.com wrote:

 Hard info to replace the rumors would be most welcome. :)

 According to Viewsonic, there will be a release in between 2.3 and 3.0
 (http://www.pocket-lint.com/news/38311/android-2-4-april-release-
 date). That means it must be under development somewhere now, which
 means some folks (the involved devs and project leads at least) have
 an idea what will go in it. Without roadmaps or public source trees or
 development work-blogs, the rest of us are left to guess and
 speculate. I'd much rather we didn't have to.


 On Feb 8, 1:14 am, Dianne Hackborn hack...@android.com wrote:
  The Honeycomb framework APIs are introduced in 3.0.  Any platform that
 has
  them would be 3.0 or later.  (And more important, any platform that has
 them
  would have an API level that is at least that of Honeycomb.)
 
  Rumors, so much fun. :p
 
 
 
 
 
 
 
 
 
  On Mon, Feb 7, 2011 at 8:43 PM, Kevin Duffey andjar...@gmail.com
 wrote:
   There is a 2.4 in the works if the rumor mill is correct, from my
   understanding of potentially bad sources, 2.4 will be a sort of reduced
   honeycomb for phones, hopefully giving it the same UI but perhaps a few
   different things? I am really curious how this is going to play out.
   Naturally the apple fanboys are shouting fragmentation again, but I am
   really interested in the UI differences between 3.0 and any new version
 for
   phones that come out. Will phones go the way of tablets, no buttons,
 same
   UI, etc? I personally hope so, the 3.0 UI looks fantastic.
 
   On Mon, Feb 7, 2011 at 5:17 PM, Mark Murphy mmur...@commonsware.com
 wrote:
 
   My initial reaction was that it was an homage to Spinal Tap.
 
   On Mon, Feb 7, 2011 at 7:47 PM, Ed Burnette ed.burne...@gmail.com
   wrote:
11? Does that mean the next 2.x release will be API level 10 and
 that
there will only be one more 2.x release with API changes? Or am I
reading too much into it? I was wondering how that numbering hiccup
was going to be handled.
 
On Feb 7, 3:01 am, Dianne Hackborn hack...@android.com wrote:
I don't know why it says that about minSdkVersion.  The value of
minSdkVersion doesn't matter; all that matters is that
targetSdkVersion=Honeycomb.  (Or 11 in the final API.)
 
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
   android-developers@googlegroups.com
To unsubscribe from this group, 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
 
   Android 2.3 Programming Books:http://commonsware.com/books
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
--
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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

Re: [android-developers] Re: Disable autosuggest/correct

2011-02-09 Thread Kostya Vasilyev
On my Milestone the XML fragment I posted below only works for one of 
the two keyboards built into the firmware.


Perhaps HTC also decided that users always want autocorrection? :)

-- Kostya

09.02.2011 21:50, André пишет:

That doesn't work when I try it on my Desire. Could that be because
HTC has change their version of android a little?

// André

On Feb 9, 7:38 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Umm, you call setInputType with flags according to this:

http://developer.android.com/reference/android/text/InputType.html

InputType.TYPE_CLASS_TEXT
  | InputType.TYPE_TEXT_FLAG_MULTI_LINE
  | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS

seems about right.

-- Kostya

09.02.2011 21:27, André пишет:










Thanks Kostya
How do I do that in java? Since I want it to be an option.
On Feb 9, 7:24 pm, Kostya Vasilyevkmans...@gmail.comwrote:

Andre,
This works for me:
android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences
on a Motorola Milestone with the Motorola Keyboard, but still gives
suggestions with the Mobidiv Keyboard.
So it looks to be up to the IME to respect that flag, and if it ignores
it, then well, it ignores it.
-- Kostya
09.02.2011 20:54, André пишет:

I have an edittext where i want the user to have the choice to turn
off the autosuggest when typing. I tried to change the inputType but
it only changed the edittext to singel line edittext which I don't
want even when I included
android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
Any suggestions of how to do that?
//André

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

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



--
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: Question for Google employees: How would our apps run on the new Kyocera Echo?

2011-02-09 Thread Russell DuRoss
So, hopefully an average app will run fine in either Single Screen or
tablet mode without changes.

On Feb 8, 4:06 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 http://developer.sprint.com/site/global/develop/mobile_platforms/andr...

  
 With the Echo™ your apps can provide three different visual experiences:

 Single-Screen Mode- app runs like a standard Android device with a
 single 480x800(HDPI) screen

 Tablet Mode- app runs across both screens, filling them up similar to a
 tablet where your application thinks it has a single display of
 800x960(HDPI)

 Optimized Mode- utilizing the Echo™ SDK your application can utilize
 each screen for unique functionality, for example you may have a layout
 on the top screen with a music player and a layout on the bottom screen
 showing your music library.
 

 -- Kostya

 08.02.2011 23:56, Russell DuRoss пишет:

  That seems to leave open the issue of what happens when the user has
  only one screen open, since the second screen is apparently a slide-
  out.

  On Feb 8, 10:19 am, Stringsterling.ud...@googlemail.com  wrote:
  IANAG, but according to Engadget, third party apps can't be run in any of 
  the new modes and just fill the entire display for now --Kyocera and 
  Sprint say an SDK is coming shortly.

  So it sounds like, until this special SDK arrives, it's a normal 960x800 
  screen as far as our apps are concerned.

  String

 --
 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] Getting Owner and Contact Data

2011-02-09 Thread Kevin Duffey
Heh..I started using that owner permission too.. glad to know it will be
gone (or is it gone in 2.3?). Question is, when a person buys a new android
phone, at least on Verizon, they generally can attach the phone to a google
account. Is there some way to get that particular users info, or is the only
way an app can do this is to ask for it from the user?

I am messing around with an app where I'd like to send some data from phone
to a service, and some of that data is the owner of the phone's email
address. From what your saying Dianne, there is no way to discern this
information from the contacts database or accounts set up? So, the only way
to guarantee it every time is to ask for it in the app?

Thanks


On Tue, Sep 7, 2010 at 5:49 PM, Dianne Hackborn hack...@android.com wrote:

 Android has no concept of an owner.  Those permissions don't do anything
 (and will be gone in the next release).


 On Wed, Sep 1, 2010 at 12:11 PM, Dritan djdea...@gmail.com wrote:

 Hello,

 I'm writing an app on to make use of the owner's data (first, last,
 email(s), phone(s)) and one or more contacts the owner can choose. The
 application will find common patterns and whatnot.

 I have given my app READ_CONTACTS, WRITE_CONTACTS, READ_OWNER_DATA,
 WRITE_OWNER_DATA permissions in my AndroidManifest.xml

 Initially I used the People class which was deprecated, then I
 switched to ContactsContract.Contacts...
 to try pull explicitly the first (given), middle, and last (family)
 names, then phone numbers, emails, etc... but I cannot seem to be able
 to fetch these columns via:

 Cursor c1 =
 getContentResolver().query(ContactsContract.Data.CONTENT_URI, null,
 ContactsContract.CommonDataKinds.StructuredName.CONTACT_ID + = ?,
 new String[]{id}, null);

 Or even this

 Cursor cc =
 getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,
 null, null,null, null);
 if (cc.moveToFirst()){
String [] names = cc.getColumnNames();
for (int j=0; jnames.length; j++){
Log.d(Contacts, COL NAME:
 +names[j]);
Log.d(Contacts, COL VALUE:
  +cc.getString(cc.getColumnIndexOrThrow(names[j]))+\n\n);
}

}

 to show all column names but I'm not getting any relevant information.
 I can get the phone number (data 0 or data 1), but not first, middle,
 and last. I need to access as much of the user's data for the
 algorithm to work as it compares it with other people to find trends
 and patterns. The more complete the data the better.

 Here's another alternative way I tried with the first cursor c1:

 String lookup =
 c1.getString(c.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
 Cursor cc =
 getContentResolver().query(
 Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_LOOKUP_URI,
 lookup), null, null, null, null);

 and still I cannot get the owner's or a contact's data that I want.

 Does anyone have any clue as to why I can't get the contact fields I
 need... or how I can get them?

 I really appreciate any insights.
 Thanks!

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




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

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


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


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

Re: [android-developers] Re: Question for Google employees: How would our apps run on the new Kyocera Echo?

2011-02-09 Thread Kostya Vasilyev

They have to make it so:

If that device only run apps specifically developed for it, it'll be a flop.

And even then there is nothing to worry about - if they only sell a 
dozen (figuratively speaking), do you care if your app runs on it?


-- Kostya

09.02.2011 22:07, Russell DuRoss пишет:

So, hopefully an average app will run fine in either Single Screen or
tablet mode without changes.

On Feb 8, 4:06 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

http://developer.sprint.com/site/global/develop/mobile_platforms/andr...

  
With the Echo(tm) your apps can provide three different visual experiences:

Single-Screen Mode- app runs like a standard Android device with a
single 480x800(HDPI) screen

Tablet Mode- app runs across both screens, filling them up similar to a
tablet where your application thinks it has a single display of
800x960(HDPI)

Optimized Mode- utilizing the Echo(tm) SDK your application can utilize
each screen for unique functionality, for example you may have a layout
on the top screen with a music player and a layout on the bottom screen
showing your music library.


-- Kostya

08.02.2011 23:56, Russell DuRoss пишет:


That seems to leave open the issue of what happens when the user has
only one screen open, since the second screen is apparently a slide-
out.
On Feb 8, 10:19 am, Stringsterling.ud...@googlemail.comwrote:

IANAG, but according to Engadget, third party apps can't be run in any of the new 
modes and just fill the entire display for now --Kyocera and Sprint say an SDK is coming 
shortly.
So it sounds like, until this special SDK arrives, it's a normal 960x800 
screen as far as our apps are concerned.
String

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



--
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: Amazon to Policy Android Market Place

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 12:32 PM, niko20 nikolatesl...@yahoo.com wrote:

 Amazon's pretty much screwing the pooch on this whole store thing anyway,
 taking next to forever for it to actually appear in real form...


Better they take their time and get it right from the get-go then pull an
Android Market (pull an Android Market meaning provide a terrible user
and developer experience all around, of course).


 so far just been a huge waste of my time..


Considering there's no store yet, that's given. The question will be was it
a huge waste of your time? once it launches.

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

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

Re: [android-developers] Read files to edittext

2011-02-09 Thread Kostya Vasilyev
Can't speak for size limitations, but why are putting the data into a 
vector, and appending to EditText one line at a time?


Reading line by line and building the content in a StringBuilder seems 
more efficient, then you can do editText.setText() just once.


And reading one line at a time is only necessary if your file comes from 
Windows and contains '\r' characters (they are not recognized by 
TextView and have to be stripped, leaving just '\n'-s).


-- Kostya

09.02.2011 21:20, André пишет:

What would be the best way of reading large text files from the
sdcard?

Right now I'm using this in my browser activity:

File f = new File(filePath);
FileInputStream file = new FileInputStream(f);
BufferedReader in = new BufferedReader(new InputStreamReader(file));
do {
st = in.readLine();
vector.add(st);
} while (st != null);
in.close();

and in the other activity where I want to edit the file I have:

char lf = 10;
int k = 0;
String s = null;
for (int i = 0; i  browseractivity.vector.size(); i++) {
s = browseractivity.vector.get(k);
if (s != null) {
editText.append(s);
editText.append(String.valueOf(lf));
}
k++;
}

When trying this on a file of 24648 bytes which corresponds to 24097
chars on 555 lines
I looked in Notepad++ at which characters it cuts.
It displays 8764 characters which corresponds exactly to 9000 bytes
and 237 lines

Does any one have a better suggestion of how to do this so I can read
larger files?

//André




--
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] Peer to Peer Streaming Protocol on Android ?

2011-02-09 Thread Emre A. Yavuz

Hi,
 
Can anyone suggest a peer to peer streaming protocol library that works well 
with Android ?
 
Cheers,
 
Emre
 

  

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

2011-02-09 Thread jotobjects
@ Xavier Ducrohet
Where is the device view in DDMS?  I see a Device menu but nothing
that shows the build type

@ Kosta
It shows online for both devices


On Feb 9, 10:41 am, Kostya Vasilyev kmans...@gmail.com wrote:
 FWIW, my Motorola Milestone (not a Droid2, but same manufacturer and
 roughly same hardware) drops from DDMS every few hours.

 When that happens, I still see it in the DDMS view, but it goes from
 Online to Offline - which does your bad one show?

 I then unplug it from the computer, wait for Windows to make the usb
 disconnected sound, and plug it back in. After that it works for a
 while again.

 -- Kostya

 09.02.2011 21:28, Xavier Ducrohet пишет:



  The device view in ddms should show the type of build for the device
  in the top level tree node.

  If your app is set to debuggable through the manifest, I don't know
  why it wouldn't show up on the 2nd device.

  On Wed, Feb 9, 2011 at 6:39 AM, jotobjectsjotobje...@gmail.com  wrote:
  On Feb 8, 9:35 pm, Xavier Ducrohetx...@android.com  wrote:
  Looks like you have a phone running a debug build where all the apps
  are debuggable by default and the other one is running a production
  build (user build) where the apps are not debuggable unless they
  declare debuggable=true in their manifest.
  How can you tell when a phone is a user build?

  I am building the two apps that I want to debug.  Both have
  debuggable=true

     android:debuggable=true

  I install them from the same USB cable with this command

     adb -d install -r foobar.apk

  The apps use a library app that does not have
  android:debuggable=true in its manifest.

  The identical APK files are installed on both phones.  In one phone
  the app processes show up in DDMS. In the other they don'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

 --
 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] Intent Flags ignored coming from an widget?

2011-02-09 Thread Dirk Vranckaert
All,

For the app i'm currently writing I  needs some help.

My activity structure when launching the app with the launcher:
HomeActivity = ListActivity
On the listActivity I've put a home button with a clear top flag
(intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);)
So pressing the home button makes me return to my home activity, on my
home activity pressing the back button results in the application
closing. That exactly what I want.

However when you click a button on my widget you directly go to the
ListActivity. Then you click the home button and the flag on the
intent is set correctly but the stack isn't cleared at all! So when
arriving at my home activity I press the back button and instead of
quitting the application it goes back to my ListActivity.

Any ideas how I can resolve this one?

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

2011-02-09 Thread Robin Talwar
Ok finally today i got my first post on twitter :) and then haywards 5000 to
celebrate ahe

so i have found the best solution for the beginner to integrate twitter
since it has only one library which does authentication and even updates the
status . Follow the link :-

http://thetechnib.blogspot.com/2011/01/android-sign-in-with-twitter.html

Now obviously you will be embedding it in some applications on which posting
to twitter is not the first activity.
In that case you will have to add
android:launchmode = singleInstance in your activity tag in manifest file

Also it is better to use jtwitter 2.1.7 or latest since the code has
jtwitter 2.1.0 and i got stuck for 4 hours for that reason
*
Note: Be careful in mentioning the Callback Url*

On Mon, Feb 7, 2011 at 3:16 AM, Robin Talwar
r.o.b.i.n.abhis...@gmail.comwrote:

 Ok i got it
 i organized all my jar files in lib folder and made necessary changes in
 import statements.
 Now i can login to the twitter account and authorize the app.
 But i still can not update the status :(


 On Mon, Feb 7, 2011 at 2:42 AM, Lance Nanek lna...@gmail.com wrote:

 Those classes are in the Twitter4J core JAR. So that isn't getting
 properly included in your Java build path as a library if you can't
 import them. So double check that.

 One problematic thing I see you doing earlier is keeping your library
 JARs in the assets folder. The assets folder is a special folder used
 for things like HTML files that you want included with your
 application and accessible at runtime just as they are. You shouldn't
 keep library JARs in there. Those have to be converted from Java byte
 code to Dalvik code anyway. You should use a different directory, like
 a lib directory under your project directory. The fact that they are
 referenced as libraries will make sure they are converted and the
 converted output included in your APK. See this link:

 http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

 And the sidebar here:

 http://developer.android.com/guide/topics/resources/accessing-resources.html

 On Feb 6, 1:51 pm, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote:
  hey
  thanks for sharing the link i have added all the three jars and made one
  class file copied the code.
  Everything is fine i have removed many errors by importing specific
 classes
  and setting up the context.
  But still there are two class files which eclipse is not able to import
 and
  these are :-
 
 -
 
 import twitter4j.http.AccessToken;
 
 -
 
 import twitter4j.TwitterFactory;
 
  and hence there are errors in my file so please guide me where did i go
  wrong.
 
  On Sun, Feb 6, 2011 at 7:42 PM, Lance Nanek lna...@gmail.com wrote:
   I use:http://twitter4j.org/
 
   There are various examples out there:
 
  http://code.google.com/p/agirardello/source/browse/trunk/OAuthExample.
 ..
 
   On Feb 6, 3:49 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote:
Ya i got you. May be i got you wrong plus there are not much android
experienced developers who like to encourage beginners
out there. Anyways treking i have done some google search and i have
   reached
a safe stage where i am directing my app to OAUTH login page and
 when the
user logs in he is directed back to my application but now i dont
 know
   how
to update its twitter status?
Should i do that in onResume?
The following are the steps i followed :-
 
   - I added signpost core and signpost commonshttp4 jar files in
 assets
   folder
   - then i added them in build path
   - Then in my main java file i declare following constants before
   oncreate
 
private static final String CONSUMER_KEY = EuMduRyU4fJcaVgPuN9vA;
private static final String CONSUMER_SECRET =
JsiDIvPTPhxcV7NgYkw5HVDO0HC41eI2A8ELVLwqqRU;
 
private static String ACCESS_KEY = null;
private static String ACCESS_SECRET = null;
 
private static final String REQUEST_URL = 
  http://twitter.com/oauth/request_token;;
private static final String ACCESS_TOKEN_URL = 
  http://twitter.com/oauth/access_token;;
private static final String AUTH_URL = 
  http://twitter.com/oauth/authorize;;
private static final String CALLBACK_URL = myTweet://twitt;
private static final String PREFERENCE_FILE =
 twitter_oauth.prefs;
 
private static CommonsHttpOAuthConsumer consumer = new
CommonsHttpOAuthConsumer(
CONSUMER_KEY, CONSUMER_SECRET);
private static CommonsHttpOAuthProvider provider = new
CommonsHttpOAuthProvider(
REQUEST_URL, ACCESS_TOKEN_URL, AUTH_URL);
 
   - In oncreate i created an onclick listener with the following
 code :-
 
try {
 String authURL = provider.retrieveRequestToken(
consumer, CALLBACK_URL);
 
Log.d(OAuthTwitter, authURL);
startActivity(new Intent(Intent.ACTION_VIEW, Uri

[android-developers] Re: Disable autosuggest/correct

2011-02-09 Thread André
They probably have! :)

Thanks for the help though!

On Feb 9, 7:57 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 On my Milestone the XML fragment I posted below only works for one of
 the two keyboards built into the firmware.

 Perhaps HTC also decided that users always want autocorrection? :)

 -- Kostya

 09.02.2011 21:50, André пишет:









  That doesn't work when I try it on my Desire. Could that be because
  HTC has change their version of android a little?

  // André

  On Feb 9, 7:38 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  Umm, you call setInputType with flags according to this:

 http://developer.android.com/reference/android/text/InputType.html

  InputType.TYPE_CLASS_TEXT
        | InputType.TYPE_TEXT_FLAG_MULTI_LINE
        | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS

  seems about right.

  -- Kostya

  09.02.2011 21:27, André пишет:

  Thanks Kostya
  How do I do that in java? Since I want it to be an option.
  On Feb 9, 7:24 pm, Kostya Vasilyevkmans...@gmail.com    wrote:
  Andre,
  This works for me:
  android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences
  on a Motorola Milestone with the Motorola Keyboard, but still gives
  suggestions with the Mobidiv Keyboard.
  So it looks to be up to the IME to respect that flag, and if it ignores
  it, then well, it ignores it.
  -- Kostya
  09.02.2011 20:54, André пишет:
  I have an edittext where i want the user to have the choice to turn
  off the autosuggest when typing. I tried to change the inputType but
  it only changed the edittext to singel line edittext which I don't
  want even when I included
  android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
  Any suggestions of how to do that?
  //André
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 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: Read files to edittext

2011-02-09 Thread André
Didn't think about stringbuilder when I did it. But I'll try it!

Does anyone else have any suggestions about size limitations?

//André

On Feb 9, 8:16 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Can't speak for size limitations, but why are putting the data into a
 vector, and appending to EditText one line at a time?

 Reading line by line and building the content in a StringBuilder seems
 more efficient, then you can do editText.setText() just once.

 And reading one line at a time is only necessary if your file comes from
 Windows and contains '\r' characters (they are not recognized by
 TextView and have to be stripped, leaving just '\n'-s).

 -- Kostya

 09.02.2011 21:20, André пишет:









  What would be the best way of reading large text files from the
  sdcard?

  Right now I'm using this in my browser activity:

  File f = new File(filePath);
  FileInputStream file = new FileInputStream(f);
  BufferedReader in = new BufferedReader(new InputStreamReader(file));
  do {
     st = in.readLine();
     vector.add(st);
  } while (st != null);
  in.close();

  and in the other activity where I want to edit the file I have:

  char lf = 10;
  int k = 0;
  String s = null;
  for (int i = 0; i  browseractivity.vector.size(); i++) {
     s = browseractivity.vector.get(k);
     if (s != null) {
             editText.append(s);
             editText.append(String.valueOf(lf));
     }
     k++;
  }

  When trying this on a file of 24648 bytes which corresponds to 24097
  chars on 555 lines
  I looked in Notepad++ at which characters it cuts.
  It displays 8764 characters which corresponds exactly to 9000 bytes
  and 237 lines

  Does any one have a better suggestion of how to do this so I can read
  larger files?

  //André

 --
 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: === My ContentProvider.query() can not populate a Cursor. ===

2011-02-09 Thread ClarkBattle
Cool!  Thanks.

On Feb 8, 10:58 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Take a look at MatrixCursor.


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

2011-02-09 Thread András Turi
Does this solution works for everyone except for me?

Here they talk about the same, suggesting the same:
http://stackoverflow.com/questions/3647821/android-highlighted-tab-of-tabwidget-not-readable-on-htc-sense


But, for me, it is still broken..
I have a HTC Desire, with builtin Sense UI, Android 2.2, recently
updated to build version 2.29.405.2.

Whenever there is a standard Android TabWidget (my own app or even the
API Demos), the selected tab's label text is unreadable, because it is
nearly the same shade of gray as the background of the selected tab
header.

Yes, I have android:targetSdkVersion=4 in the manifest, but the
problem still exists..

If I set the color to white manually, it is readable on my Desire, but
won't be readable on any device with stock, senseUI-less Android.

Is there a way to tell whether a device is running with Sense UI?
(Which not involves asking the user..)
(I know, this was already asked in this group;
http://groups.google.com/group/android-developers/browse_thread/thread/464bb67f67989aad/10fe10da56a6842b?lnk=gstq=sense+ui#10fe10da56a6842b
There Dianne Hackborn asked why would anyone want to know whether on
Sense or not.. well, this is an example... )


(I haven't come across any builtin apps which used the builtin
TabWidget, they use their own tabbing..)


It is a pity that such a simple thing like builtin, uncustomized
tabbing is broken between different vendor-UI customizations..



cheers
Turi András


On Sun, Dec 12, 2010 at 8:22 AM, JonFHancock jonfhanc...@gmail.com wrote:

 Yes and it drives me mad!

 The only solution I have found is to target my app to 1.6 (sdk 4).
 Then the tabs look the same across all devices,  but they look like
 sense tabs.


 On Dec 11, 1:54 pm, JimmyHoffa photos.d...@gmail.com wrote:
 Hi all,

 Has anyone found themselves with the same problem I do when using a
 TabWidget on Sense Devices.

 It appears that the text colour for selected/unselected tabs are
 reversed.  I.e. instead of the selected tab being white text and
 unselected gray, it's the other way around so the selected tab is very
 difficult to read.

 Not sure why this is happening but would love to know if anyone has
 any ideas..

 Thanks

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

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

2011-02-09 Thread Kostya Vasilyev
Just one last thought - you might want to check your code with another 
keyboard, there are plenty in Market, just to be sure whether your code 
is correct. Good luck.


-- Kostya

09.02.2011 22:34, André пишет:

They probably have! :)

Thanks for the help though!

On Feb 9, 7:57 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

On my Milestone the XML fragment I posted below only works for one of
the two keyboards built into the firmware.

Perhaps HTC also decided that users always want autocorrection? :)

-- Kostya

09.02.2011 21:50, André пишет:










That doesn't work when I try it on my Desire. Could that be because
HTC has change their version of android a little?
// André
On Feb 9, 7:38 pm, Kostya Vasilyevkmans...@gmail.comwrote:

Umm, you call setInputType with flags according to this:
http://developer.android.com/reference/android/text/InputType.html
InputType.TYPE_CLASS_TEXT
   | InputType.TYPE_TEXT_FLAG_MULTI_LINE
   | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
seems about right.
-- Kostya
09.02.2011 21:27, André пишет:

Thanks Kostya
How do I do that in java? Since I want it to be an option.
On Feb 9, 7:24 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Andre,
This works for me:
android:inputType=text|textMultiLine|textNoSuggestions|textCapSentences
on a Motorola Milestone with the Motorola Keyboard, but still gives
suggestions with the Mobidiv Keyboard.
So it looks to be up to the IME to respect that flag, and if it ignores
it, then well, it ignores it.
-- Kostya
09.02.2011 20:54, André пишет:

I have an edittext where i want the user to have the choice to turn
off the autosuggest when typing. I tried to change the inputType but
it only changed the edittext to singel line edittext which I don't
want even when I included
android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE.
Any suggestions of how to do that?
//André

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

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

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



--
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] Howto get string /dev/block/vold/179:1 ( sdcard device) in an android app

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 12:18 AM, maikelalonso maikelalonsob...@gmail.comwrote:

 Anyone knows if there is any way to get the device path of the SDCARD?


http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()

-
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: Can't properly stop a thread

2011-02-09 Thread Kaloian Doganov
The onDestroy() is called on various occasions, not necessary related
to user exiting the application. If you effectively stop your
background thread in onDestroy(), your background task would not
survive a simple orientation change.

On Feb 2, 1:07 pm, Serdel adam.lichwierow...@gmail.com wrote:
 In my application I am connecting to a server and downloading some
 things. Not much but the connection it self takes a while. Off course
 this is done in a thread (class that implements runnable). If some
 error occurs, the thread sends a message to the UI using a Handler and
 the UI displays an dialog window.

 My problem is that I can't stop the thread in the UI properly. For
 example if during the connection I would press the 'home' button on
 the phone, after some seconds I get an error saying that my
 application couldn't create a dialog window (because it is not running
 anymore). That means that my thread was not stopped and kept on
 working until an error (i.e. timeout) occurred and tried to send a
 massege to the UI by a handler.

 to Stop the thread I have a function that I found:

                   public synchronized Thread stopThread(Thread thr){
                           if(thr != null){
                             Thread temp = thr;
                           thr = null;
                             temp.interrupt();
                           }
                           return thr;
                         }

 And I use it like:

 @Override
         public void onDestroy()
             {
                 super.onDestroy();
                senderTh= stopThread(senderTh);
                finish();
             }

 Why this doesn't stop my Thread? How can I do it from the UI?

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


[android-developers] Change package name after market deployment

2011-02-09 Thread Neilz
Hi all. We put an app on the market, and now the client wants to
change the package names to something completely different.

Will the market let you do this, if I upload an update? Or must the
package structure remain the same once uploaded?

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] Getting Owner and Contact Data

2011-02-09 Thread Dianne Hackborn
There is not a phone's e-mail address.  If the user downloaded your app
from Market, they must have a Google account set up, but they may have
multiple accounts.  And anyway, that account is part of the Google services;
this is not something that is part of the actual Android platform.

On Wed, Feb 9, 2011 at 11:10 AM, Kevin Duffey andjar...@gmail.com wrote:

 Heh..I started using that owner permission too.. glad to know it will be
 gone (or is it gone in 2.3?). Question is, when a person buys a new android
 phone, at least on Verizon, they generally can attach the phone to a google
 account. Is there some way to get that particular users info, or is the only
 way an app can do this is to ask for it from the user?

 I am messing around with an app where I'd like to send some data from phone
 to a service, and some of that data is the owner of the phone's email
 address. From what your saying Dianne, there is no way to discern this
 information from the contacts database or accounts set up? So, the only way
 to guarantee it every time is to ask for it in the app?

 Thanks


 On Tue, Sep 7, 2010 at 5:49 PM, Dianne Hackborn hack...@android.comwrote:

 Android has no concept of an owner.  Those permissions don't do anything
 (and will be gone in the next release).


 On Wed, Sep 1, 2010 at 12:11 PM, Dritan djdea...@gmail.com wrote:

 Hello,

 I'm writing an app on to make use of the owner's data (first, last,
 email(s), phone(s)) and one or more contacts the owner can choose. The
 application will find common patterns and whatnot.

 I have given my app READ_CONTACTS, WRITE_CONTACTS, READ_OWNER_DATA,
 WRITE_OWNER_DATA permissions in my AndroidManifest.xml

 Initially I used the People class which was deprecated, then I
 switched to ContactsContract.Contacts...
 to try pull explicitly the first (given), middle, and last (family)
 names, then phone numbers, emails, etc... but I cannot seem to be able
 to fetch these columns via:

 Cursor c1 =
 getContentResolver().query(ContactsContract.Data.CONTENT_URI, null,
 ContactsContract.CommonDataKinds.StructuredName.CONTACT_ID + = ?,
 new String[]{id}, null);

 Or even this

 Cursor cc =
 getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,
 null, null,null, null);
 if (cc.moveToFirst()){
String [] names = cc.getColumnNames();
for (int j=0; jnames.length; j++){
Log.d(Contacts, COL NAME:
 +names[j]);
Log.d(Contacts, COL VALUE:
  +cc.getString(cc.getColumnIndexOrThrow(names[j]))+\n\n);
}

}

 to show all column names but I'm not getting any relevant information.
 I can get the phone number (data 0 or data 1), but not first, middle,
 and last. I need to access as much of the user's data for the
 algorithm to work as it compares it with other people to find trends
 and patterns. The more complete the data the better.

 Here's another alternative way I tried with the first cursor c1:

 String lookup =
 c1.getString(c.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
 Cursor cc =
 getContentResolver().query(
 Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_LOOKUP_URI,
 lookup), null, null, null, null);

 and still I cannot get the owner's or a contact's data that I want.

 Does anyone have any clue as to why I can't get the contact fields I
 need... or how I can get them?

 I really appreciate any insights.
 Thanks!

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




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

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


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


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




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


[android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Tobiah

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user.  Right now, they have
to touch inside the EditText to get the keyboard.  Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText?  This would be similar to what
happens when I use the search button.

Thanks,

Tobiah

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


Re: [android-developers] Using fragments between Applications

2011-02-09 Thread Dianne Hackborn
No, this is deliberately not a design goal of fragments.  This is actually
one of the reasons they have a much better programming model than embedded
activities.

On Wed, Feb 9, 2011 at 4:26 AM, shankar jayashankar...@gmail.com wrote:

 Hi,
Now in honeycomb we can  fragments in an activity, so how about
 using the fragments between different applications.
i.e. I would like to use the fragment of one application in to
 another application.

if any one know about this, please suggest me, this will solve lot
 of my work.

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




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

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

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

Re: [android-developers] Change package name after market deployment

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 2:51 PM, Neilz neilhorn...@gmail.com wrote:

 Will the market let you do this, if I upload an update?


Nope.


 Or must the package structure remain the same once uploaded?


Yup.

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

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

Re: [android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Kostya Vasilyev
You can try setting an onShowListener for the dialog, and calling 
editText.requestFocus.


-- Kostya

09.02.2011 23:56, Tobiah пишет:

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user. Right now, they have
to touch inside the EditText to get the keyboard. Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText? This would be similar to what
happens when I use the search button.

Thanks,

Tobiah




--
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] ArrayList with contacts view issue

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 11:43 AM, Abalufaske abalufa...@gmail.com wrote:

 Hi, with the code above I got an unexpected error, how can I fix it?


Instead of pasting a gigantic blob of unformatted code that no one is going
to read, please explain what unexpected error means and what you have
tried to fix it yourself.

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

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

Re: [android-developers] Change package name after market deployment

2011-02-09 Thread Mark Murphy
On Wed, Feb 9, 2011 at 3:51 PM, Neilz neilhorn...@gmail.com wrote:
 Hi all. We put an app on the market, and now the client wants to
 change the package names to something completely different.

 Will the market let you do this, if I upload an update? Or must the
 package structure remain the same once uploaded?

The package in the manifest must be the same, if you want updates to work.

How the classes are organized are another matter, though the
code-generated classes will go wherever the manifest's package states
-- I don't know if there is a way to override that. You will have to
fully-qualify all your components' android:name attributes to be the
full package, if they are not in the manifest's package (or a
subpackage).

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

_Android Programming Tutorials_ Version 3.1 Available!

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


Re: [android-developers] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Tobiah

On 02/09/2011 01:25 PM, Kostya Vasilyev wrote:

You can try setting an onShowListener for the dialog, and calling 
editText.requestFocus.


You got me on the right track, thanks.  Just requesting focus was not enough
however.  At first I was trying to do this:

InputMethodManager input_manager = (InputMethodManager) 
getSystemService(borg.INPUT_METHOD_SERVICE);
input_manager.showSoftInput(dialog_edit_text, input_manager.SHOW_IMPLICIT);

Where borg is an ApplicationContext.  This was not working, but I was doing it
right in onCreateDialog() callback.  Presumably since there was at that time
no editable field on the screen, the keyboard refused to open.  Where would
the keystrokes go?

So I put the two lines in the onShowListener callback, and
everything works.  Requesting focus was not necessary, but
that is probably be cause there was only one EditText in the
dialog.

By the way, when doing this, should I test for the presence
and state of a physical keyboard (my device doesn't have one)
or will that be done automatically?

Thanks!

Tobiah




-- Kostya

09.02.2011 23:56, Tobiah пишет:

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user. Right now, they have
to touch inside the EditText to get the keyboard. Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText? This would be similar to what
happens when I use the search button.

Thanks,

Tobiah






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

2011-02-09 Thread Kostya Vasilyev
You can also upload it as a new application, with a new package name and 
a new key, and remove the old one.


If you published just now, and it's a serious issue for your customer, 
why not let them have what they want? Just make them sign in blood that 
they won't ask you to do it again :)


-- Kostya

10.02.2011 0:03, TreKing ?:
On Wed, Feb 9, 2011 at 2:51 PM, Neilz neilhorn...@gmail.com 
mailto:neilhorn...@gmail.com wrote:


Will the market let you do this, if I upload an update?


Nope.

Or must the package structure remain the same once uploaded?


Yup.

-
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 



--
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] Focus and raise keyboard for Dialog with EditText

2011-02-09 Thread Kostya Vasilyev

No idea about the hardware keyboard, sorry.

Have you tried requesting focus inside the show listener? I would think 
it'd do the right thing for both soft/hard keyboards.


-- Kostya

10.02.2011 1:12, Tobiah пишет:

On 02/09/2011 01:25 PM, Kostya Vasilyev wrote:
You can try setting an onShowListener for the dialog, and calling 
editText.requestFocus.


You got me on the right track, thanks.  Just requesting focus was not 
enough

however.  At first I was trying to do this:

InputMethodManager input_manager = (InputMethodManager) 
getSystemService(borg.INPUT_METHOD_SERVICE);
input_manager.showSoftInput(dialog_edit_text, 
input_manager.SHOW_IMPLICIT);


Where borg is an ApplicationContext.  This was not working, but I was 
doing it
right in onCreateDialog() callback.  Presumably since there was at 
that time
no editable field on the screen, the keyboard refused to open.  Where 
would

the keystrokes go?

So I put the two lines in the onShowListener callback, and
everything works.  Requesting focus was not necessary, but
that is probably be cause there was only one EditText in the
dialog.

By the way, when doing this, should I test for the presence
and state of a physical keyboard (my device doesn't have one)
or will that be done automatically?

Thanks!

Tobiah




-- Kostya

09.02.2011 23:56, Tobiah пишет:

I have a Dialog with an EditText widget in it that I'd like
to use to get a string from the user. Right now, they have
to touch inside the EditText to get the keyboard. Would it
be possible to have the keyboard open up with the Dialog and
have focus in the EditText? This would be similar to what
happens when I use the search button.

Thanks,

Tobiah









--
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] Intent Resolution

2011-02-09 Thread Dan
Hello,

I am unable to start an Activity. My goal is to specify my
application's packages so that Intent Resolution only occurs with my
Intents, then for the correct Intent to be resolved. However I am
getting unexpected results which seem to be contradictory.
PackageManager successfully queries the Activities and finds the one
correct activity but when startActivity is used
ActivityNotFoundException is thrown. Here is the code snippet:

Intent homeIntent = new Intent(HOME_ACTION);
homeIntent.setPackage(getPackageName()); // Set package to only search
within application.
ListResolveInfo actList =
getPackageManager().queryIntentActivities(homeIntent, 0);
System.out.println(actList.size()); // reports 1, debugging the List
shows the correct activity was found
startActivity(homeIntent); // throws ActivityNotFoundException


Only HomeActivity has a filter set for HOME_ACTION and no other
parameters for the filter. If its important this code is being called
from an Android Library Project.

-Dan

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

2011-02-09 Thread AndroidDevTime
I am seeing Problem Loading Widget on the home screen.  Several things
seem odd about this.
First there is no mention of which widget it tried to load. Never the
less the home screen is covered with Problem Loading Widget.  Did the
system not know the name of the widget it was trying to load even
though you can clearly see it in the list of widgets.  Secondly, I was
debugging and did not see error in the LogCat file during this nor in
the console.   Where does one look for the CAUSE?  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] NFC Concerns

2011-02-09 Thread Leon Moreyn-Android Development
I have my reservations about the NFC features on new phones.

1.) Does it read any NFC? Like say my Amex cards RDIF tag?
2.) The writer for the NFC chip in the phone does it write whatever I
tell it to write?
3.) What is the security on this technology?

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


[android-developers] Server Response

2011-02-09 Thread Atif Musaddaq
Hi, Guys

I am sending some data to the PHP server and based on this data server is
sending true or false back to me.

e.g

echo true;
OR
echo false;

Now on the android side i write this code in Post method

  try {
post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);
Toast.makeText( getApplicationContext(),
responseText,Toast.LENGTH_SHORT).show();
Log.i(Output,responseText);

// till here it is showing me either true or false
if (responseText == true)
{
  // call activity A
}else{

  // call activity B
}

Now it shows me response either true or false based on the data i send. but
it is not comparing the if condition. i would like to further call Activity
A or B based on  true or false.

Can any one help me and tell me what i am doing wrong here ? why it is
not comparing the condition ? responseText is already string and
also comparing String

-- 
Atif Musaddaq

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

Re: [android-developers] Server Response

2011-02-09 Thread Marc Petit-Huguenin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/09/2011 03:24 PM, Atif Musaddaq wrote:
 Hi, Guys
 
 I am sending some data to the PHP server and based on this data server
 is sending true or false back to me.
 
 e.g 
 
 echo true; 
 OR
 echo false;
 
 Now on the android side i write this code in Post method
 
   try {
 post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
 HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);
 Toast.makeText( getApplicationContext(),
 responseText,Toast.LENGTH_SHORT).show();
 Log.i(Output,responseText);
 
 // till here it is showing me either true or false
if (responseText == true) 

if (true.equals(responseText))

 {
   // call activity A
 }else{
 
   // call activity B
} 
 
 Now it shows me response either true or false based on the data i send.
 but it is not comparing the if condition. i would like to further call
 Activity A or B based on  true or false.
 
 Can any one help me and tell me what i am doing wrong here ? why it is
 not comparing the condition ? responseText is already string and
 also comparing String


- -- 
Marc Petit-Huguenin
Personal email: m...@petit-huguenin.org
Professional email: petit...@acm.org
Blog: http://blog.marc.petit-huguenin.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1TI+YACgkQ9RoMZyVa61ec9ACfTvys0ZQoWzbmaauhwV/SDlQF
to0AnA4YiFQSmgq1rvjIJk3YRzapgicp
=qFJL
-END PGP SIGNATURE-

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


Re: [android-developers] Server Response

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 5:24 PM, Atif Musaddaq atif.musad...@gmail.comwrote:

 Can any one help me and tell me what i am doing wrong here ? why it is
 not comparing the condition ? responseText is already string and
 also comparing String


http://www.google.com/search?q=how+to+compare+strings+in+java
http://www.devdaily.com/java/edu/qanda/pjqa1.shtml

-
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: Intent Flags ignored coming from an widget?

2011-02-09 Thread Dirk Vranckaert
Anyone? Can't figure out why it isnt working... :s

On Feb 9, 8:19 pm, Dirk Vranckaert dirkvrancka...@gmail.com wrote:
 All,

 For the app i'm currently writing I  needs some help.

 My activity structure when launching the app with the launcher:
 HomeActivity = ListActivity
 On the listActivity I've put a home button with a clear top flag
 (intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);)
 So pressing the home button makes me return to my home activity, on my
 home activity pressing the back button results in the application
 closing. That exactly what I want.

 However when you click a button on my widget you directly go to the
 ListActivity. Then you click the home button and the flag on the
 intent is set correctly but the stack isn't cleared at all! So when
 arriving at my home activity I press the back button and instead of
 quitting the application it goes back to my ListActivity.

 Any ideas how I can resolve this one?

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

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 5:57 PM, Dirk Vranckaert dirkvrancka...@gmail.comwrote:

 Anyone? Can't figure out why it isnt working... :s


You should wait more than 4 hours before bumping your posts ...

-
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] Best OpenGL ES framework?

2011-02-09 Thread Nathaniel Warner
What's the best framework for creating 3D opengl apps?  My intent is to
import some 3d models.

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

2011-02-09 Thread AndroidDevTime
guys, I 'm dealing with this right now.  Am I the only one on this
board that has encountered this?

On Feb 9, 2:52 pm, AndroidDevTime androiddevd...@gmail.com wrote:
 I am seeing Problem Loading Widget on the home screen.  Several things
 seem odd about this.
 First there is no mention of which widget it tried to load. Never the
 less the home screen is covered with Problem Loading Widget.  Did the
 system not know the name of the widget it was trying to load even
 though you can clearly see it in the list of widgets.  Secondly, I was
 debugging and did not see error in the LogCat file during this nor in
 the console.   Where does one look for the CAUSE?  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: Intent Flags ignored coming from an widget?

2011-02-09 Thread AndroidDevTime
Well you could look at the lifecycle methods on a widget.  These
include onEnable, onUpdate, onReceive, onDelete, and onDisable.  You
might want to take a look at the values in some of these methods.
Perhaps you want to close something out here.

On Feb 9, 3:57 pm, Dirk Vranckaert dirkvrancka...@gmail.com wrote:
 Anyone? Can't figure out why it isnt working... :s

 On Feb 9, 8:19 pm, Dirk Vranckaert dirkvrancka...@gmail.com wrote:

  All,

  For the app i'm currently writing I  needs some help.

  My activity structure when launching the app with the launcher:
  HomeActivity = ListActivity
  On the listActivity I've put a home button with a clear top flag
  (intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);)
  So pressing the home button makes me return to my home activity, on my
  home activity pressing the back button results in the application
  closing. That exactly what I want.

  However when you click a button on my widget you directly go to the
  ListActivity. Then you click the home button and the flag on the
  intent is set correctly but the stack isn't cleared at all! So when
  arriving at my home activity I press the back button and instead of
  quitting the application it goes back to my ListActivity.

  Any ideas how I can resolve this one?

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

2011-02-09 Thread AndroidDevTime
nonesense.  These are basic questions and people should respond with
what they know.

On Feb 9, 4:00 pm, TreKing treking...@gmail.com wrote:
 On Wed, Feb 9, 2011 at 5:57 PM, Dirk Vranckaert 
 dirkvrancka...@gmail.comwrote:

  Anyone? Can't figure out why it isnt working... :s

 You should wait more than 4 hours before bumping your posts ...

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

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


Re: [android-developers] Re: Problem Loading Widget

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 7:08 PM, AndroidDevTime androiddevd...@gmail.comwrote:

 guys, I 'm dealing with this right now.  Am I the only one on this board
 that has encountered this?


Maybe not, but you will probably have to wait more than 2 hours to find out.
This is a volunteer list - people aren't just waiting around to respond to
questions.

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

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

Re: [android-developers] Re: Intent Flags ignored coming from an widget?

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 7:14 PM, AndroidDevTime androiddevd...@gmail.comwrote:

 nonesense.  These are basic questions and people should respond with what
 they know.


Nonsense is demanding that people on a volunteer list to be at your beck and
call to answer questions, regardless of how basic they may be.

-
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: NFC a viable sync mechanism?

2011-02-09 Thread davemac
As of today, Android 2.3.3 has a lot more support for NFC, including
writing tags and some peer-to-peer communications. I haven't even
scratched the surface yet so can't vouch for the new features, but
definitely check it out.

- dave

On Jan 26, 2:05 am, andrew and...@mackenzie-serres.net wrote:
 For smallish amounts of info NFC is viable. We do this between NFC
 phones, but Android API doesn't expose the Peer to Peer mode yet.

 Also, NFC can transfer other types of connection handoffs (Bluetooth
 and wifi) so then the devices can continue a longer and faster
 transfer while maintaining a fast and intuitive user interaction.

 So:
 - use other NFC device
 - wait for API support
 - start hacking android as mentioned

 Let us know how it goes

 Andrew

 On Jan 26, 5:24 am, Zsolt Vasvari zvasv...@gmail.com wrote:

  Thanks.  What's missing from the Android SDK?

  Does anybody have a suggestion for a good peer-to-peer comm
  technology?  I don't want to use Bump as it requires a cloud
  component, which I don't want.

  On Jan 26, 10:52 am,davemacdavemac...@gmail.com wrote:

   In theory, it could be. Android doesn't have the NFC API fleshed out
   enough to allow this yet. You might be able to get to it via Android
   NDK and native code.

   - dave

   On Jan 25, 7:17 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

Is NFC a viable synch mechanism for exchange bi-directional small
pieces of data, as a replacement for technologies like BUMP?

I am trying to understand how NFC really works, but I find it a bit
confusing.- 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: Problem Loading Widget

2011-02-09 Thread metal mikey
You'll get that Error Layout (the one that says 'Problem Loading
Widget') if there's a problem loading a layout for your AppWidget.

There's various ways for this to manifest. It may be that the
requested Layout simply does not exist, or that the AppWidget is no
longer installed but the Launcher still holds RemoteViews for it (i.e.
they are now orphaned RemoteViews), or some other reasons.

Look more carefully at LogCat, there should be an indication as to why
the Error Layout is being displayed.

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


[android-developers] Re: Anyone know how to calculate speed WITHOUT GPS?

2011-02-09 Thread metal mikey
So, summarising: just hold the phone near the window.

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


[android-developers] Adding a new View causing Force Close

2011-02-09 Thread Aaron Buckner
I basically copied an existing view

part of the Java Code:

...
final View MyRideScreen = (View) findViewById(R.id.myride_screen);
final View OwnerScreen = (View) findViewById(R.id.owners_screen);
...

When adding the OwnerScreen the OwnerScreen.setVisibility(VIS/INVIS);
causes a force close
where the MyRideScreen setup the same does not

I have tried several different things in the XML and nothing seems to
fix it, I have basically copied working XML changed the identifiers
and it still fails with a null pointer exception.

here is what the debug stack trace shows me (I changed the
setVisibility to a onClick event so the app didn't force close right
away:

FATAL EXCEPTION: main
java.lang.NullPointerException
at com.android.package.Dashboard$10.onClick(Dashboard.java:221)
at android.view.View.performClick(View.java:2501)
at android.view.View$PerformClick.run(View.java:9107)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3812)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)

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

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 9:44 PM, Aaron Buckner nagm...@gmail.com wrote:

 When adding the OwnerScreen the OwnerScreen.setVisibility(VIS/INVIS);
 causes a force close
 where the MyRideScreen setup the same does not


OwnerScreen is null, which means it does not exist in your main
view hierarchy when you try to find it by ID. Make sure it does.

-
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: Fetch data from android service to HTML

2011-02-09 Thread SREEHARI
Hi Kevin,

What I need is to fetch data from a service running in the  phone/
emulator (android device) to a browser running in some other device.
Let the second device be a PC. That s what I asked how to get data in
a normal browser from an android application.

Regards,
Sreehari.

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


[android-developers] Backup in android

2011-02-09 Thread jp
I want to do in my apps is that the application will take a backup of
android device (like contacts,sms etc) and also take backup of
installed apps in device(there files,database etc).
can any body have some idea of how to do this, or any tutorial or
examples
please help me ...

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


[android-developers] Android SDK HELP

2011-02-09 Thread kypriakos
Hi all,

I have projects in Eclipse that use Android 1.6, 2.1 and 2,2 and the
Android SDK revision
I use is 6. I wanted to try and run the apps I have for 2.2 onto 2.3.1
and 2.3.3 so I tried
installing those versions but the AVD manager would not allow me
unless I update the
Eclipse Android plug in. So I did that. Before I went back to upgrade
teh SDK revision
to 9 from 6 I tried to compile my projects anyway but the compilation
didn't occur - is
this because I need now to upgrade the SDK tools to 9? Will that
affect my older
projects (1.6 and 2.1)?

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: Orientation Problem in Camera.

2011-02-09 Thread himen patel
On Wed, Feb 9, 2011 at 5:50 PM, Johan Abramsson 
johan.abrams...@sonyericsson.com wrote:

 In the firmware 2.0.A.504 of Xperia X10 there seems to have sneaked in
 a problem regarding usage of the undocumented orientation
 parameters. That parameter is not correctly implemented. Work is
 ongoing to solve this issue, (although it is not documented in the
 android vanilla doc's) however I recommend to lock the activity in a
 orientation mode in the mean time.


 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);


 Good luck.

  /Johan

 On Jan 31, 1:27 pm, himen patel himen.pa...@gmail.com wrote:
  hi i am an android developer.
 
  i am making a camera application in android.
  i have a sony Experia X10. version 2.1
  i am launching a hardware camera. but when the
  preview is start it come with noise in portrait mode or 90 degree anti
  clockwise
  but in landscape it comes better.
 
  but if i checked same appliction in sony Experia X8. version 2.1
  preview comes good in both mode landscape or portrait.
 
  i can't understand where is the issue.

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



Thank you very much johan. for your reply.

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

[android-developers] Re: Can't properly stop a thread

2011-02-09 Thread Roger Podacter
Have you tried using onPause rather than onDestroy? Not sure that
helps this situation. But destroy does not get called too often. But
on pause is guaranteed to get called every time the user presses the
home button, or back, etc.

On Feb 9, 12:36 pm, Kaloian Doganov doga...@projectoria.bg wrote:
 The onDestroy() is called on various occasions, not necessary related
 to user exiting the application. If you effectively stop your
 background thread in onDestroy(), your background task would not
 survive a simple orientation change.

 On Feb 2, 1:07 pm, Serdel adam.lichwierow...@gmail.com wrote:



  In my application I am connecting to a server and downloading some
  things. Not much but the connection it self takes a while. Off course
  this is done in a thread (class that implements runnable). If some
  error occurs, the thread sends a message to the UI using a Handler and
  the UI displays an dialog window.

  My problem is that I can't stop the thread in the UI properly. For
  example if during the connection I would press the 'home' button on
  the phone, after some seconds I get an error saying that my
  application couldn't create a dialog window (because it is not running
  anymore). That means that my thread was not stopped and kept on
  working until an error (i.e. timeout) occurred and tried to send a
  massege to the UI by a handler.

  to Stop the thread I have a function that I found:

                    public synchronized Thread stopThread(Thread thr){
                            if(thr != null){
                              Thread temp = thr;
                            thr = null;
                              temp.interrupt();
                            }
                            return thr;
                          }

  And I use it like:

  @Override
          public void onDestroy()
              {
                  super.onDestroy();
                 senderTh= stopThread(senderTh);
                 finish();
              }

  Why this doesn't stop my Thread? How can I do it from the UI?

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

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 11:02 PM, jp jpsoni...@gmail.com wrote:

 can any body have some idea of how to do this


Do what? Everything you just laid out? That's mildly complicated. What do
you have so far?

-
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: Adding a new View causing Force Close

2011-02-09 Thread Aaron Buckner
If I comment out the OwnerScreen.setVisibility statement and leave the
findViewById statement there is no force close (of course there is no
call to the OwnerScreen object at that point, I don't understand how
it could be null though, I basically copied the statements for
MyRideScreen and the XML, I even tried pairing back the XML to bare
basics so I'm still a little bit at a loss, I have 2 views that are
built the same way and working so I'm confused as to what I'm doing
wrong, If I need to attach more complete code I can do that.

On Feb 9, 11:01 pm, TreKing treking...@gmail.com wrote:
 On Wed, Feb 9, 2011 at 9:44 PM, Aaron Buckner nagm...@gmail.com wrote:
  When adding the OwnerScreen the OwnerScreen.setVisibility(VIS/INVIS);
  causes a force close
  where the MyRideScreen setup the same does not

 OwnerScreen is null, which means it does not exist in your main
 view hierarchy when you try to find it by ID. Make sure it does.

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

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


Re: [android-developers] Re: Adding a new View causing Force Close

2011-02-09 Thread TreKing
On Wed, Feb 9, 2011 at 11:42 PM, Aaron Buckner nagm...@gmail.com wrote:

 I don't understand how it could be null though


Step 1 - step through your debugger to confirm this.


 I basically copied the statements for MyRideScreen and the XML,


Copying and pasting leads to many errors.


 so I'm confused as to what I'm doing wrong


Your layout, somewhere somehow does not have that view in it.


 If I need to attach more complete code I can do that.


How about the XML layout for what you're setting as the content view?

-
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

  1   2   >