[android-developers] Re: push audio to caller on android

2011-01-25 Thread Sarwar Erfan
No, not using any API in SDK.

As you have mentioned about phone's speaker, I guess you already searched 
for it in Google. You can have few similar inquiry in this group too.
So far, receiving the call, setting the phone to hands free and then playing 
the desired audio is the solution.

Regards
Sarwar Erfan

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

[android-developers] How do you avoid self notification when with ContentProviders

2011-01-25 Thread Pepijn Van Eeckhoudt
I've implemented a custom ContentProviders that calls notifyChange 
passing in null as the ContentObserver. There doesn't seem to be a way 
to pass a ContentObserver to a ContentProvider so that's the only option.


I would now like to avoid receiving self notifications for changes I 
make via my UI in order to avoid having to requery the database. In 
other words, I've implemented a scenario where I add some data via the 
UI which is then inserted into the ContentProvider. The UI is already 
aware of the new data so I don't want to get a change notification. 
Since the ContentProvider can't get a hold of my ContentObserver, the 
ContentObserver#deliverSelfNotifications mechanism doesn't work.
I tried setting a thread local boolean in my code, but the change 
notifications are delivered asynchronously via a binder thread so that 
doesn't work either.


Does anyone know of a way to avoid self (or detect) self notifications 
when using ContentProviders?


Regards,

Pepijn

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


[android-developers] Re: Best, easiest, cleanest, way to make a game and cross platfrom.

2011-01-25 Thread Robert Green
Let me enter this most holy war with some first hand experience.  I
have under my belt 5 Android-only games and one cross platform Android/
iPhone game.  Want to guess which took the least amount of time
relative to difficulty of game to do?  The fact of the matter is that
once you're good at cross platform programming, you get the advantage
of being able to code/build/test natively in Windows or OSX which
saves a good minute every time over deploying to the device and is
easier overall to do.  Why not use the emulator?  It takes forever and
does not have adequate 3D performance and does not support GLES 2.0.
So I code in Eclipse/CDT, test mostly on Win32 builds then do a daily
or every other day build for Android using NDK r4 (I haven't switched
to 5 yet).  What I test for on Android is scale, usability (controls)
and performance.  Of course if you're heavily multitouched you'll need
more device testing time but often times keyboard bindings and a mouse
can get you around that somewhat for testing on a desktop OS.

Things are working so well for me that I know for certain I will not
be developing any more platform-specific games in Java.  I'm
experiencing serious time savings and the performance I'm getting is
fantastic.  Of course there's a couple of months of code to build up
to be able to do this (and I will be licensing mine soon for anyone
interested who wants to save some time) but once you're over that
hump, it's pure productivity.

On Jan 24, 11:56 am, Phil Endecott spam_from_goo...@chezphil.org
wrote:
 On Jan 22, 7:27 am, Hogus dupisani.lo...@gmail.com wrote:

  People spend way too much time worrying aboutcross-platform
  capability at the outset.
  Companies
  spend so much time trying to roll their product out to everyone that
  they back themselves into corners where there is no way to actually
  provide the functionality that they want to provide and end up with
  some watered down, me too, application that anyone else could have
  developed.

 This is an interesting viewpoint which I agree with to a certain
 extent.

 For me, the main motivation for making my codecross-platformis to
 avoid having all my eggs in one basket.  (The Apple Basket in many
 cases.)  Diversity, both across platforms and across apps, reduces the
 risk of some event beyond my control taking away the income that pays
 the rent.

 Perhaps the important thing is to at least be aware of your options,
 and to know what technologies arecross-platformand which are not.

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

2011-01-25 Thread Sarwar Erfan
For real device testing, some companies provide remote access to devices.
Here is one: http://www.perfectomobile.com/
A decent Google search will reveal some more similar service provider.

By the way, for a *rough* idea about multiple size screen porting, you can 
use different sized emulators.

Regards
Sarwar Erfan

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

2011-01-25 Thread Mark Murphy
Moreover, I doubt Google Navigation uses an explicit WakeLock,
preferring instead to use activity-based means of keeping the screen
on.

On Tue, Jan 25, 2011 at 6:30 AM, Dianne Hackborn hack...@android.com wrote:
 Navigation uses Service.startForeground() to say that the user is currently
 aware of it so it can't be considered expendable.

 On Mon, Jan 24, 2011 at 5:33 PM, mikeee mike.engelh...@gmail.com wrote:

 So you're saying Google Navigation *doesn't* use a wakelock and
 continually receive gps updates or that it's somehow an evil
 application because it uses the battery quickly?




 On Jan 24, 5:24 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Fri, Jan 21, 2011 at 8:11 AM, mikeee mike.engelh...@gmail.com
  wrote:
   I've got an app that starts a service in order to receive location
   updates from the LocationManager.    The use case is the service needs
   to be running all the time and as such it acquires a
   PowerManager.PARTIAL_WAKE_LOCK in the onCreate() of the Service.
 
  This sounds evil from the standpoint of battery life, if nothing else.
 
   But it seems from testing on several different phones and user
   feedback that the Service is still being put to sleep as the location
   notifications will stop if the application isn't in the foreground.
 
  Android does not put applications to sleep. In your case, Android is
  probably terminating your service for being everlasting and using a
  perpetual WakeLock.
 
   This effectively renders the app ineffective for the task at hand.
   I've read posts about using an Alarm to simulate a pseudo cron job but
   I don't really need to be woken up in order to do a task, the app
   needs to run code based on the location manager calling
   onLocationChanged the service that the users position has changed.
 
  You can experiment with my LocationPoller, which is designed for your
  scenario:
 
  https://github.com/commonsguy/cwac-locpoll
 
   yet the fact that it
   effectively stops running in some cases is causing problems for the
   users.
 
  That is because you cannot write everlasting services. Please use
  AlarmManager and something (LocationPoller or your own design) to
  write so you do not have a service and WakeLock in memory all of the
  time.
 
  --
  Mark Murphy (a Commons
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
 
  Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

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



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

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

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

2011-01-25 Thread Alok Kulkarni
Thanks a lot for ur responses.I will try that out and update.
Regards,
Alok.

On Sat, Jan 22, 2011 at 3:16 AM, Dianne Hackborn hack...@android.com wrote:
 You can not mix adjustPan and adjustResize.  It is one or the other.  If
 your window can resize to accommodate the IME, you should use adjustResize.
 That said, these would have nothing to do with whether a text view would
 actually receive input.

 On Fri, Jan 21, 2011 at 6:09 AM, Alok Kulkarni kulsu...@gmail.com wrote:

 Hi.
  i am having an activity in which i am adding controls such as
 EditText and TextView at runtime in a listiiew.
 What happens is that for the Edittext the keyboard pops up and the
 controls at the bottom of the screen are not visible even when i
 scroll down.So when i add the property
 android:windowSoftInputMode=stateVisible|adjustResize|adjustPan
 , things work.But suddenly i face the issue that i cannot type in the
 edit text pressing the keyboard.The focus automatically goes out of
 the EditText while typing on the keyboard.I have tried this on Devices
 like Nexus S , Moto Cliq . Both have the same problem.Any ideas.

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

2011-01-25 Thread Alok Kulkarni
@Dianne , If i use adjustResize only then it works on most of the
devices, its observed that on an EditText  keyboard comes up but the
focus of the Edittext goes and user has to click again on the
Edittext, which is not natural behaviour.
If i use adjustPan only , then the screen does not scroll to the
bottom when SoftKeyboard is open.
When both are given , then worked fine on a few devices like Samsung
Europa but on most of the devices either of the issues mentioned above
was observed.
Regards,
Alok.

On Tue, Jan 25, 2011 at 2:11 PM, Alok Kulkarni kulsu...@gmail.com wrote:
 Thanks a lot for ur responses.I will try that out and update.
 Regards,
 Alok.

 On Sat, Jan 22, 2011 at 3:16 AM, Dianne Hackborn hack...@android.com wrote:
 You can not mix adjustPan and adjustResize.  It is one or the other.  If
 your window can resize to accommodate the IME, you should use adjustResize.
 That said, these would have nothing to do with whether a text view would
 actually receive input.

 On Fri, Jan 21, 2011 at 6:09 AM, Alok Kulkarni kulsu...@gmail.com wrote:

 Hi.
  i am having an activity in which i am adding controls such as
 EditText and TextView at runtime in a listiiew.
 What happens is that for the Edittext the keyboard pops up and the
 controls at the bottom of the screen are not visible even when i
 scroll down.So when i add the property
 android:windowSoftInputMode=stateVisible|adjustResize|adjustPan
 , things work.But suddenly i face the issue that i cannot type in the
 edit text pressing the keyboard.The focus automatically goes out of
 the EditText while typing on the keyboard.I have tried this on Devices
 like Nexus S , Moto Cliq . Both have the same problem.Any ideas.

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


[android-developers] Android wifi connectivity using WPA key

2011-01-25 Thread Brijesh
Hi,

I want to connect my android device to a wifi point which is having a
WPA key is there any method in which i can pass the SSID and password
and the device will connect to that wifi-point.???

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

2011-01-25 Thread Sarwar Erfan
Get the browser source from here:
http://android.git.kernel.org/?p=platform/packages/apps/Browser.git

And, modify the user agent string in this file.
src/com/android/browser/BrowserSettings.java

--
Regards
Sarwar Erfan


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

2011-01-25 Thread Dianne Hackborn
Using adjustResize does not cause an edit text to lose focus in any way.
 The only thing it does is cause your UI to relayout for the new window
size.

I don't know what you are doing, but the vast majority of applications you
interact with just use adjustResize with a regular view hierarchy, and they
work fine.

On Tue, Jan 25, 2011 at 12:50 AM, Alok Kulkarni kulsu...@gmail.com wrote:

 @Dianne , If i use adjustResize only then it works on most of the
 devices, its observed that on an EditText  keyboard comes up but the
 focus of the Edittext goes and user has to click again on the
 Edittext, which is not natural behaviour.
 If i use adjustPan only , then the screen does not scroll to the
 bottom when SoftKeyboard is open.
 When both are given , then worked fine on a few devices like Samsung
 Europa but on most of the devices either of the issues mentioned above
 was observed.
 Regards,
 Alok.

 On Tue, Jan 25, 2011 at 2:11 PM, Alok Kulkarni kulsu...@gmail.com wrote:
  Thanks a lot for ur responses.I will try that out and update.
  Regards,
  Alok.
 
  On Sat, Jan 22, 2011 at 3:16 AM, Dianne Hackborn hack...@android.com
 wrote:
  You can not mix adjustPan and adjustResize.  It is one or the other.  If
  your window can resize to accommodate the IME, you should use
 adjustResize.
  That said, these would have nothing to do with whether a text view would
  actually receive input.
 
  On Fri, Jan 21, 2011 at 6:09 AM, Alok Kulkarni kulsu...@gmail.com
 wrote:
 
  Hi.
   i am having an activity in which i am adding controls such as
  EditText and TextView at runtime in a listiiew.
  What happens is that for the Edittext the keyboard pops up and the
  controls at the bottom of the screen are not visible even when i
  scroll down.So when i add the property
  android:windowSoftInputMode=stateVisible|adjustResize|adjustPan
  , things work.But suddenly i face the issue that i cannot type in the
  edit text pressing the keyboard.The focus automatically goes out of
  the EditText while typing on the keyboard.I have tried this on Devices
  like Nexus S , Moto Cliq . Both have the same problem.Any ideas.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 

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




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

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

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

Re: [android-developers] Re: WakeLock/Services and sleep

2011-01-25 Thread Dianne Hackborn
It probably uses FLAG_KEEP_SCREEN_ON for its window to keep the screen on
while in its UI, and also holds a partial wake lock to keep the device
running while you are not in its UI.

On Tue, Jan 25, 2011 at 12:38 AM, Mark Murphy mmur...@commonsware.comwrote:

 Moreover, I doubt Google Navigation uses an explicit WakeLock,
 preferring instead to use activity-based means of keeping the screen
 on.

 On Tue, Jan 25, 2011 at 6:30 AM, Dianne Hackborn hack...@android.com
 wrote:
  Navigation uses Service.startForeground() to say that the user is
 currently
  aware of it so it can't be considered expendable.
 
  On Mon, Jan 24, 2011 at 5:33 PM, mikeee mike.engelh...@gmail.com
 wrote:
 
  So you're saying Google Navigation *doesn't* use a wakelock and
  continually receive gps updates or that it's somehow an evil
  application because it uses the battery quickly?
 
 
 
 
  On Jan 24, 5:24 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Fri, Jan 21, 2011 at 8:11 AM, mikeee mike.engelh...@gmail.com
   wrote:
I've got an app that starts a service in order to receive location
updates from the LocationManager.The use case is the service
 needs
to be running all the time and as such it acquires a
PowerManager.PARTIAL_WAKE_LOCK in the onCreate() of the Service.
  
   This sounds evil from the standpoint of battery life, if nothing else.
  
But it seems from testing on several different phones and user
feedback that the Service is still being put to sleep as the
 location
notifications will stop if the application isn't in the foreground.
  
   Android does not put applications to sleep. In your case, Android is
   probably terminating your service for being everlasting and using a
   perpetual WakeLock.
  
This effectively renders the app ineffective for the task at hand.
I've read posts about using an Alarm to simulate a pseudo cron job
 but
I don't really need to be woken up in order to do a task, the app
needs to run code based on the location manager calling
onLocationChanged the service that the users position has changed.
  
   You can experiment with my LocationPoller, which is designed for your
   scenario:
  
   https://github.com/commonsguy/cwac-locpoll
  
yet the fact that it
effectively stops running in some cases is causing problems for the
users.
  
   That is because you cannot write everlasting services. Please use
   AlarmManager and something (LocationPoller or your own design) to
   write so you do not have a service and WakeLock in memory all of the
   time.
  
   --
   Mark Murphy (a Commons
   Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
  
   Android Training in London:
 http://bit.ly/smand1andhttp://bit.ly/smand2
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

 Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

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




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

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

-- 
You received this message because you are 

[android-developers] how to pass value from spinner to another activity

2011-01-25 Thread J@n$
I have a problem in selecting the vaues from the spinner.whenever i
run the programit goes to second page instead of displaying the main
page which has spinner.i knew the problem is due to default selection
of spinner values. do any one knw how stop default selection

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

2011-01-25 Thread Jaiprakash soni
Hi I want to create view like view shown in attached image (view marked by
red circle at bottom).How  can I customize view for this ;
any tutorial or example.

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

Re: [android-developers] Problem with adjustPan andadjustResize

2011-01-25 Thread Alok Kulkarni
One thing i am doing is adding Edittexts defined in XML to a ListView
at runtime according to number of fields.Is that causing the problem ?

On Tue, Jan 25, 2011 at 2:33 PM, Dianne Hackborn hack...@android.com wrote:
 Using adjustResize does not cause an edit text to lose focus in any way.
  The only thing it does is cause your UI to relayout for the new window
 size.
 I don't know what you are doing, but the vast majority of applications you
 interact with just use adjustResize with a regular view hierarchy, and they
 work fine.

 On Tue, Jan 25, 2011 at 12:50 AM, Alok Kulkarni kulsu...@gmail.com wrote:

 @Dianne , If i use adjustResize only then it works on most of the
 devices, its observed that on an EditText  keyboard comes up but the
 focus of the Edittext goes and user has to click again on the
 Edittext, which is not natural behaviour.
 If i use adjustPan only , then the screen does not scroll to the
 bottom when SoftKeyboard is open.
 When both are given , then worked fine on a few devices like Samsung
 Europa but on most of the devices either of the issues mentioned above
 was observed.
 Regards,
 Alok.

 On Tue, Jan 25, 2011 at 2:11 PM, Alok Kulkarni kulsu...@gmail.com wrote:
  Thanks a lot for ur responses.I will try that out and update.
  Regards,
  Alok.
 
  On Sat, Jan 22, 2011 at 3:16 AM, Dianne Hackborn hack...@android.com
  wrote:
  You can not mix adjustPan and adjustResize.  It is one or the other.
   If
  your window can resize to accommodate the IME, you should use
  adjustResize.
  That said, these would have nothing to do with whether a text view
  would
  actually receive input.
 
  On Fri, Jan 21, 2011 at 6:09 AM, Alok Kulkarni kulsu...@gmail.com
  wrote:
 
  Hi.
   i am having an activity in which i am adding controls such as
  EditText and TextView at runtime in a listiiew.
  What happens is that for the Edittext the keyboard pops up and the
  controls at the bottom of the screen are not visible even when i
  scroll down.So when i add the property
  android:windowSoftInputMode=stateVisible|adjustResize|adjustPan
  , things work.But suddenly i face the issue that i cannot type in the
  edit text pressing the keyboard.The focus automatically goes out of
  the EditText while typing on the keyboard.I have tried this on Devices
  like Nexus S , Moto Cliq . Both have the same problem.Any ideas.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
  android-developers@googlegroups.com
  To unsubscribe from this group, 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

 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] how to pass value from spinner to another activity

2011-01-25 Thread Mark Murphy
You cannot stop default selection, other than to set your own
selection. IMHO, the selection event of a Spinner should not trigger
startActivity().

On Tue, Jan 25, 2011 at 9:10 AM, J@n$ janedevana...@gmail.com wrote:
 I have a problem in selecting the vaues from the spinner.whenever i
 run the programit goes to second page instead of displaying the main
 page which has spinner.i knew the problem is due to default selection
 of spinner values. do any one knw how stop default selection

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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 Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

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

2011-01-25 Thread Marcin Orlowski
On 25 January 2011 09:59, Brijesh masrani.brij...@gmail.com wrote:
 Hi,

 I want to connect my android device to a wifi point which is having a
 WPA key is there any method in which i can pass the SSID and password
 and the device will connect to that wifi-point.???

Tell your user to set the phone up for this network?

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


[android-developers] Javascript to call the NPAPI Plugin directly

2011-01-25 Thread Ankit
Hi ,

I am new to Android and was looking into the Android 2.3 version.

I am looking into Android Browser Plugin.The NPAPI code is in the
native code.

As per my understanding Browser Plugin would be loaded in the emulator
as an .apk

So since the plugin is already in the emulator then can the Javascript
code directly communicate with the
native code \ Plugin without coming in contact with the Java layer
[ JNI interface ]?

Thanks and Regards,
Ankit

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

2011-01-25 Thread Kostya Vasilyev

There is a way to do this from code:

http://developer.android.com/reference/android/net/wifi/WifiManager.html#enableNetwork(int, 
boolean)



public boolean enableNetwork (int netId, boolean disableOthers)
Since: API Level 1

Allow a previously configured network to be associated with. If 
disableOthers is true, then all other configured networks are 
disabled, and an attempt to connect to the selected network is 
initiated. This may result in the asynchronous delivery of state 
change events.


For this to work, you first need to add the network to Android's known 
(== configured) network list, that's how you get the int netId above.


http://developer.android.com/reference/android/net/wifi/WifiManager.html#addNetwork(android.net.wifi.WifiConfiguration)

Add a new network description to the set of configured networks. The 
networkId field of the supplied configuration object is ignored.


The new network will be marked DISABLED by default. To enable it, 
called enableNetwork(int, boolean).


The only somewhat tricky part is setting correct security options in the 
WifiConfiguration object. Here is how I do it in my application:


http://kmansoft.wordpress.com/2010/04/08/adding-wifi-networks-to-known-list/

You can also check the sources of Android's Settings application, 
available here:


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

-- Kostya

25.01.2011 12:24, Marcin Orlowski пишет:

On 25 January 2011 09:59, Brijeshmasrani.brij...@gmail.com  wrote:

Hi,

I want to connect my android device to a wifi point which is having a
WPA key is there any method in which i can pass the SSID and password
and the device will connect to that wifi-point.???

Tell your user to set the phone up for this network?




--
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: Custom Contact Sync Adapter - Icons and Titles

2011-01-25 Thread marten
Hello,

this seems to be the same issue, that I have on my Motorola phone
(Motorola shows my Sync-Adapter as null instead of Unknown). I
investigated this a little bit and found the following log lines:

01-25 11:18:58.796  1742  6985 D ContSrcUpdtService: adding source
picture_source=0 pretty_name=Google
secondary_text=marten.ga...@googlemail.com
gams_account_type=com.google allow_out_of_context=1
active_sync_source=1 capability=5
gams_account_name=marten.ga...@googlemail.com
01-25 11:18:58.803  1742  6985 D ContSrcUpdtService: adding source
picture_source=0 allow_out_of_context=0 active_sync_source=0
gams_account_type=org.dmfs.carddav.account capability=5
gams_account_name=Test Addresses

The first line is about the Google Account, the second one about my
Sync-Adapter. As one can see the Google-Line has some extra info
pretty_name and secondary_text. Also, I don't know why
active_sync_source is set to 0 on my account.
I enabled it with:

ContentResolver.setSyncAutomatically(account,
ContactsContract.AUTHORITY, true);
ContentResolver.setIsSyncable(account,
ContactsContract.AUTHORITY, 1);

And syncing works fine so far.

Does anyone know where to set the pretty_name and secondary_text
for my sync-source?
It seems to me this is not some Motorola or Samsung proprietary
stuff.

Thanks

Marten


On 27 Dez. 2010, 02:34, WATTO wattostud...@gmail.com wrote:
 Hi guys,

 Based on the SampleSyncAdapter provided in the Android API
 documentation, I have developed an AccountAuthenticator andSyncAdapterthat 
 allows people to initially sign-in to a web-based
 account and then regularly sync their contacts list from the server to
 their phone.

 Now, this is all good and works fine, but there is a little section
 that I have been unable to find any information on - I suspect that
 this may be because of the specifics of the Samsung Galaxy S phone I'm
 testing on (Android 2.2). Any clarification on this would be great
 too.

 When my contacts from the server are synced to my phone, they
 correctly join together based on firstname, lastname, etc. If I
 scroll down on one of these contacts to where it lists all the joined
 contacts, I can see a little blue F icon for the facebook account, a
 black G for the google account, etc, however my custom sync appears
 as a 'generic' green icon (green background with a white upper-body
 sillouette on it).

 If I click on this Joined Contacts section, it lists all the accounts,
 where Google is called Google, Facebook is called Facebook, and my
 custon sync is called Unknown.

 When I defined my application, I have specified icons and titles for
 thesync adapter, account authenticator, and so forth. There icons and
 titles are alldisplayedcorrectly when I try to create an account
 through the Accounts and Sync menu in the settings. ie, my account-
 authenticator XML file is defined with the following values, which are
 used correctly...
     android:icon=@drawable/icon
     android:smallIcon=@drawable/small_icon
     android:label=@string/sync_name

 My question is, where are the green icon and the associated title
 defined for my application. Its obvious that I'm overlooking
 something, as it detects it as a unknown type against the contact. I
 suspect that it may be something that I need to set on the Account
 itself somewhere, or possibly its specific to the Samsung Galaxy S?

 Any help would be appreciated.

 Thanks,
 Michael.

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

2011-01-25 Thread cool.manish
I want to reduce GridView's vertical spacing. I am not able to do it.
Please help

On Jan 25, 10:14 am, cool.manish mannishga...@gmail.com wrote:
 Hi,

 at one place i have seen android:horizontalSpacing=-1px in a grid
 view.
 what does it means? What is effect of setting spacing in -ve

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


[android-developers] Http connection

2011-01-25 Thread arindam
Dear all,

I am developing an app to connect with an url and pass some data. But
url is blocked by citrix access gateway.
Through http get/post method I can not send login id or password cause
password field is hidden, in html source code.

Is there any way to solve the issue.


Thanks  regards
Arindam Ghosh

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


[android-developers] Draw a closed polygon witihin mapview

2011-01-25 Thread Dudero
Hello,

I want to display borders(based on GeoPoints) on my mapview but
android does not support anything like:

java.awt.polygon

At the moment i solve this with the following code in the draw-method
of an ItemizedOverlay:

for(int i = 0;i geopoints.size();i++){


if(isize()-1)
canvas.drawLine(Point(i).x, Point(i).y, 
Point(i+1).x, Point(i+1),
mPaint);
//Außer beim letzen Punkt: zeichne hier zum 
ersten Punkt:
Geschlossenheit
else

mapView.getProjection().toPixels(((OverlayItem)
mOverlays.get(0)).getPoint(), pxNew);
canvas.drawLine(pxOld.x, pxOld.y, pxNew.x, 
pxNew.y, mPaint);
}

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

2011-01-25 Thread Kostya Vasilyev
You should be able to get a more accurate and timely response if you ask in
a more relevant place:

http://forums.citrix.com/category.jspa?categoryID=27

-- Kostya

2011/1/25 arindam arindam2gh...@gmail.com

 Dear all,

 I am developing an app to connect with an url and pass some data. But
 url is blocked by citrix access gateway.
 Through http get/post method I can not send login id or password cause
 password field is hidden, in html source code.

 Is there any way to solve the issue.


 Thanks  regards
 Arindam Ghosh

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

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

[android-developers] Shape drawing - issue with corners

2011-01-25 Thread Smiley
Hi,
I am following the instruction here:
http://developer.android.com/guide/topics/resources/drawable-resource.html

and I am trying to draw a rectangle with only 2 rounded corners.

Here is my xml

?xml version=1.0 encoding=utf-8?
shape xmlns:android=http://schemas.android.com/apk/res/android;

corners android:radius=15dp android:bottomRightRadius=0dp
 android:bottomLeftRadius=0dp /
gradient android:angle=90 android:startColor=#c45209
android:endColor=#edb18c android:centerColor=#ea6814 /
/shape

I tried many variations, with or without the android:radius attribute
but no luck.
Any suggestions?
Thanks,
Lior

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

2011-01-25 Thread Kostya Vasilyev
Android doesn't use or support java.awt.* APIs, have you tried these:

http://developer.android.com/reference/android/graphics/Path.html

http://developer.android.com/reference/android/graphics/Canvas.html#drawPath(android.graphics.Path,
android.graphics.Paint)

But I don't see anything really wrong with the way you're doing it (except
for possibly joins and antialiasing at the vertices).

-- Kostya

2011/1/25 Dudero sinfanh...@googlemail.com

 Hello,

 I want to display borders(based on GeoPoints) on my mapview but
 android does not support anything like:

 java.awt.polygon

 At the moment i solve this with the following code in the draw-method
 of an ItemizedOverlay:

 for(int i = 0;i geopoints.size();i++){


if(isize()-1)
canvas.drawLine(Point(i).x,
 Point(i).y, Point(i+1).x, Point(i+1),
 mPaint);
//Außer beim letzen Punkt: zeichne hier zum
 ersten Punkt:
 Geschlossenheit
else

  mapView.getProjection().toPixels(((OverlayItem)
 mOverlays.get(0)).getPoint(), pxNew);
canvas.drawLine(pxOld.x, pxOld.y, pxNew.x,
 pxNew.y, mPaint);
}

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

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

[android-developers] Re: Help with Hacking the State of the Union

2011-01-25 Thread Spiral123
thanks Dave.

I'll be interested to see how it goes.  I'm thinking of using GAE for
some server-side functionality in a couple of months.

Nick

On Jan 24, 11:19 pm, keyeslabs keyes...@gmail.com wrote:
 Over the past few days I've hacked together an experiment that targets
 using an app to augment live television.  I've described it here:

 http://keyeslabs.com/joomla/blogs/i-think-im-becoming-an-android/421-...

 It's interesting in that it takes advantage of the Android platform
 talking to a Google App Engine back end to solicit real-time sentiment
 feedback during the course of the speech.  The State of the Union is a
 great venue to test out the concept and portions of a generic platform
 that I'm working on for future projects along the same lines.

 If there are any friendly devs that are planning on watching the State
 of the Union tomorrow and would not mind installing the app and then
 giving me feedback that would be much appreciated.

 The GAE portion of this has been the most challenging, really.  It
 would be nice if GAE would start offering services specifically
 targeted at supporting long-lived connections with Android clients.
 The biggest wild card in this whole experiment is whether the GAE app
 will be able to withstand X number of clients polling.  I thought
 about Cloud to Device, but I wanted a bigger user base than Android
 2.2+ would provide.  Anyone else doing something similar?  What has
 your approach been?

 I'll post some follow up later with results of the experiment and a
 bit more detail on architecture.

 Dave

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


[android-developers] Draw a closed polygon witihin mapview

2011-01-25 Thread Dudero
Hello,

I want to display borders (based on GeoPoints) on my mapview.
But as far as I know android does not support anything like
java.awt.polygon?

My problem is that if I add new points to my polygon some edges
intersect with others edges. The soloution is that I have to sort my
points into the right order, but I think this is not really trivial...

At the moment I draw my polygon with following code into the draw-
method
of an ItemizedOverlay:

public void draw(Canvas canvas, MapView mapView, boolean shadow) {
...
for(int i = 0; i  geopoints.size(); i++){
//If its not the last point: connect the current
point with its next
if ( i  size()-1 )
canvas.drawLine(Point(i).x,
Point(i).y, Point(i+1).x, Point(i+1),mPaint);
//The last point will be connected to the
first(0) the get a closed polygon
else
canvas.drawLine(Point(i).x,
Point(i).y, Point(0).x, Point(0).y, mPaint);
}
...
}

Any suggestions?

Greetz dudero

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

2011-01-25 Thread Kostya Vasilyev

Lior,

Apparently, something like this works a little better:

corners
android:topLeftRadius=15dp
android:topRightRadius=15dp
android:bottomRightRadius=0.1dp
android:bottomLeftRadius=0.1dp /

-- Kostya

25.01.2011 15:58, Smiley пишет:

Hi,
I am following the instruction here:
http://developer.android.com/guide/topics/resources/drawable-resource.html

and I am trying to draw a rectangle with only 2 rounded corners.

Here is my xml

?xml version=1.0 encoding=utf-8?
shape xmlns:android=http://schemas.android.com/apk/res/android;

corners android:radius=15dp android:bottomRightRadius=0dp
 android:bottomLeftRadius=0dp /
gradient android:angle=90 android:startColor=#c45209
android:endColor=#edb18c android:centerColor=#ea6814 /
/shape

I tried many variations, with or without the android:radius attribute
but no luck.
Any suggestions?
Thanks,
Lior




--
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] Error while building kernel code for HTC G2

2011-01-25 Thread s suresh
Hi All,

I am trying to build linux kernel source code for Htc g2..
I got the following errors while building ..

make ARCH=arm CROSS_COMPILE=/u/froyo2.2/prebuilt/linux-x86/toolchain
/arm-eabi-4.4.0/bin/arm-eabi-


scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm - include/asm-arm
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112: warning: ignoring return value of ‘fgets’, declared
with attribute warn_unused_result
HOSTCC scripts/bin2c
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/arm/kernel/compat.o
CC arch/arm/kernel/elf.o
AS arch/arm/kernel/entry-armv.o
In file included from arch/arm/mach-msm/include/mach/entry-macro.S:17,
from arch/arm/kernel/entry-armv.S:21:
arch/arm/mach-msm/include/mach/msm_iomap.h:51:28: error: msm_iomap-7xxx.h:
No such file or directory
make[1]: *** [arch/arm/kernel/entry-armv.o] Error 1
make: *** [arch/arm/kernel] Error 2

Please help me to resolve this problem.

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

[android-developers] GestureOverlayView preventing OnSingletap/onDoubletap methods to be called

2011-01-25 Thread vivin joy
Hi
i have an custom view. in main.Xml. this custom view is laid as a
child view of the gestureOverlayView. so that gestureOverlayView is
the parent view. i have allowed my mainActivity to implement the
onGesturelistener and OnDoubleTapListener. but all the touch events
are being passed to the gestureListener of the GesturOverlayView
rather than the onSingleTap/onDown/onDoubleTap events to be called..
how do i prevent this. i need the onSingleTap event to be called when
i tap on my screen, but those touch events are passed to
gestureListener to the GestureOverLayView. pls help me on this.

  is there way for me to dynamically dispatch the touch events to the
gestureListener of my Activity rather than the gestureListener of my
GestureOverlayView.

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


[android-developers] java.net.SocketException: The operation timed out

2011-01-25 Thread Bharathi raja
I developed one android application through we can download file by
passing url and i am getting java.net.SocketException: The operation
timed out only when i use static wifi on android phone to download
file. i tried both URLConnection and HttpCclient but i got same
result.

anyone know the solution for this problem.
please help me out.

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

2011-01-25 Thread mikeee
Thanks for all the comments.   A few more from me.

Diane, just to clarify I am using a *partial* wake lock as I mentioned
in my original post and this is what Mark was implying was evil.  I
understand that it uses more batteries then not having acquiring the
lock but it seems that if you have a requirement in an application
where you need to receive a GPS update as the user moves around with
relatively fine granularity of say 100 meters, that using a partial
wake lock is a perfectly valid use case - in fact I think it's a
better use of the API to let the screen and other parts of the phone
turn off yet the CPU and GPS remain on rather then forcing the
activity to be in the foreground and keep the screen on. The screen is
one the largest user of battery power.

Also my app has been on the Market for several months and hasn't had a
single comment or email sent to us about the battery life being an
issue.   Granted we've only sold 500 or so but I would expect since
it's not a free app that people would complain.  For example I can
easily run the app for 24 hours with a PARTIAL_WAKE_LOCK acquired
without using up all the batteries on my Motorola Droid and also while
surfing the web, checking email, making phone calls.I would argue
that if you're running applications, surfing the web and using email
on your phone frequently that 24 hours is about right for the amount
of time you get out of a charge.   I know many Droid owners that say
they have to charge their phone every day (and these are people that
aren't using my app - just general phone, text messaging, email,
surfing web activities).   Same is true of iphone users.

Also, Mark you said that the OS is probably terminating the service
because it has acquired an everlasting wake lock.   Why would their be
a published API call that is specifically designed to keep the phone
running and then behind the scenes have OS level logic that sniffs
around for services that are accessing the public API and then killing
them off.   I can't think of a single scenario where that makes any
sense.   I'd be perfectly fine if the documentation said don't use
this ever or don't ever use this in a service but I haven't ever
seen such a document other then random comments from people who
purport to have built a better mousetrap but it never captures the use
cases of specific app requirements.

Just to clarify - my app isn't polling anything, it's waiting to be
sent events from the LocationManager which pushes location changed
events if you are an observer so although the CPU is left running my
application isn't really doing anything except responding to events
that the OS pushes out.

I'm not sure what switching to a timer approach that has to wake up
every 15 seconds or less and then wait to acquire a GPS lock (which
itself can take 15 seconds if you have to do it from scratch each time
the phone wakes up), update the database in my app and then let the
default sleep timeout come and go.  I don't think the phone would ever
sleep in that scenario if your phone sleep time was 15 seconds for
example.I agree if I only needed to wake the phone up every 5
minutes to do a task then an Alarm based system would make sense.


On Jan 25, 4:04 am, Dianne Hackborn hack...@android.com wrote:
 It probably uses FLAG_KEEP_SCREEN_ON for its window to keep the screen on
 while in its UI, and also holds a partial wake lock to keep the device
 running while you are not in its UI.

 On Tue, Jan 25, 2011 at 12:38 AM, Mark Murphy mmur...@commonsware.comwrote:





  Moreover, I doubt Google Navigation uses an explicit WakeLock,
  preferring instead to use activity-based means of keeping the screen
  on.

  On Tue, Jan 25, 2011 at 6:30 AM, Dianne Hackborn hack...@android.com
  wrote:
   Navigation uses Service.startForeground() to say that the user is
  currently
   aware of it so it can't be considered expendable.

   On Mon, Jan 24, 2011 at 5:33 PM, mikeee mike.engelh...@gmail.com
  wrote:

   So you're saying Google Navigation *doesn't* use a wakelock and
   continually receive gps updates or that it's somehow an evil
   application because it uses the battery quickly?

   On Jan 24, 5:24 pm, Mark Murphy mmur...@commonsware.com wrote:
On Fri, Jan 21, 2011 at 8:11 AM, mikeee mike.engelh...@gmail.com
wrote:
 I've got an app that starts a service in order to receive location
 updates from the LocationManager.    The use case is the service
  needs
 to be running all the time and as such it acquires a
 PowerManager.PARTIAL_WAKE_LOCK in the onCreate() of the Service.

This sounds evil from the standpoint of battery life, if nothing else.

 But it seems from testing on several different phones and user
 feedback that the Service is still being put to sleep as the
  location
 notifications will stop if the application isn't in the foreground.

Android does not put applications to sleep. In your case, Android is
probably terminating your service for 

[android-developers] What is the best way to display OpenGL graphics with Camera preview background?

2011-01-25 Thread Mr.Roland
The only way that I know of is to use one SurfaceView for the Camera
preview and a GLSurfaceView for the OpenGL graphics.
Make the OpenGLSurfaceView have a translucent PixelFormat and stack
both SurfaceViews on top of each other using Activity.setContentView
and Activity.addContentView.
I know this is not a good way to do it because you should use only one
SurfaceView etc... yet I don't know of any alternative way of solving
this problem. Any suggestions?

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: Shape drawing - issue with corners

2011-01-25 Thread Henrik Lindqvist
The docs say you should do the following if you only want some corners
rounded:

corners android:radius=15dp android:bottomRightRadius=0dip
android:bottomLeftRadius=0dip /

Never got that it work tho.


On Jan 25, 2:30 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Lior,

 Apparently, something like this works a little better:

 corners
 android:topLeftRadius=15dp
 android:topRightRadius=15dp
 android:bottomRightRadius=0.1dp
 android:bottomLeftRadius=0.1dp /

 -- Kostya

 25.01.2011 15:58, Smiley пишет:



  Hi,
  I am following the instruction here:
 http://developer.android.com/guide/topics/resources/drawable-resource...

  and I am trying to draw a rectangle with only 2 rounded corners.

  Here is my xml

  ?xml version=1.0 encoding=utf-8?
  shape xmlns:android=http://schemas.android.com/apk/res/android;

     corners android:radius=15dp android:bottomRightRadius=0dp
              android:bottomLeftRadius=0dp /
     gradient android:angle=90 android:startColor=#c45209
             android:endColor=#edb18c android:centerColor=#ea6814 /
  /shape

  I tried many variations, with or without the android:radius attribute
  but no luck.
  Any suggestions?
  Thanks,
  Lior

 --
 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: SoundPool - sample XXX not READY

2011-01-25 Thread darrinps
I have a sound based application on the market and use SoundPool.

Long story short, it is quirky to say the least and only likes small
sound files. I have been able to play sounds over and over (as in a
loop) and change sounds though without issue once I matched up loading
and unloading correctly.

I don't have the code on me right now but can get it to you later. For
now though, keep the files small, and unloading matched, and it should
work.

On Jan 24, 7:45 pm, Steve rockthesm...@gmail.com wrote:
 Hi there,

 I am using a SoundPool to control the SFX in my game, which is
 targeted at Android 1.6 devices. Initially, I am able to do everything
 I wish to do, but after sometime of playing the game (can be a few
 minutes, can be more than thirty minutes), I am no longer able to play
 sounds, and instead am seeing messages in my log such as:

 SoundPool - sample 440 not READY

 The thing is, these samples never become ready - in fact from this
 moment on, no sound effects ever appear to be ready - it is almost as
 if the thread that handles the loading gets stuck and then no more
 sounds can load.

 Any sounds that are loaded for the duration of the game can still be
 played and function correctly, but sounds that get loaded per level
 will no longer work from this point on.

 I have a session of my game running now that is exhibiting this
 problem, and some statistics I have are:

  - I have made 516 calls to load
  - I have made 513 calls to unload (I have three sounds that are
 resident, all the other loads/unloads are as I have gone in and out of
 many levels)
  - I have made 1547 play calls
  - I have made 1547 stop calls

 I have spent some time debugging this now, and have ensured all load
 and unloads match up, and the same for play/stop calls, but I am not
 really sure what I can do next now. My only fallback I could code up
 is to destroy the sound pool from time to time, and reload the
 resident sounds - it isn't a clean solution, but I am at a loss as to
 what else I can do. It feels like the problem is more likely to crop
 up when loading/unloading lots of SFX in succession, I am not sure if
 it could be a race case to do with a resource not quite being in a
 loaded state, and not quite being in an unloaded state - of course
 this whole situation is made a lot worse by the fact I don't have a
 sensible method of querying when a sound is actually loaded in Android
 1.6.

 Someone out there must have a largish game on Android 1.6, using the
 SoundPool successfully? Can anyone help?

 Many thanks,

 Steve

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


[android-developers] Cell ID format

2011-01-25 Thread linhket
I use the getCid() function in the android api to get the Cell ID out
of the Samsung Captivate using ATT. this function spits out these cell
id really frequent (like few seconds). When I asked ATT developers,
they said that these cell ids are reported by Google.
My question is, is that possible that the cell id changes that
frequent? and what does these number means?

I use the getCid() and getLAC() to get these numbers below. Please
help me because this is my project.

Cell ID - LAC Timestamp
9521259-42978 1294323194412 Thu Jan 06 06:13:14 PST 2011
9525308-42978 1294323225080 Thu Jan 06 06:13:45 PST 2011
9521378-42978 1294323249630 Thu Jan 06 06:14:09 PST 2011
9521427-42978 1294323271844 Thu Jan 06 06:14:31 PST 2011
9525303-42978 1294323332305 Thu Jan 06 06:15:32 PST 2011
9525332-42978 1294323393749 Thu Jan 06 06:16:33 PST 2011

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: WakeLock/Services and sleep

2011-01-25 Thread Mark Murphy
On Tue, Jan 25, 2011 at 9:33 AM, mikeee mike.engelh...@gmail.com wrote:
 Also, Mark you said that the OS is probably terminating the service
 because it has acquired an everlasting wake lock.

I meant that the OS is probably terminating the service because it is
everlasting, not specifically the WakeLock. This has been discussed on
this list several times -- Android is being more aggressive about
killing off background services because too many developers have been
starting services and leaving them running for no good reason, tying
up memory and irritating users. This is what led to the rise of the
task killer app, the Manage Services screen in the Settings app, etc.

 I'm not sure what switching to a timer approach that has to wake up
 every 15 seconds or less and then wait to acquire a GPS lock (which
 itself can take 15 seconds if you have to do it from scratch each time
 the phone wakes up), update the database in my app and then let the
 default sleep timeout come and go.  I don't think the phone would ever
 sleep in that scenario if your phone sleep time was 15 seconds for
 example.    I agree if I only needed to wake the phone up every 5
 minutes to do a task then an Alarm based system would make sense.

If your app is designed to be used for short periods this way (you
cite Google Navigation as an exemplar), keeping the device awake and
the GPS on for those periods, when a user has explicitly and visibly
asked for it, and where the user is aware of what you are doing (e.g.,
startForeground(), as Ms. Hackborn mentioned), can be OK. For example,
a user is unlikely to miss the fact that Google Navigation is keeping
the device awake and GPS on, considering it is showing the user the
road ahead whenever the screen is on, not to mention the blue arrow
notification icon in the status bar.

Now, I admit, I jumped to conclusions based upon your stated symptoms
-- the conclusion being that you are trying to run this service beyond
short periods.

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

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

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


[android-developers] Mediaplayer cuts off early

2011-01-25 Thread Hank
I have a recording that is around 4 minutes and when I try to play it
using the MediaPlayer API, it doesn't play the full file, it cuts off
early maybe at most 30 seconds into the file. Did anyone have this
problem, and did they find a solution?

I also called getDuration() and it is returning the correct duration.

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


[android-developers] Re: ListView with XML files strategy

2011-01-25 Thread Paul
More thoughts... In terms of the ArrayAdapter in the parent activity,
and being able to edit/add/remove items from it in child activities,
would adding add, remove public methods to the parent activity that
then call the corresponding add/remove for the array adapter seem like
a valid way to tackle this?

Thanks,

Paul

On Jan 24, 10:20 pm, Paul pmmen...@gmail.com wrote:
 Hi all.  I need some advice on how to best proceed.

 First, a little background.  I have an application that uses a
 ListView as it's main activity to display all of the XML files from
 the /data/data/package.name/files directory.  There may be hundreds of
 these files as the app gets used, so I pass the job of scanning the
 directory and loading the files into the ArrayAdapter using an
 AsyncTask that fires up a 'Loading...' ProgressDialog onPreExecute(),
 and closes it down onPostExecute().  In doInBackground(), I iterate
 through the files returned from a listFiles() call, storing the file
 names into the ArrayAdapter.

 In terms of the AsyncTask, I've taken some direction here from Romain
 Guy's Shelves application in terms of the AsyncTask properly pausing/
 storing, etc when it gets interrupted, and killed on Application
 termination.  Everything here works OK, except that the ArrayAdapter
 can only tie in a single value (the filename in this case) to the
 View, and I's like to tie in multiple values/views pairs (in my case,
 filename, modified date).

 I've seen this done in the Notepad sample application, but that uses
 the SimpleCursorAdapter, but my understanding is that is exclusively
 tied to Cursors, and thus the SQLite database, which I don't need.

 So, here are my issues as I try to extend the very basic app:

 1) How do I bind multiple values to multiple Views in the adapter.
 ArrayAdapter can't do it, is there another more appropriate option, or
 am I looking at creating my own custom adapter?  If so, any example
 and/or suggestions on how to best proceed?

 2) Am I going down the completely wrong path here with how I am tying
 files into the List... is there some 'hybrid' way to tie files to a
 Cursor such that I could use the SimpleCursorAdapter to handle all of
 this?

 3) As a follow-up to that, in terms of adding items, I have an
 OptionsMenu that launches a Note Editing function (very similar to the
 Notepad example).  I can create XML files via this method, but on
 going back to the ListView, the new items are not in the List,
 unsurprisingly.  Notepad does this via the ContentResolver.insert()
 method, but with physical files scanned from the directory, I'm just
 not sure how I should be proceeding to update the List... I'd rather
 not have to re-scan every time a new note is added, but that may be my
 only option, as far as I know.  Again, any help here is much
 appreciated.  I see ArrayAdapter has insert/remove methods, but when
 in the child Editing activity, I'm not sure how I can access these
 (ContentResolver?).  Thanks for any clarification here.

 3) In terms of the Uri I define for each item, I am generating it from
 the absolute filepath, due to the fact that it may be possible in
 future versions to move/store files on the SD card, and I'm trying to
 maintain the Uniqueness of the Uri.  Anyone see any issues with this
 solution?

 A very broad question, I hope the basic gist is clear...  just trying
 to determine the best way to star so that I can move forward in the
 most efficient and correct way.

 Thanks in advance,

 Paul

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

2011-01-25 Thread Kostya Vasilyev
For this type of thing I'd use startActivityForResult (for new items) or 
a dialog, or a button (for removing items), handling the command right 
in the activity that displays the list.


-- Kostya

25.01.2011 19:09, Paul пишет:

More thoughts... In terms of the ArrayAdapter in the parent activity,
and being able to edit/add/remove items from it in child activities,
would adding add, remove public methods to the parent activity that
then call the corresponding add/remove for the array adapter seem like
a valid way to tackle this?

Thanks,

Paul

On Jan 24, 10:20 pm, Paulpmmen...@gmail.com  wrote:

Hi all.  I need some advice on how to best proceed.

First, a little background.  I have an application that uses a
ListView as it's main activity to display all of the XML files from
the /data/data/package.name/files directory.  There may be hundreds of
these files as the app gets used, so I pass the job of scanning the
directory and loading the files into the ArrayAdapter using an
AsyncTask that fires up a 'Loading...' ProgressDialog onPreExecute(),
and closes it down onPostExecute().  In doInBackground(), I iterate
through the files returned from a listFiles() call, storing the file
names into the ArrayAdapter.

In terms of the AsyncTask, I've taken some direction here from Romain
Guy's Shelves application in terms of the AsyncTask properly pausing/
storing, etc when it gets interrupted, and killed on Application
termination.  Everything here works OK, except that the ArrayAdapter
can only tie in a single value (the filename in this case) to the
View, and I's like to tie in multiple values/views pairs (in my case,
filename, modified date).

I've seen this done in the Notepad sample application, but that uses
the SimpleCursorAdapter, but my understanding is that is exclusively
tied to Cursors, and thus the SQLite database, which I don't need.

So, here are my issues as I try to extend the very basic app:

1) How do I bind multiple values to multiple Views in the adapter.
ArrayAdapter can't do it, is there another more appropriate option, or
am I looking at creating my own custom adapter?  If so, any example
and/or suggestions on how to best proceed?

2) Am I going down the completely wrong path here with how I am tying
files into the List... is there some 'hybrid' way to tie files to a
Cursor such that I could use the SimpleCursorAdapter to handle all of
this?

3) As a follow-up to that, in terms of adding items, I have an
OptionsMenu that launches a Note Editing function (very similar to the
Notepad example).  I can create XML files via this method, but on
going back to the ListView, the new items are not in the List,
unsurprisingly.  Notepad does this via the ContentResolver.insert()
method, but with physical files scanned from the directory, I'm just
not sure how I should be proceeding to update the List... I'd rather
not have to re-scan every time a new note is added, but that may be my
only option, as far as I know.  Again, any help here is much
appreciated.  I see ArrayAdapter has insert/remove methods, but when
in the child Editing activity, I'm not sure how I can access these
(ContentResolver?).  Thanks for any clarification here.

3) In terms of the Uri I define for each item, I am generating it from
the absolute filepath, due to the fact that it may be possible in
future versions to move/store files on the SD card, and I'm trying to
maintain the Uniqueness of the Uri.  Anyone see any issues with this
solution?

A very broad question, I hope the basic gist is clear...  just trying
to determine the best way to star so that I can move forward in the
most efficient and correct way.

Thanks in advance,

Paul



--
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] ListView with XML files strategy

2011-01-25 Thread TreKing
On Mon, Jan 24, 2011 at 9:20 PM, Paul pmmen...@gmail.com wrote:

 1) How do I bind multiple values to multiple Views in the
 adapter. ArrayAdapter can't do it, is there another more appropriate option,
 or am I looking at creating my own custom adapter?  If so, any
 example and/or suggestions on how to best proceed?


Yes it can. ArrayAdapterMyCustomType where MyCustomeType has all the
parameters you need (file name, timestamp, etc). Then override getView() as
necessary. This is explained in the ArrayAdapter docs.



 2) Am I going down the completely wrong path here with how I am tying files
 into the List... is there some 'hybrid' way to tie files to a Cursor such
 that I could use the SimpleCursorAdapter to handle all of this?


Seems fine, AFAICT.


 3) As a follow-up to that, in terms of adding items, I have an OptionsMenu
 that launches a Note Editing function (very similar to the
 Notepad example).  I can create XML files via this method, but on going
 back to the ListView, the new items are not in the List, unsurprisingly.


Then add them to the list.


 Notepad does this via the ContentResolver.insert() method, but with
 physical files scanned from the directory, I'm just not sure how I should be
 proceeding to update the List... I'd rather not have to re-scan every time a
 new note is added, but that may be  y only option, as far as I know.


That is unnecessary.


 Again, any help here is much appreciated.  I see ArrayAdapter has
 insert/remove methods, but when in the child Editing activity, I'm not sure
 how I can access these (ContentResolver?).  Thanks for any clarification
 here.


As Kostya mentioned, startActivityForResult, the result being the new entry
to add.


  3) In terms of the Uri I define for each item, I am generating it from the
 absolute filepath, due to the fact that it may be possible in
 future versions to move/store files on the SD card, and I'm trying
 to maintain the Uniqueness of the Uri.  Anyone see any issues with
 this solution?


What do you need a Uri for each item for?

-
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: ListView with XML files strategy

2011-01-25 Thread Kostya Vasilyev

Paul,

And on your old questions 1 and 2 - I wouldn't use ArrayAdapter, it's 
too basic, a nice way to start, but really doesn't have much flexibility 
for complex data types.


If you wanted to use a cursor-based adapter, you'd most likely need to 
import your data from files into a database.


A hybrid design is also possible - a ContentProvider that keeps a 
reference to the data file for each item, and possibly also contains the 
item's title, so it has everything necessary for presenting your item 
list. You'd then be able to take advantage of the content framework's 
data change notifications (such as your list automatically refreshing 
when items are added / deleted).


Also not sure why you're not using a database for all your data (as 
opposed to separate files), but that must be some kind of incoming 
requirements constraint, so not going to comment on that.


-- Kostya

25.01.2011 19:09, Paul пишет:

More thoughts... In terms of the ArrayAdapter in the parent activity,
and being able to edit/add/remove items from it in child activities,
would adding add, remove public methods to the parent activity that
then call the corresponding add/remove for the array adapter seem like
a valid way to tackle this?

Thanks,

Paul

On Jan 24, 10:20 pm, Paulpmmen...@gmail.com  wrote:

Hi all.  I need some advice on how to best proceed.

First, a little background.  I have an application that uses a
ListView as it's main activity to display all of the XML files from
the /data/data/package.name/files directory.  There may be hundreds of
these files as the app gets used, so I pass the job of scanning the
directory and loading the files into the ArrayAdapter using an
AsyncTask that fires up a 'Loading...' ProgressDialog onPreExecute(),
and closes it down onPostExecute().  In doInBackground(), I iterate
through the files returned from a listFiles() call, storing the file
names into the ArrayAdapter.

In terms of the AsyncTask, I've taken some direction here from Romain
Guy's Shelves application in terms of the AsyncTask properly pausing/
storing, etc when it gets interrupted, and killed on Application
termination.  Everything here works OK, except that the ArrayAdapter
can only tie in a single value (the filename in this case) to the
View, and I's like to tie in multiple values/views pairs (in my case,
filename, modified date).

I've seen this done in the Notepad sample application, but that uses
the SimpleCursorAdapter, but my understanding is that is exclusively
tied to Cursors, and thus the SQLite database, which I don't need.

So, here are my issues as I try to extend the very basic app:

1) How do I bind multiple values to multiple Views in the adapter.
ArrayAdapter can't do it, is there another more appropriate option, or
am I looking at creating my own custom adapter?  If so, any example
and/or suggestions on how to best proceed?

2) Am I going down the completely wrong path here with how I am tying
files into the List... is there some 'hybrid' way to tie files to a
Cursor such that I could use the SimpleCursorAdapter to handle all of
this?

3) As a follow-up to that, in terms of adding items, I have an
OptionsMenu that launches a Note Editing function (very similar to the
Notepad example).  I can create XML files via this method, but on
going back to the ListView, the new items are not in the List,
unsurprisingly.  Notepad does this via the ContentResolver.insert()
method, but with physical files scanned from the directory, I'm just
not sure how I should be proceeding to update the List... I'd rather
not have to re-scan every time a new note is added, but that may be my
only option, as far as I know.  Again, any help here is much
appreciated.  I see ArrayAdapter has insert/remove methods, but when
in the child Editing activity, I'm not sure how I can access these
(ContentResolver?).  Thanks for any clarification here.

3) In terms of the Uri I define for each item, I am generating it from
the absolute filepath, due to the fact that it may be possible in
future versions to move/store files on the SD card, and I'm trying to
maintain the Uniqueness of the Uri.  Anyone see any issues with this
solution?

A very broad question, I hope the basic gist is clear...  just trying
to determine the best way to star so that I can move forward in the
most efficient and correct way.

Thanks in advance,

Paul



--
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] Android Camera Application Development

2011-01-25 Thread orkun gencoglu
I take it out but still the problem exist..

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

2011-01-25 Thread xiaoxiong weng
does work on some carrier like mine.
It depends on if your carrier has a gateway, mine for example is
16477712...@msg.wind.ca

String number = j...@edispatches.com;
 String st = testing;
sm.sendTextMessage(number, null, st, null, null);

On Mon, Jan 24, 2011 at 9:51 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 AFAIK, this is typically implemented within the cellular network's smarts
 along with other services (like voicemail, or SMS messages about missed
 calls).

 Doing this in an application seems possible, but difficult, as you'll need
 to implement your own email messaging back-end, possibly including your own
 mail servers.

 -- Kostya

 25.01.2011 1:47, JAlexoid (Aleksandr Panzin) пишет:

  I am pretty sure that SmsMessenger does not send emails. You use the
 Email client to do that.
 Read the error output from LogCat. If then you don't know what is the
 problem, post it here. Maybe someone will ridicule you for something
 or there is a genuine problem.

 On 24 янв, 23:12, Jonathan Jennej...@edispatches.com  wrote:

 anybody?

 On Jan 21, 12:23 pm, Jonathan Jennej...@edispatches.com  wrote:

  I'm trying to code an app that sends an SMS message to an email
 gateway. I know this is possible because I can send a message from my
 phone number to an email, and have it receive it properly. Also, I can
 reply to that email and my phone will get it as a text message. The
 problem I'm having is that when I code it this way... the message just
 never happens.
 My code in question is as follows:
 String number = j...@edispatches.com;
  String st = testing;
  sm.sendTextMessage(number, null, st, null, null);
 So, it should be sending testing to my email address... but it just
 seems to die when this method is called? Other operations within this
 method seem to be working as well.



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


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




-- 
littleb...@littlebearz.com
+1-647-771-2551 SMS Call 24/7

 This message and any attached documents contain information from the
 LittleBearZ that may be confidential and/or
 privileged. If you are not the intended recipient, you may not read,
 copy, distribute, or use this information. If you have received this
 transmission in error, please notify the sender immediately by reply
 e-mail and then delete this message.
I usually Reply within 24 Hours. Keyword: *usually*

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

2011-01-25 Thread TreKing
On Fri, Jan 21, 2011 at 2:33 AM, subha ramkie subharam...@gmail.com wrote:

 I want to know if there's a way to show the map in a dialog (similar to a
 pop up) on top of the current screen .
 Currently it opens up as a new screen.

 Will the Dialog work here? If so, how should i set the content view to a
 dialog?
 Or is there a dialog class for maps?


http://developer.android.com/guide/topics/ui/themes.html#ApplyATheme

-
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] Timer Question

2011-01-25 Thread bklik
I have lots of issues with my egg timer application.

I started by just writing the application all in an action. That of
course didn't work because once the user left the application, it
would get garbage collected after a while and longer timers would
fail.

So, I tried a Service. My main Activity handles all the UI stuff and
binds to a Service. The user enters in the amount of time they want
the egg timer to fun for, and that time gets handed off to the
service.

The Service has a timer that deducts time every second until it
reaches zero, then plays a sound. Only, somehow it randomly never gets
there. Sometimes it'll work for a three hour countdown, other times
it'll stop working after only 30 minutes. I've put Log.d() all over
the place where things get stopped or destroyed but they never show
up.

Does a timer get stopped and garbage collected independed of an
Activity or Service? Is there a simple example of a persistent
countdown timer out there?

Thanks,

Brenton

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


[android-developers]

2011-01-25 Thread fird hardys


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

2011-01-25 Thread Kostya Vasilyev
Using a Java Timer in an Android application has some drawbacks: one, it 
invokes the callback on a worker thread, two, it stops if the process is 
killed.


Take a look at AlarmManager - it's reliable even if the application is 
killed, and uses an Android-specific notification mechanism when it fires.


http://developer.android.com/reference/android/app/AlarmManager.html

-- Kostya

25.01.2011 19:44, bklik пишет:

I have lots of issues with my egg timer application.

I started by just writing the application all in an action. That of
course didn't work because once the user left the application, it
would get garbage collected after a while and longer timers would
fail.

So, I tried a Service. My main Activity handles all the UI stuff and
binds to a Service. The user enters in the amount of time they want
the egg timer to fun for, and that time gets handed off to the
service.

The Service has a timer that deducts time every second until it
reaches zero, then plays a sound. Only, somehow it randomly never gets
there. Sometimes it'll work for a three hour countdown, other times
it'll stop working after only 30 minutes. I've put Log.d() all over
the place where things get stopped or destroyed but they never show
up.

Does a timer get stopped and garbage collected independed of an
Activity or Service? Is there a simple example of a persistent
countdown timer out there?

Thanks,

Brenton




--
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] Timer Question

2011-01-25 Thread Marcin Orlowski
On 25 January 2011 17:44, bklik brenton.k...@gmail.com wrote:

 So, I tried a Service. My main Activity handles all the UI stuff and
 binds to a Service. The user enters in the amount of time they want
 the egg timer to fun for, and that time gets handed off to the
 service.

You definitely are looking for this:
http://developer.android.com/reference/android/app/AlarmManager.html

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


Re: [android-developers] Browser plugin development in Android 2.3

2011-01-25 Thread TreKing
On Mon, Jan 24, 2011 at 5:23 AM, Ankit ank82...@gmail.com wrote:

 I tried to build the sample browser plugin which comes with the source code
 but was unable to build it .


If you building the source code, try a group that's dedicated to building
the source code (like platform or porting).


 I tried it but was unable to build the plugin.


When you post on a more appropriate group, elaborate on what unable to
build means.

-
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] Mediaplayer cuts off early

2011-01-25 Thread TreKing
On Tue, Jan 25, 2011 at 10:02 AM, Hank hwang...@gmail.com wrote:

 I have a recording that is around 4 minutes and when I try to play it using
 the MediaPlayer API, it doesn't play the full file, it cuts off early maybe
 at most 30 seconds into the file.


Do you have any more information than that? Exceptions? Log messages? The
file type? Etc.

-
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: Mediaplayer cuts off early

2011-01-25 Thread Hank
I don't get any exceptions and the log doesn't provide any
information. I am trying to play a amr file

On Jan 25, 12:17 pm, TreKing treking...@gmail.com wrote:
 On Tue, Jan 25, 2011 at 10:02 AM, Hank hwang...@gmail.com wrote:
  I have a recording that is around 4 minutes and when I try to play it using
  the MediaPlayer API, it doesn't play the full file, it cuts off early maybe
  at most 30 seconds into the file.

 Do you have any more information than that? Exceptions? Log messages? The
 file type? Etc.

 -
 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: WakeLock/Services and sleep

2011-01-25 Thread Dianne Hackborn
Just do not sit there holding a partial wake lock forever.

If this actually didn't matter, why would we have these at all?  Why would
we just instead skipping the whole sleeping the CPU thing?  It sure would
have made our life a lot easier.

The problem with a partial wake lock is that on many (but not all) devices,
it does not *directly* consume power, but it allows a lot of things to
*indirectly* consume it by allowing them to run when they normally wouldn't.
 Thus how much you reduce battery life is going to depend greatly on the
other apps running on the phone.  Even for a stock build of the platform,
though, I can guarantee you will be noticeable impacting battery life.  It
seems like every release we go through we have some situation come up where
wake locks are being held too much in some case, causing our battery life to
go down.

Also it makes no sense to measure the impact of holding a partial wake lock
while doing anything with the screen on, since while the screen on the CPU
is not allowed to go to deep sleep so a partial wake lock wouldn't do
anything.

Another complication with them is that, because they don't directly consume
power, the battery use UI won't accurately reflect what you are doing.  That
is, if you are holding a wake lock, and that is allowing another app to run
a lot, then none of the increased battery drain will be accounted against
you in the UI, it will be all against the other app.  Worse, the more likely
case is that by doing this you allow 5 or 10 or more other processes to run
for a little bit each, which together result in significant battery drain,
but not coming from a particular source.  So as a user you will just have an
experience where your battery life is poor, but won't see anyone in the UI
as a real culprit.

That said, the reporting of this has been greatly improved in 2.3.  Now
while you are holding a partial wake lock (while the screen is off), you
will get 50% of the blame for all CPU during that time.  This makes it very
likely that your app will show up on the CPU usage list.  I think you can
assume that as 2.3 gets on more devices, you will get increasingly
complaints from users as they start seeing your app to blame, instead of
just having a nebulous experience of their battery life being poorer than it
seems it should be with no clear cause.

Also there are devices where the simple act of holding a partial wake lock
*does* consume power, because the hardware can't put the CPU into power
collapse while doing so.  The Nexus S (and other Galaxy S class devices) is
an example of this.  On these devices, you will definitely have an impact on
battery life, even if there is nothing else that is allowed to use the CPU.
 And also in 2.3 this will be better reflected in the battery usage UI.

As far as a service being killed -- unless you use startForeground(), you
should count on your service being killed and restarted somewhat regularly.
 I believe, in the current implementation, after it has been started for 30
minutes it is dropped out of the service OOM adjustment, and put into the
regular background LRU list.  At that point it will just get killed whenever
it gets to the end of the list -- best case for a device that can keep the
maximum of 15 background processes running, after the user (or broadcasts or
other activity) has made 15 other app processes active for any amount of
time.  On devices with little memory, you will be killed almost immediately
at that point.

We didn't start killing processes for excessive wake lock use until 2.3.  At
this point it is only done to background processes.  I don't recall if a
service that has been running a long time is considered a background process
for that accounting.  It probably should be (though it will soon after be
restarted).  We allow a service otherwise to keep holding a wake lock, since
also as of 2.3 these things will show up in the battery use for the user so
they will know how to blame.

That all said, if you aren't currently causing the GPS to run yourself,
waking up every 15 seconds to acquire a GPS lock would have significantly
more battery use because GPS is fairly power hungry.  Well and fundamentally
waking up every 15 seconds is not solving any problem here, it is doing the
same problem while following the letter of the guidelines.

Finally, if you are just passively listening for location updates that come
from other apps requesting location information, do you really need to hold
a wake lock?  If a location update is happening, someone else must be
holding a wake lock during that time in order for it to happen.

On Tue, Jan 25, 2011 at 6:33 AM, mikeee mike.engelh...@gmail.com wrote:

 Thanks for all the comments.   A few more from me.

 Diane, just to clarify I am using a *partial* wake lock as I mentioned
 in my original post and this is what Mark was implying was evil.  I
 understand that it uses more batteries then not having acquiring the
 lock but it seems that if you have a 

[android-developers] how to interact with phone call

2011-01-25 Thread gonzobrains
Hi,

It is possible to programmatically interact with a phone call?  Can
you, for example, play audio to a caller from a program?

Thanks,
gb

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


[android-developers] notification help

2011-01-25 Thread Wall-E
I have created a notification when receiving an SMS and I would like
my application to either launch OR if it has already been launched to
return to the last activity the user left it.  I tried reading up on
Activities and Tasks and the flags associated with it but it did not
help me much.  I tried the code described below but it doesn't do
anything when clicking on notification.

Currently I have set the launchMode to singleTask but am not sure if
that is what I want to reach the desired behavior mentioned above, can
anybody clarify?

Also, creating the intent to pass into the PendingIntent is confusing
me too.  This is what I have so far:

Context context = getApplicationContext();

Intent openMyAppIntent = new Intent(context, MyApplication.class);
showNotification(openMyAppIntent, SMS Encounter, Received SMS,
msg, R.drawable.icon);

this is showNotification:

private void showNotification(Intent intent, String message, String
messageHeadline, String messageDetails, int icon)
{
NotificationManager mNotificationManager =
(NotificationManager)getSystemService(NOTIFICATION_SERVICE);

Notification notifyDetails = new Notification(icon, message,
System.currentTimeMillis());

PendingIntent myIntent =
PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);

notifyDetails.setLatestEventInfo(getApplicationContext(),
messageHeadline, messageDetails, myIntent);
notifyDetails.flags |= Notification.FLAG_AUTO_CANCEL;

mNotificationManager.notify(ID, notifyDetails);

}

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

2011-01-25 Thread Kostya Vasilyev
Yes, a singleTask or singleInstance launch mode for your Activity sounds 
right:


http://developer.android.com/guide/topics/fundamentals.html#lmodes

I *think* your intent for the notificaiton is wrong: does 
MyApplication.class refer to your main activity, or to your 
application class? It should be the activity class, also make sure 
you've added it to the manifest.


-- Kostya

25.01.2011 20:50, Wall-E пишет:

I have created a notification when receiving an SMS and I would like
my application to either launch OR if it has already been launched to
return to the last activity the user left it.  I tried reading up on
Activities and Tasks and the flags associated with it but it did not
help me much.  I tried the code described below but it doesn't do
anything when clicking on notification.

Currently I have set the launchMode to singleTask but am not sure if
that is what I want to reach the desired behavior mentioned above, can
anybody clarify?

Also, creating the intent to pass into the PendingIntent is confusing
me too.  This is what I have so far:

Context context = getApplicationContext();

Intent openMyAppIntent = new Intent(context, MyApplication.class);
showNotification(openMyAppIntent, SMS Encounter, Received SMS,
msg, R.drawable.icon);

this is showNotification:

private void showNotification(Intent intent, String message, String
messageHeadline, String messageDetails, int icon)
{
NotificationManager mNotificationManager =
(NotificationManager)getSystemService(NOTIFICATION_SERVICE);

 Notification notifyDetails = new Notification(icon, message,
System.currentTimeMillis());

 PendingIntent myIntent =
PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);

 notifyDetails.setLatestEventInfo(getApplicationContext(),
messageHeadline, messageDetails, myIntent);
 notifyDetails.flags |= Notification.FLAG_AUTO_CANCEL;

 mNotificationManager.notify(ID, notifyDetails);

}




--
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] Need help with Google Map

2011-01-25 Thread 20plus10
Hi All

I am trying to use Google Map and I have followed this instruction:

http://developer.android.com/resources/tutorials/views/hello-mapview.html

But I am still not able to use these liberaries for some reasons in
the MapsActivity file!

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MapView.LayoutParams;

What do I wrong?

Please help

BR
Maali

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


[android-developers] SDCard question

2011-01-25 Thread Scott Deutsch
Hello Group,

How do you enable the Move to SD Card button? Is it a permission
thing?

Also, Is there a way to make the drawable folder automatically go to
the SD Card or make the whole program automatically download to the SD
Card?

Thanks group.

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

2011-01-25 Thread Scott Deutsch
Just to let you guys know...i decided not to use it and went a
different route.

Thanks anyways group.

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

2011-01-25 Thread Kostya Vasilyev

25.01.2011 21:21, Scott Deutsch пишет:

Hello Group,

How do you enable the Move to SD Card button? Is it a permission
thing?


http://developer.android.com/guide/appendix/install-location.html


Also, Is there a way to make the drawable folder automatically go to
the SD Card or make the whole program automatically download to the SD
Card?


Download location and install location are two different things.

The link above has a description of what exactly gets moved, where, and how.

-- Kostya


Thanks group.




--
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] Need help with Google Map

2011-01-25 Thread Tommy
You know how there are two selections for each version of the android OS you
want when creating the project in eclipse? Make sure you choose to use the
API version of the Level you want. ( Project --- Properties --- Android
tab) So if you are using Android 2.0 click the box below it for Google APIs
(Platform 2.0) This worked for me in the past when I had the issue. This
should include the file maps.jar 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of 20plus10
Sent: Tuesday, January 25, 2011 1:15 PM
To: Android Developers
Subject: [android-developers] Need help with Google Map

Hi All

I am trying to use Google Map and I have followed this instruction:

http://developer.android.com/resources/tutorials/views/hello-mapview.html

But I am still not able to use these liberaries for some reasons in the
MapsActivity file!

import com.google.android.maps.GeoPoint; import
com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MapView.LayoutParams;

What do I wrong?

Please help

BR
Maali

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

2011-01-25 Thread Tommy
Have you set up a broadcast receiver to monitor for an incoming sms in your
manifest?

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Wall-E
Sent: Tuesday, January 25, 2011 12:50 PM
To: Android Developers
Subject: [android-developers] notification help

I have created a notification when receiving an SMS and I would like my
application to either launch OR if it has already been launched to return to
the last activity the user left it.  I tried reading up on Activities and
Tasks and the flags associated with it but it did not help me much.  I tried
the code described below but it doesn't do anything when clicking on
notification.

Currently I have set the launchMode to singleTask but am not sure if that is
what I want to reach the desired behavior mentioned above, can anybody
clarify?

Also, creating the intent to pass into the PendingIntent is confusing me
too.  This is what I have so far:

Context context = getApplicationContext();

Intent openMyAppIntent = new Intent(context, MyApplication.class);
showNotification(openMyAppIntent, SMS Encounter, Received SMS, msg,
R.drawable.icon);

this is showNotification:

private void showNotification(Intent intent, String message, String
messageHeadline, String messageDetails, int icon) {
NotificationManager mNotificationManager =
(NotificationManager)getSystemService(NOTIFICATION_SERVICE);

Notification notifyDetails = new Notification(icon, message,
System.currentTimeMillis());

PendingIntent myIntent =
PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);

notifyDetails.setLatestEventInfo(getApplicationContext(),
messageHeadline, messageDetails, myIntent);
notifyDetails.flags |= Notification.FLAG_AUTO_CANCEL;

mNotificationManager.notify(ID, notifyDetails);

}

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

2011-01-25 Thread Dustin
Having the same issue for Mad Yapper with some Samsung Galaxy S devices.  It 
__APPEARS__ that a user was able to fix this issue by doing these steps in 
Manage Applications:

1) Force Stop
2) Clear Data
3) Uninstall 
4) Re-install

It sucks to have a user go through this, of course.  Wonder how many other 
users just punted and junked the app!?

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

[android-developers] clicking an auto link from dataadapter how to set flag new activity

2011-01-25 Thread Byron Penner
I have a dataadapter with a textview that auto parses a link. Since
its context is the dataadapter not the activity I get the flag
activity new task error. Anyone know how to set this flag for an auto
linked textview from a dataadapter?
Thanks,
Byron

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

2011-01-25 Thread Hank
So I found out that my MediaPlayer was being garbage collected so that
was causing it to end early.

On Jan 25, 12:40 pm, Hank hwang...@gmail.com wrote:
 I don't get any exceptions and the log doesn't provide any
 information. I am trying to play a amr file

 On Jan 25, 12:17 pm, TreKing treking...@gmail.com wrote:

  On Tue, Jan 25, 2011 at 10:02 AM, Hank hwang...@gmail.com wrote:
   I have a recording that is around 4 minutes and when I try to play it 
   using
   the MediaPlayer API, it doesn't play the full file, it cuts off early 
   maybe
   at most 30 seconds into the file.

  Do you have any more information than that? Exceptions? Log messages? The
  file type? Etc.

  -
  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: notification help

2011-01-25 Thread Wall-E
does
'MyApplication.class' refer to your main activity, or to your
application class?

The MyApplication.class refers to my application class.  My app has
multiple activities so which activity do I use because I want it to
load or restore whichever activity the user left.

Have you set up a broadcast receiver to monitor for an incoming sms
in your
manifest?

Yes I have.  I am receiving SMS messages just fine and I'm also
getting the notification so I'm not sure what your question has to do
with my problem.  Does it have to do with what context I'm using
inside the intents?  If so, what I'm doing is starting a serviceIntent
which is basically just an SMS parser and inside the SMS parser is
where I'm handling the notification stuff.

On Jan 25, 1:36 pm, Tommy droi...@gmail.com wrote:
 Have you set up a broadcast receiver to monitor for an incoming sms in your
 manifest?







 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-developers@googlegroups.com] On Behalf Of Wall-E
 Sent: Tuesday, January 25, 2011 12:50 PM
 To: Android Developers
 Subject: [android-developers] notification help

 I have created a notification when receiving an SMS and I would like my
 application to either launch OR if it has already been launched to return to
 the last activity the user left it.  I tried reading up on Activities and
 Tasks and the flags associated with it but it did not help me much.  I tried
 the code described below but it doesn't do anything when clicking on
 notification.

 Currently I have set the launchMode to singleTask but am not sure if that is
 what I want to reach the desired behavior mentioned above, can anybody
 clarify?

 Also, creating the intent to pass into the PendingIntent is confusing me
 too.  This is what I have so far:

 Context context = getApplicationContext();

 Intent openMyAppIntent = new Intent(context, MyApplication.class);
 showNotification(openMyAppIntent, SMS Encounter, Received SMS, msg,
 R.drawable.icon);

 this is showNotification:

 private void showNotification(Intent intent, String message, String
 messageHeadline, String messageDetails, int icon) {
         NotificationManager mNotificationManager =
 (NotificationManager)getSystemService(NOTIFICATION_SERVICE);

         Notification notifyDetails = new Notification(icon, message,
 System.currentTimeMillis());

         PendingIntent myIntent =
 PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);

         notifyDetails.setLatestEventInfo(getApplicationContext(),
 messageHeadline, messageDetails, myIntent);
         notifyDetails.flags |= Notification.FLAG_AUTO_CANCEL;

         mNotificationManager.notify(ID, notifyDetails);

 }

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

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


[android-developers] Re: Problem running Android JUnit Test on eclipse

2011-01-25 Thread gaurav
No solution yet. Pl help

On Jan 24, 8:24 am, A. Elk lancaster.dambust...@gmail.com wrote:
 I'm almost certain it's ADT. All that the ADT tools do is run the
 command-line tools in the background and then format the output.

 When I change ADT versions, I first *uninstall* the old ADT tools,
 restart Eclipse, install the new ADT tools, and then restart again. I
 always use the ADT tools for the platform level I'm building against.
 I've found that 9 times out of 10, strange behavior in Eclipse is due
 to having the wrong version of ADT.

 On Jan 21, 5:06 pm, gaurav grv...@gmail.com wrote:



  Here are the answers:

  1. I have put my application inside the system apps myfroyoDir/
  packages/apps folder and built it using command line. And running the
  emulator and app from command prompt.

  2. Yes both app and test package works fine from command prompt.

  3. Yes I am running my test package with
  android.test.InstrumentationTestRunner.  I tried to use ADT 8.0.1 as
  well as 9.0.0, no luck.

  I did reinstallation of ADT with 2 different version. Tried using
  different versions of eclipse.  Only thing now I can do is to use
  different versions of Android SDK.

  On Jan 21, 4:48 pm, A. Elk lancaster.dambust...@gmail.com wrote:

   Can you please confirm the following:
   - The application under test (not the test package) works fine in
   Eclipse?
   - Both the application under test and the test package work fine from
   the command line?
   - You've followed the directions for setting up a test package in
   Eclipse? See Dev Guide  Developing  Testing  In Eclipse with ADT?

   What test case class are you extending in your test package? Are you
   running your test package with android.test.InstrumentationTestRunner?

   The message suggests that the problem is in ADT, not anywhere else.
   The version of ADT you use has to be compatible with the SDK you're
   using. I usually un-install the ADT and re-install the new version
   when I'm upgrading an SDK.

   Elk? What Elk?

   On Jan 21, 4:40 pm, gaurav grv...@gmail.com wrote:

I have configured the Froyo source code in eclipse. I am trying to run
android junit test Run as- Android JUnit Test, a error pop-up
comes.
When i try to run the already existing Android Junit Test cases or my
own test case (compiled with froyo source), I get following error.
Test runs fine when I run it from command prompt.

I guess this is ADT related issue, but don't have any solution. I
tried it on Eclipse galileo and helios, tried ADT 8.0.. and 9.0.0,
Java version 1.5 and 1.6...nothing worked.

Please help

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


Re: [android-developers] Re: notification help

2011-01-25 Thread Kostya Vasilyev

25.01.2011 22:00, Wall-E пишет:

does
'MyApplication.class' refer to your main activity, or to your
application class?

The MyApplication.class refers to my application class.  My app has
multiple activities so which activity do I use because I want it to
load or restore whichever activity the user left.


I don't think this is going to work - in fact, you are seeing it not 
work, if I understood your original message correctly.


FYI - launching an activity from a notification always starts it in a 
new task - even if you don't set FLAG_ACTIVITY_NEW_TASK in your intent, 
it's automatically added by the framework and you get a logcat warning.


Perhaps you could figure out the most appropriate activity at the time 
when you set the notification, and use an intent specific to that 
activity, taking the user directly to where he can see or work with the 
information that caused the notification.


--
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: Send an SMS message to an email?

2011-01-25 Thread Jonathan Jenne
Right, this is why I figured it should be so easy! On any regular cell
phone that I'm aware of, you can send text messages to an email
address... and that's exactly what I'm trying to do here. In fact, the
company I work for, most of our communication between customers and
our server happens in this way. Customers send a text-message to an
email address of ours using their cell phones, and that will update
something on our end on their behalf. Then, we send them a message
back from our email to their phonenumber@carrier. This method has
worked for us for the last 6 years, and has many benefits for us.

We're developing an app that will basically make this communication
easier for the user... but apparently it can't be done short of re-
writing an entire SMS/Email messaging back-end? That doesn't seem
worth it at all.

If we wanted to interact with our customer in another way, it's sort
of a hassle. We can do this through the web, but it would be visiting
an ugly website like 
www.ourwebsite.com/admin/androidapp.php?usrnum=phonenumbercommand
 ... Which is fine, but we don't want the website to be visible when
this happens, and I can't seem to find a way to call the web-browser
in the background, then have it die nicely once the site is loaded.

Do you guys have any suggestions? Is this possible, or are we stuck
having to re-write parts of our website back-end along with parts of
our security procedures to accommodate a different method of
communication ?

On Jan 25, 12:51 am, Kostya Vasilyev kmans...@gmail.com wrote:
 AFAIK, this is typically implemented within the cellular network's
 smarts along with other services (like voicemail, or SMS messages
 about missed calls).

 Doing this in an application seems possible, but difficult, as you'll
 need to implement your own email messaging back-end, possibly including
 your own mail servers.

 -- Kostya

 25.01.2011 1:47, JAlexoid (Aleksandr Panzin) пишет:



  I am pretty sure that SmsMessenger does not send emails. You use the
  Email client to do that.
  Read the error output from LogCat. If then you don't know what is the
  problem, post it here. Maybe someone will ridicule you for something
  or there is a genuine problem.

  On 24 янв, 23:12, Jonathan Jennej...@edispatches.com  wrote:
  anybody?

  On Jan 21, 12:23 pm, Jonathan Jennej...@edispatches.com  wrote:

  I'm trying to code an app that sends an SMS message to an email
  gateway. I know this is possible because I can send a message from my
  phone number to an email, and have it receive it properly. Also, I can
  reply to that email and my phone will get it as a text message. The
  problem I'm having is that when I code it this way... the message just
  never happens.
  My code in question is as follows:
  String number = j...@edispatches.com;
    String st = testing;
                    sm.sendTextMessage(number, null, st, null, null);
  So, it should be sending testing to my email address... but it just
  seems to die when this method is called? Other operations within this
  method seem to be working as well.

 --
 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: notification help

2011-01-25 Thread Wall-E
Ok so I changed my intent to using my LAUNCHER (main start up)
activity and it launches that activity but when the last activity is
something different, it doesn't restore/launch that one.

On Jan 25, 12:50 pm, Wall-E bashee...@gmail.com wrote:
 I have created a notification when receiving an SMS and I would like
 my application to either launch OR if it has already been launched to
 return to the last activity the user left it.  I tried reading up on
 Activities and Tasks and the flags associated with it but it did not
 help me much.  I tried the code described below but it doesn't do
 anything when clicking on notification.

 Currently I have set the launchMode to singleTask but am not sure if
 that is what I want to reach the desired behavior mentioned above, can
 anybody clarify?

 Also, creating the intent to pass into the PendingIntent is confusing
 me too.  This is what I have so far:

 Context context = getApplicationContext();

 Intent openMyAppIntent = new Intent(context, MyApplication.class);
 showNotification(openMyAppIntent, SMS Encounter, Received SMS,
 msg, R.drawable.icon);

 this is showNotification:

 private void showNotification(Intent intent, String message, String
 messageHeadline, String messageDetails, int icon)
 {
         NotificationManager mNotificationManager =
 (NotificationManager)getSystemService(NOTIFICATION_SERVICE);

         Notification notifyDetails = new Notification(icon, message,
 System.currentTimeMillis());

         PendingIntent myIntent =
 PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);

         notifyDetails.setLatestEventInfo(getApplicationContext(),
 messageHeadline, messageDetails, myIntent);
         notifyDetails.flags |= Notification.FLAG_AUTO_CANCEL;

         mNotificationManager.notify(ID, notifyDetails);







 }

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

2011-01-25 Thread Jonathan Jenne
By the way, i checked in the logs and SmsMessenger is giving me
Invalid Destination Address

I think that's funny because like I said earlier this is entirely
possible to do, yet Android cannot do it? I'm trying to build for
version 1.6, was this something added in later versions?

On Jan 25, 11:29 am, xiaoxiong weng ad...@littlebearz.com wrote:
 does work on some carrier like mine.
 It depends on if your carrier has a gateway, mine for example is
 16477712...@msg.wind.ca

 String number = j...@edispatches.com;
  String st = testing;
                 sm.sendTextMessage(number, null, st, null, null);



 On Mon, Jan 24, 2011 at 9:51 PM, Kostya Vasilyev kmans...@gmail.com wrote:
  AFAIK, this is typically implemented within the cellular network's smarts
  along with other services (like voicemail, or SMS messages about missed
  calls).

  Doing this in an application seems possible, but difficult, as you'll need
  to implement your own email messaging back-end, possibly including your own
  mail servers.

  -- Kostya

  25.01.2011 1:47, JAlexoid (Aleksandr Panzin) пишет:

   I am pretty sure that SmsMessenger does not send emails. You use the
  Email client to do that.
  Read the error output from LogCat. If then you don't know what is the
  problem, post it here. Maybe someone will ridicule you for something
  or there is a genuine problem.

  On 24 янв, 23:12, Jonathan Jennej...@edispatches.com  wrote:

  anybody?

  On Jan 21, 12:23 pm, Jonathan Jennej...@edispatches.com  wrote:

   I'm trying to code an app that sends an SMS message to an email
  gateway. I know this is possible because I can send a message from my
  phone number to an email, and have it receive it properly. Also, I can
  reply to that email and my phone will get it as a text message. The
  problem I'm having is that when I code it this way... the message just
  never happens.
  My code in question is as follows:
  String number = j...@edispatches.com;
   String st = testing;
                   sm.sendTextMessage(number, null, st, null, null);
  So, it should be sending testing to my email address... but it just
  seems to die when this method is called? Other operations within this
  method seem to be working as well.

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

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

 --
 littleb...@littlebearz.com
 +1-647-771-2551 SMS Call 24/7

  This message and any attached documents contain information from the
  LittleBearZ that may be confidential and/or
  privileged. If you are not the intended recipient, you may not read,
  copy, distribute, or use this information. If you have received this
  transmission in error, please notify the sender immediately by reply
  e-mail and then delete this message.

 I usually Reply within 24 Hours. Keyword: *usually*

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

2011-01-25 Thread Wall-E
Ok I got it to work using the following as the Intent:


Intent openAppIntent = new Intent(Intent.ACTION_MAIN, null, 
context,
StartUpActivity.class)
.addCategory(Intent.CATEGORY_LAUNCHER)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);


Switching from my application.class to an actual activity helped a
lot.  Thanks Kostya.



On Jan 25, 2:12 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 25.01.2011 22:00, Wall-E пишет:

  does
  'MyApplication.class' refer to your main activity, or to your
  application class?

  The MyApplication.class refers to my application class.  My app has
  multiple activities so which activity do I use because I want it to
  load or restore whichever activity the user left.

 I don't think this is going to work - in fact, you are seeing it not
 work, if I understood your original message correctly.

 FYI - launching an activity from a notification always starts it in a
 new task - even if you don't set FLAG_ACTIVITY_NEW_TASK in your intent,
 it's automatically added by the framework and you get a logcat warning.

 Perhaps you could figure out the most appropriate activity at the time
 when you set the notification, and use an intent specific to that
 activity, taking the user directly to where he can see or work with the
 information that caused the notification.

 --
 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] Problem with XMLPullParser and/or Java reflection on specific devices (zio) ?

2011-01-25 Thread selmo
A new problem has shown up with my app, which appears to affect only certain 
devices. I don't have a lot of information about the failure, but my current 
best guess is it appears to be failing to read or parse an internal XML 
resource.  

I read one of several XML files from res/xml and use that to dynamically 
initialize a java class / data structure (ie: coordinates of bitmaps based 
on a skin definition -- not device, region, or resolution dependent). 
 There's nothing device-specific there, so it seems like if that had a 
problem, it wouldn't be specific to any one device.  And that method has 
been working fine for a long time, across many resolutions, languages, and 
devices from 1.5 to 2.2+  -- but I recently got a vague report that suggests 
it's not working with a Sanyo / Kyocera Zio (on Cricket) running 1.6  -- and 
possibly also on some tablet of unknown make and model (but not a Galaxy 
Tab).  The failure mode suggests that it is able to find the XML from the 
resources, but the data is not making it from the XML to the java class.  

If I had access to a device (or a patient tester with one) I could probably 
solve this with detailed logging, but at the moment, I'm stuck.  Does anyone 
have any ideas or similar experience?

---

Here is the code for the class which takes a Resource and ID and a Java 
object and assigns any properties with the same name in the XML to the Java 
object. (apologies if this method is outdated / bad practice / etc.  I wrote 
it when I was just starting on Android and java is not my native tongue.).  

package lars.FlightPanel;

import org.xmlpull.v1.XmlPullParser;
import android.content.res.Resources;
import java.lang.reflect.*;
import java.lang.Class;

public class XMLClassReader
{

private static final String TAG = XMLClassReader;
private String lead_tag;
private boolean verbose = false;


XMLClassReader () { } ;

public Object Read (int resourceID, Object target,Resources R)
{
XmlPullParser xpp = R.getXml(resourceID);
return Read (xpp,target);
}


public Object Read (XmlPullParser xpp, Object target)
{

lead_tag = XMLParser: ;
try
{
int eventType = xpp.getEventType();
while (eventType!=XmlPullParser.END_DOCUMENT)
{
if (eventType==XmlPullParser.START_TAG)
ReadTag(xpp, target.getClass(),target);
eventType = xpp.next();
}
Field fld = target.getClass().getDeclaredField(XML_Loaded);
// FlightPanel.LocalLog(TAG, lead_tag+field is  + fld +  in  + target);
if (fld!=null)
fld.setInt (target, Integer.parseInt(1));
FlightPanel.LocalLog(TAG, lead_tag+ done loading all.);
}
catch (Exception e)
{

e.printStackTrace();
FlightPanel.LocalLog(TAG, lead_tag+ error  + e.toString());
}
return target;

}


private void ReadTag (XmlPullParser xpp, Class cls,Object target)
{
String orig_lead_tag = lead_tag;
lead_tag+=\t;
try
{
String thistag = xpp.getName();
if (verbose ) FlightPanel.LocalLog(TAG, lead_tag+ starting parsing of XML 
tag  + thistag);
if (verbose) FlightPanel.LocalLog(TAG, lead_tag+ - into class  + 
cls.getName() +  containing :);
Field[] flds = cls.getDeclaredFields();
for (int x=0;xflds.length;x++)
if (verbose)  FlightPanel.LocalLog(TAG, lead_tag+ --  + flds[x].getName() 
+  \t  + flds[x]);
int index;

// read the primitives out as attributes
for (index = 0; index  xpp.getAttributeCount();index++)
{
String attributeName = xpp.getAttributeName(index);
try
{
Field fld = cls.getDeclaredField(attributeName);
String value = xpp.getAttributeValue(index);
if (verbose) FlightPanel.LocalLog(TAG, lead_tag+ = matched XML attribute  
+ attributeName + \t assigning value + value);
String typname = fld.getType().getName();
if (verbose) FlightPanel.LocalLog(TAG, lead_tag+ == to field \t + fld +  
of type  + fld.getType() +  \t   + typname);
if (verbose) FlightPanel.LocalLog(TAG, lead_tag+ == on object \t + target 
+   \t  + target.getClass());
if (typname.equals(int))
fld.setInt (target, Integer.parseInt(value));
else if (typname.equals(float))
fld.setFloat (target, Float.parseFloat(value));
else if (typname.equals(boolean))
fld.setBoolean (target, Boolean.parseBoolean(value));
else if (typname.equals(double))
fld.setDouble (target, Double.parseDouble(value));
else if (typname.equals(byte))
fld.setByte (target, Byte.parseByte(value));
else if (typname.equals(short))
fld.setShort (target, Short.parseShort(value));
else if (typname.equals(long))
fld.setLong (target, Long.parseLong(value));
// todo:  add strings and arrays


//
}
catch (Exception e)
{
FlightPanel.LocalLog(TAG, lead_tag+ error no field matching XML attribute  
+ attributeName);
FlightPanel.LocalLog(TAG, lead_tag+ error  + e.toString());
}

}

// read any subclasses
xpp.next();
int eventType = xpp.getEventType();
while (eventType!=XmlPullParser.END_DOCUMENT  
eventType!=XmlPullParser.END_TAG)
{
if 

Re: [android-developers] Re: Send an SMS message to an email?

2011-01-25 Thread Kostya Vasilyev

25.01.2011 22:16, Jonathan Jenne пишет:

By the way, i checked in the logs and SmsMessenger is giving me
Invalid Destination Address

I think that's funny because like I said earlier this is entirely
possible to do, yet Android cannot do it? I'm trying to build for
version 1.6, was this something added in later versions?



AFAIK, those types of features are implemented within the carrier's 
network, and are independent of the particular phone make / model and 
its firmware.


Heck, you don't even need a phone for this to work - just get a 
contract, activate it, set up the service, and never insert the SIM it 
into the phone, and it should still work.


I'm using a service like this for incoming faxes with a CDMA operator: 
faxes sent to that phone number are received by the operator's back-end 
and are delivered to me over email, and the phone with that number is a 
spare I never even turn on.


Now, if you need this for one particular phone # (or just a few), then 
sure, you can build an application that listens for incoming SMS 
messages, and then does whatever it wants with them - including 
forwarding them over email.


This looks like a nice write-up that should help you get started:

http://mobiforge.com/developing/story/sms-messaging-android

--
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: Shape drawing - issue with corners

2011-01-25 Thread Smiley
Perfect ! thanks that solved it.

On Jan 25, 3:30 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Lior,

 Apparently, something like this works a little better:

 corners
 android:topLeftRadius=15dp
 android:topRightRadius=15dp
 android:bottomRightRadius=0.1dp
 android:bottomLeftRadius=0.1dp /

 -- Kostya

 25.01.2011 15:58, Smiley пишет:



  Hi,
  I am following the instruction here:
 http://developer.android.com/guide/topics/resources/drawable-resource...

  and I am trying to draw a rectangle with only 2 rounded corners.

  Here is my xml

  ?xml version=1.0 encoding=utf-8?
  shape xmlns:android=http://schemas.android.com/apk/res/android;

     corners android:radius=15dp android:bottomRightRadius=0dp
              android:bottomLeftRadius=0dp /
     gradient android:angle=90 android:startColor=#c45209
             android:endColor=#edb18c android:centerColor=#ea6814 /
  /shape

  I tried many variations, with or without the android:radius attribute
  but no luck.
  Any suggestions?
  Thanks,
  Lior

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

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


[android-developers] Re: how to pass value from spinner to another activity

2011-01-25 Thread Jonathan Foley

You can actually stop default selection with a little hackery:

http://stackoverflow.com/questions/867518/how-to-make-an-android-spinner-with-initial-text-select-one


This isn't entirely future-safe because it uses method reflection and
changes the visibility at runtime, but I can attest that it works.
The other less hackish way to get around this is to just set a flag on
initializing the spinner such that you ignore the default call to
onSelectionChange(); The default will
still be displayed but it won't trigger whatever action you call from
onSelectionChange(); A third option is to inject a blank value into
your adapter. This is pretty easy with an ArrayAdapter and I do with
with a CursorAdapter using CursorWrapper

Jonathan


On Jan 25, 1:19 am, Mark Murphy mmur...@commonsware.com wrote:
 You cannot stop default selection, other than to set your own
 selection. IMHO, the selection event of a Spinner should not trigger
 startActivity().

 On Tue, Jan 25, 2011 at 9:10 AM, J@n$ janedevana...@gmail.com wrote:
  I have a problem in selecting the vaues from the spinner.whenever i
  run the programit goes to second page instead of displaying the main
  page which has spinner.i knew the problem is due to default selection
  of spinner values. do any one knw how stop default selection

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

 Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

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


Re: [android-developers] How to multi select the GridView Item?

2011-01-25 Thread TreKing
On Fri, Jan 21, 2011 at 2:45 AM, and.Freecomm andfreec...@gmail.com wrote:

 1. how to get the state when we clicked the item in my custom ImageView?


Seems like something you would track yourself. Maybe extending this makes
sense:
http://developer.android.com/reference/android/widget/Checkable.html


  2. how to set checkable for sub ImageView?


See above.


 3. how to get the subview on onItemClickListner?


Not sure what you're asking.

-
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: Attempt to read preferences file without permission

2011-01-25 Thread Dustin
Scratch that -- still did not fix.  Will definitely report back if I find a 
fix or workaround.


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

2011-01-25 Thread Dustin
Scratch that -- still did not fix.  Will definitely report back if I find a 
fix or workaround.

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

[android-developers] strange bug on Android

2011-01-25 Thread bob
I'm diagnosing a strange bug on Android.  I noticed that if I insert
these two lines:


gl.glPushMatrix();
gl.glPopMatrix();

Things get scaled a little differently.

Any ideas why?  Shouldn't those two lines cancel one another out and
do nothing noticeable?

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


Re: [android-developers] Need help with layout problem.

2011-01-25 Thread TreKing
On Fri, Jan 21, 2011 at 1:01 AM, Kit Ramos kitramo...@gmail.com wrote:

 here's the xml file i'm using, in this it sets all the edit boxes to
 150dip wide even the one where I have it set to 12dip but I don't want
 them all to be 150dip wide! I want the one I set to 12 be 12 and the
 other 150 how do I do this?


Can you attach a picture? Reading through unformatted layout text with no
idea with no visual of what you're trying to accomplish is hard.

-
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] Background color

2011-01-25 Thread Antony BODY
Hi all,

I'm trying to get the background color of a button. This color was
applied on this button with the XML code.
It's little complicated !!!

I tried some solutions like:

Drawable d = findViewById(R.id.my_btn).getBackground();

But i can't obtain the background color code.
Any people have idea ??

Regards.

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


[android-developers] Wake locks and camera

2011-01-25 Thread blindfold
I noticed that in Android 2.2 and earlier I must do either a
FULL_WAKE_LOCK or a combination of PARTIAL_WAKE_LOCK and
FLAG_KEEP_SCREEN_ON to make sure the camera does not get turned off
after a while with my app in the foreground (and I need a wake lock to
keep GPS going). The underlying assumption seems to be that the camera
is not useful when the screen is off, but that assumption is false for
computer vision applications where not the user but the program is
watching the camera view. Is this fixed in Android 2.3 (Gingerbread)?

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] Background color

2011-01-25 Thread Kostya Vasilyev

Anthony,

In general, a background is not necessarily a solid color - it can be an 
bitmap, a nine-patch, a gradient, state list, etc.


If you know that you specified a solid color in XML, you could try 
casting the Drawable to a ColorDrawable:


http://developer.android.com/reference/android/graphics/drawable/ColorDrawable.html

Additionally, I think you should be able set a tag for the button in 
XML, that you would then be able to access from code:


Button.
android:tag=@color/your_background_color
/

Color color = (Color) button.getTag();

This would come in handy if you ever decide to switch from solid color 
backgrounds to something similar but different (a gradient with a 
lighting effect, etc.)


-- Kostya

25.01.2011 23:34, Antony BODY пишет:

Hi all,

I'm trying to get the background color of a button. This color was
applied on this button with the XML code.
It's little complicated !!!

I tried some solutions like:

Drawable d = findViewById(R.id.my_btn).getBackground();

But i can't obtain the background color code.
Any people have idea ??

Regards.




--
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] ExpandableList question

2011-01-25 Thread dashman
I've got an expandable list - with multiple entries.

Is it possible to have a text-label between some of
the entries.

this entry is not expandable (just a text label) and
the height will be different (enough  for the text).

thanks.

p.s. much like what's possible in the Preferences
list.

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


Re: [android-developers] ExpandableList question

2011-01-25 Thread TreKing
On Tue, Jan 25, 2011 at 3:30 PM, dashman erjdri...@gmail.com wrote:

 Is it possible to have a text-label between some of the entries.


You can have whatever you want in each entry, including extra text, like the
Preferences.

-
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] [Camera API] Force Close Does Not Release Camera Resource

2011-01-25 Thread Joe McCann
So while developing a custom camera application I've realized on rare
occasions and on various devices if the app has to force close, it
does not always release the camera resource.

Is there a way to find/detect the process that is holding onto this
resource and kill it?  Or some other technique?  It is rather
difficult bug to reproduce (for me anyway), but ultimately the device
has to be restarted.

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: Attempt to read preferences file without permission

2011-01-25 Thread roflharrison
Sorry about the double post earlier!

Opening the preferences as world readable didn't help the problem.

On Jan 26, 6:03 am, Dustin dustin.bre...@gmail.com wrote:
 Scratch that -- still did not fix.  Will definitely report back if I find a
 fix or workaround.

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

2011-01-25 Thread TreKing
On Fri, Jan 21, 2011 at 11:34 AM, TGundhus tgundhu...@gmail.com wrote:

 Here is a link to a tutorial, but I get an error, someone who got
 the entire pure source or know it, because it rly does not work for
 me (something I'm doing wrong for sure...)


You should explain the error and makes sense if you expect to get help.

-
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: troubleshooting debugger issues

2011-01-25 Thread TreKing
When this stuff happens, make sure you have the right debugging instance
(running the debugger multiple times can create multiple instances) and the
right device selected.

-
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: Bitmaps with XRGB_8888 ?

2011-01-25 Thread webmonkey
Hi Romain

Looking further into the Android source code when you create a 32-bit
color bitmap the system always assumes you have alpha and there is no
way to turn it off. Only when you load a JPEG or something does the
system set the flag to ignore it.

That is an unnecessary performance penalty that can easily be avoided.
For Honeycomb could you please make the setHasAlpha public or provide
an XRGB_ config. For the upcoming tablets we are going to draw
even more and bigger bitmaps.


On Jan 24, 10:01 pm, webmonkey webmonke...@gmail.com wrote:
 But that seems to be the only way to tell the system that it can
 ignore the alpha channel. Bitmap.hasAlpha() just returns the flag.

 I am updating the bitmap a lot with copyPixelsFromBuffer so how do I
 tell the system that it can ignore the alpha channel?

 On Jan 24, 9:49 pm, Romain Guy romain...@android.com wrote:



  No you cannot. Methods marked @hide are not part of the public API. They are
  not present in ADT's android.jar so you cannot compile against it. We also
  might rename or remove such APIs at any point in the future.

  On Mon, Jan 24, 2011 at 12:42 PM, webmonkey webmonke...@gmail.com wrote:
   Ah thanks, I just checked the Android source and there is the
   following function

   public void setHasAlpha(boolean hasAlpha) {
      nativeSetHasAlpha(mNativeBitmap, hasAlpha);
   }

   But it is set to @hide so it is not in the docs, can we use this
   function?

   On Jan 24, 6:14 pm, Romain Guy romain...@android.com wrote:
The system can detect when a ARGB_ bitmap is opaque (see
Bitmap.hasAlpha()).

On Mon, Jan 24, 2011 at 8:26 AM, webmonkey webmonke...@gmail.com
   wrote:
 Now that Gingerbread has moved to 32-bit windows is there a way to
 create a 32-bit bitmap without alpha to improve drawing performance of
 opaque bitmaps?

 Something like Bitmap.createBitmap( 512, 512,
 Bitmap.Config.XRGB_  )

 Or does the system somehow detect that the bitmap is opaque?

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

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

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

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

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

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

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


Re: [android-developers] Re: Attempt to read preferences file without permission

2011-01-25 Thread Kostya Vasilyev

A pretty curious case, would be interesting to know more.

Anyone willing to make a one-off build of their application for one of 
those users having problems?


It could just run ls -l for the few application-specific data 
directories (shared_prefs, databases, files) and capture the output. 
This would show existing files, their owners, and permissions.


-- Kostya

26.01.2011 0:45, roflharrison пишет:

Sorry about the double post earlier!

Opening the preferences as world readable didn't help the problem.

On Jan 26, 6:03 am, Dustindustin.bre...@gmail.com  wrote:

Scratch that -- still did not fix.  Will definitely report back if I find a
fix or workaround.



--
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: Send an SMS message to an email?

2011-01-25 Thread JAlexoid (Aleksandr Panzin)
A) If you have a website, then you can use the HTTP Client to do the
interaction with your server and post all the messages you like (This
is the easy way a.k.a WebService)
B) If you need to only send the email to one single address, then just
send it over SMTP directly to that server. An SMTP server will accept
email where it is the final destination. (But you have to note, that
some ISPs block the 25th port on all SMTP hosts except their local
relay.)

On 25 янв, 21:13, Jonathan Jenne j...@edispatches.com wrote:
 Right, this is why I figured it should be so easy! On any regular cell
 phone that I'm aware of, you can send text messages to an email
 address... and that's exactly what I'm trying to do here. In fact, the
 company I work for, most of our communication between customers and
 our server happens in this way. Customers send a text-message to an
 email address of ours using their cell phones, and that will update
 something on our end on their behalf. Then, we send them a message
 back from our email to their phonenumber@carrier. This method has
 worked for us for the last 6 years, and has many benefits for us.

 We're developing an app that will basically make this communication
 easier for the user... but apparently it can't be done short of re-
 writing an entire SMS/Email messaging back-end? That doesn't seem
 worth it at all.

 If we wanted to interact with our customer in another way, it's sort
 of a hassle. We can do this through the web, but it would be visiting
 an ugly website 
 likewww.ourwebsite.com/admin/androidapp.php?usrnum=phonenumbercommand
  ... Which is fine, but we don't want the website to be visible when
 this happens, and I can't seem to find a way to call the web-browser
 in the background, then have it die nicely once the site is loaded.

 Do you guys have any suggestions? Is this possible, or are we stuck
 having to re-write parts of our website back-end along with parts of
 our security procedures to accommodate a different method of
 communication ?

 On Jan 25, 12:51 am, Kostya Vasilyev kmans...@gmail.com wrote:

  AFAIK, this is typically implemented within the cellular network's
  smarts along with other services (like voicemail, or SMS messages
  about missed calls).

  Doing this in an application seems possible, but difficult, as you'll
  need to implement your own email messaging back-end, possibly including
  your own mail servers.

  -- Kostya

  25.01.2011 1:47, JAlexoid (Aleksandr Panzin) пишет:

   I am pretty sure that SmsMessenger does not send emails. You use the
   Email client to do that.
   Read the error output from LogCat. If then you don't know what is the
   problem, post it here. Maybe someone will ridicule you for something
   or there is a genuine problem.

   On 24 янв, 23:12, Jonathan Jennej...@edispatches.com  wrote:
   anybody?

   On Jan 21, 12:23 pm, Jonathan Jennej...@edispatches.com  wrote:

   I'm trying to code an app that sends an SMS message to an email
   gateway. I know this is possible because I can send a message from my
   phone number to an email, and have it receive it properly. Also, I can
   reply to that email and my phone will get it as a text message. The
   problem I'm having is that when I code it this way... the message just
   never happens.
   My code in question is as follows:
   String number = j...@edispatches.com;
     String st = testing;
                     sm.sendTextMessage(number, null, st, null, null);
   So, it should be sending testing to my email address... but it just
   seems to die when this method is called? Other operations within this
   method seem to be working as well.

  --
  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] Error receiving broadcast Intent NullPointerException

2011-01-25 Thread ericharlow
I was working on creating a wifi service for my application. When I
ran into a strange error detailing Error receiving broadcast
Intent ... and stating that there was a NullPointerException. I was
finally able to track this issue down. What I discovered was a
broadcast intent action like WifiManager.WIFI_STATE_CHANGED_ACTION is
sticky. Context.registerReceiver() documentation states that

The system may broadcast Intents that are sticky -- these stay
around after the broadcast as finished, to be sent to any later
registrations. If your IntentFilter matches one of these sticky
Intents, that Intent will be returned by this function and sent to
your receiver as if it had just been broadcast.

When my broadcastReceiver received the initial sticky broadcast it
caused the NullPointerException error. Note I am working on OS1.6 -
api level 4 so BroadcastReceiver's isInitialStickyBroadcast() is not
available. I hope what I discovered for myself is helpful to others
with this error.

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

2011-01-25 Thread Kostya Vasilyev
Whenever port 25 is blocked, port 587 is often left open and available for
submitting new messages.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
26.01.2011 1:08 пользователь JAlexoid (Aleksandr Panzin) 
jalex...@gmail.com написал:

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

[android-developers] Re: Game Engine

2011-01-25 Thread JAlexoid (Aleksandr Panzin)
Oh.. So you did. What is the name of the game you developed using that
engine?

On 25 янв, 08:29, Kevin R. Octavian kevin.r.octav...@gmail.com
wrote:
 i used candroidengine

 On Wed, Jan 19, 2011 at 9:38 PM, Orkun orkungenco...@gmail.com wrote:
   Hi all!

  I wanna ask, what do you think the best game engine suitable to
  Android within efficiency/performance issues?

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

 --
 Mobile Developer
 (Android,iphone,Blackberry,J2ME,brew,symbian)
 mobile :
 085722945257
 email :
 kevin.r.octav...@gmail.com
 arsenal_a...@yahoo.co.id
 blog :
 kevinroctavian.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: Android wifi connectivity using WPA key

2011-01-25 Thread ericharlow
also you can checkout an open source wifi library at
http://code.google.com/p/android-wifi-connecter/

On Jan 25, 3:16 am, Kostya Vasilyev kmans...@gmail.com wrote:
 There is a way to do this from code:

 http://developer.android.com/reference/android/net/wifi/WifiManager.h...,
 boolean)

  public boolean enableNetwork (int netId, boolean disableOthers)
  Since: API Level 1

  Allow a previously configured network to be associated with. If
  disableOthers is true, then all other configured networks are
  disabled, and an attempt to connect to the selected network is
  initiated. This may result in the asynchronous delivery of state
  change events.

 For this to work, you first need to add the network to Android's known
 (== configured) network list, that's how you get the int netId above.

 http://developer.android.com/reference/android/net/wifi/WifiManager.h...)

  Add a new network description to the set of configured networks. The
  networkId field of the supplied configuration object is ignored.

  The new network will be marked DISABLED by default. To enable it,
  called enableNetwork(int, boolean).

 The only somewhat tricky part is setting correct security options in the
 WifiConfiguration object. Here is how I do it in my application:

 http://kmansoft.wordpress.com/2010/04/08/adding-wifi-networks-to-know...

 You can also check the sources of Android's Settings application,
 available here:

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

 -- Kostya

 25.01.2011 12:24, Marcin Orlowski пишет:

  On 25 January 2011 09:59, Brijeshmasrani.brij...@gmail.com  wrote:
  Hi,

  I want to connect my android device to a wifi point which is having a
  WPA key is there any method in which i can pass the SSID and password
  and the device will connect to that wifi-point.???
  Tell your user to set the phone up for this network?

 --
 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] Error receiving broadcast Intent NullPointerException

2011-01-25 Thread Kostya Vasilyev
Do you have a stack trace for this crash?

--
Kostya Vasilyev -- http://kmansoft.wordpress.com
26.01.2011 1:21 пользователь ericharlow eric.b.har...@gmail.com написал:
 I was working on creating a wifi service for my application. When I
 ran into a strange error detailing Error receiving broadcast
 Intent ... and stating that there was a NullPointerException. I was
 finally able to track this issue down. What I discovered was a
 broadcast intent action like WifiManager.WIFI_STATE_CHANGED_ACTION is
 sticky. Context.registerReceiver() documentation states that

 The system may broadcast Intents that are sticky -- these stay
 around after the broadcast as finished, to be sent to any later
 registrations. If your IntentFilter matches one of these sticky
 Intents, that Intent will be returned by this function and sent to
 your receiver as if it had just been broadcast.

 When my broadcastReceiver received the initial sticky broadcast it
 caused the NullPointerException error. Note I am working on OS1.6 -
 api level 4 so BroadcastReceiver's isInitialStickyBroadcast() is not
 available. I hope what I discovered for myself is helpful to others
 with this error.

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

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

[android-developers] Re: Sending AVRCP play command, getting spammed with broadcast

2011-01-25 Thread Haseman
I'm seeing this happen when I unplug some hardware headsets that have
microphones.

On Jan 17, 9:36 am, James jrs8...@gmail.com wrote:
 Hello.

 I have some hardware that sends the AVRCP play command to the phone
 upon bluetooth connection. What I am seeing is the MEDIA_BUTTON action
 intent spammed over and over in the debugger. This is causing problems
 with a few apps but mainly Pandora. Pandora will constantly play/pause
 over and over. It is almost like the AVRCP command gets sent to the
 phone which generates a MEDIA_BUTTON broadcast that keeps getting sent
 out over and over.

 I set up a Broadcast Receiver to catch it and try to determine what's
 going on. Here is what is being spammed:

 01-17 12:20:04.324: ERROR/NPT:(1558): Intent
 { act=android.intent.action.MEDIA_BUTTON (has extras) }
 01-17 12:20:04.324: ERROR/NPT:(1558): KeyEvent{action=0 code=85
 repeat=0 meta=0 scancode=200 mFlags=8}

 which is the bluetooth Play/Pause media key. This is what it should
 be, as the AVRCP command triggers this, but as I said, it's like the
 OS just keeps spamming this.

 I have tried using the abortBroadcast() method to stop it but that has
 no effect. I am guessing the broadcast is non-ordered and can't be
 stopped explicitly?

 I have verified it is not the hardware spamming the AVRCP command by
 debugging my firmware code. The spamming behavior also continues if I
 unplug the hardware.

 I am using 2.2.

 Thanks.

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


Re: [android-developers] Creation Of Word Pad Editor

2011-01-25 Thread TreKing
On Fri, Jan 21, 2011 at 9:01 AM, Vaibhav Nalwad
itsmevaibhav...@gmail.comwrote:

  don't know...from Where to Start With...Please Help Me in This Regard


http://developer.android.com/index.html

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