[android-developers] Hardware accelerated Canvas.drawPicture support (or recommended alternatives)

2012-05-27 Thread Josh Guilfoyle
I am hoping to use the svg-android project to implement a dynamic SVG
viewer for files with fairly large amounts of detail.  My initial
smoke tests are promising as the SVG files I am using are rendered
correctly however performance is poor without any sophisticated
drawing optimizations.  I believe this is due to the usage of
Canvas.drawPicture (svg-android translates the SVG document structure
into a single Picture), preventing hardware acceleration on supporting
devices and possibly being implemented without efficient trimming of
areas outside the clip bounds.  Before I begin significant or
fundamental optimization however, I'd like to confirm a few things
about Android's rendering pipeline (both recent and older versions).
Hopefully this will allow me to utilize existing research already
conducted by the Android team or other community developers.
Specifically:

1. What performance gotchas may exist with simply constructing my own
macro notion of a Picture and replaying the raw Canvas operations on
draw?  That is, define a very simple op-code interpreted language in
which I can represent a Picture and simply execute it on draw myself
much like how I assume Picture is natively implemented.  Will this
alone be sufficient to permit hardware acceleration?  I'm assuming no
given that Android developers would have implemented drawPicture on
the hardware accelerated path if it were this simple, but I'd like to
understand why and if there may be anything I can do to mitigate the
issues in my specific case.

2. I believe an asynchronous tiling bitmap layer may be an appropriate
solution where sections of the SVG are dynamically rendered to off-
screen bitmaps and blitted on screen.  A separate renderer thread
would be used to manage writing to a cache of off-screen bitmaps.  Can
hardware acceleration help in some way with this off-screen rendering
or would it merely kick in with improved performance when blitting
those tiles to screen?  If no, I may be able to avoid the issues with
#1 entirely since hardware acceleration wasn't going to speed up the
off-screen rendering anyway.

3. What is the runtime nature of attempting to draw paths and
primitives (lines, rects, etc) that are entirely outside the canvas'
clipped bounds?  Is it necessary or appropriate for me to call
Canvas.quickReject myself or can I rely on this rejection happening at
a lower level automatically?  Can I expect that it behaves
consistently when drawing a Picture versus drawing a Path?  This is
especially important if I implement a tiling renderer as per #2 where
a large number of draw requests will be made for the full graphic to
render into discrete sections.  If Canvas cannot reasonably minimize
cycles for this case I will likely need to implement my own culling
optimizations.

If anyone has other suggestions for things I didn't consider please
feel free to let me know.  I'm hoping to drive toward an elegant and
efficient solution that works optimally on newer hardware but with
acceptable performance on other 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] Hardware accelerated Canvas.drawPicture support (or recommended alternatives)

2012-05-27 Thread Josh Guilfoyle
Thanks for the quick reply.  Given your last comment about rasterization of 
Path, I think an appropriate option is to just disregard hardware 
acceleration for most of what I'm doing and render the full graphic into a 
set of tiles.  The hardware renderer can optimize the last mile step for 
me by efficiently copying and scaling my tiled bitmaps onto the display.

I will also do some performance benchmarks to get a sense for how expensive 
drawing the Picture is versus culling only the portion of the full graphic 
I need.  Hopefully it's negligible.


On Sunday, May 27, 2012 9:46:03 AM UTC-7, Romain Guy (Google) wrote:

  1. What performance gotchas may exist with simply constructing my own
  macro notion of a Picture and replaying the raw Canvas operations on
  draw?

 Not much really. The UI toolkit has its own equivalent of Picture called 
 DisplayList. If you render a View with on draw() the toolkit builds such a 
 display list and keeps it until the next invalidate.

  3. What is the runtime nature of attempting to draw paths and
  primitives (lines, rects, etc) that are entirely outside the canvas'
  clipped bounds?  Is it necessary or appropriate for me to call
  Canvas.quickReject myself or can I rely on this rejection happening at
  a lower level automatically?  

 It will happen automatically but you can save a bit of work by doing it 
 yourself early on.
 
  If anyone has other suggestions for things I didn't consider please
  feel free to let me know.

 Just one: path rendering can be very inefficient on the GPU. Currently 
 only rectangles and lines are implement natively, all other types of shapes 
 are rasterized with the software renderer into a GL texture. If your paths 
 change often, performance will be pretty bad.

   I'm hoping to drive toward an elegant and
  efficient solution that works optimally on newer hardware but with
  acceptable performance on other 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
  

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

2011-12-26 Thread Josh Guilfoyle
I believe I have the sensor emulation support working properly (I can
connect to port 1968 locally and it appears to be connecting to the
phone) but it is unclear to me how to determine if the emulator has
also connected on this port, or how to trigger this connection
manually?  The instructions indicate that it seems to make the
connection at boot (being that the set up is done before starting the
emulator) but this seems counter intuitive to me for the emulator to
automatically search for such a listening service only on boot.

Can someone please shed some light on how this is supposed to work?

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


[android-developers] Re: Android 4.0 sensor emulation setup questions

2011-12-26 Thread Josh Guilfoyle
I answered my own question a bit.  It does appear that the emulator
only connects on startup at present, not sure why it didn't work the
first time I booted the ics AVD instance.  Still, it would be nice to
see a controlling application in the emulator that would allow us to
view the status (successful connection or not) and control it in some
way.

Regardless of the rough edges, this is a huge blessing for developers
working with advanced sensor applications.  I'm mostly interested in
the SdkControllerLib to create custom sensor playback and recording
tools that will help me refine my application logic.  Thanks a ton
guys :)


On Dec 26, 3:03 pm, Josh Guilfoyle jast...@gmail.com wrote:
 I believe I have the sensor emulation support working properly (I can
 connect to port 1968 locally and it appears to be connecting to the
 phone) but it is unclear to me how to determine if the emulator has
 also connected on this port, or how to trigger this connection
 manually?  The instructions indicate that it seems to make the
 connection at boot (being that the set up is done before starting the
 emulator) but this seems counter intuitive to me for the emulator to
 automatically search for such a listening service only on boot.

 Can someone please shed some light on how this is supposed to work?

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


[android-developers] Side-effects related to RawContacts.ACCOUNT_TYPE

2010-09-07 Thread Josh Guilfoyle
I am attempting to attach a small amount of meta data to existing
contacts and have chosen to do this by implementing my won raw contact
account type and custom data row mime type.  I do not need to have any
special sync backend so the account manager system does not seem
relevant however this has me wondering if there is anything  special
that must be done to declare the mime types I am using.

For example, if I want to insert new raw contacts of type
org.devtcg.foo, is there any registry I must participate in to
ensure these records are stable on the device?  In testing and looking
at the ContactsProvider2 source it seems like nothing special is
required but it is difficult to prove for sure.

Any help from someone in the know on the account and contacts system
would be greatly appreciated.

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

2009-06-22 Thread Josh Guilfoyle

Check with adb logcat to see if there was a problem launching your
activity.  My initial guess is that you forgot to declare this
activity in the AndroidManifest.xml file.  You also should not need to
use FLAG_CANCEL_CURRENT, nor should you need to use
Main.this.getBaseContext, as any Context would suffice, including
Main.this.


On Jun 22, 1:05 am, mac-systems jens.h...@gmx.de wrote:
 Hello,

 i want to Inform the User about an Event from my Application using the
 NotificationManager and then invoking a Activity with details about
 the Event.

 As far as i know it should work like this:

                                 final NotificationManager mManager = 
 (NotificationManager)
 getSystemService(Context.NOTIFICATION_SERVICE);

                                 Intent intent = new Intent(Main.this,
 AlarmNotificationDetail.class);

                                 Notification notification = new 
 Notification(R.drawable.icon,
 Notify, System.currentTimeMillis());
                                 notification.setLatestEventInfo(Main.this, 
 App Name,
 Description of the notification, PendingIntent
                                                 
 .getActivity(Main.this.getBaseContext(), 0, intent,
 PendingIntent.FLAG_CANCEL_CURRENT));
                                 mManager.notify(815, notification);

 This put an Event in my Statusbar, but it do not forward to the
 AlarmNotificationDetail.class Activity. Main.this is the Context from
 which this Event is triggered.

 The Activity to Invoke looks live this and should  bring up a Toast
 when created:

 public class AlarmNotificationDetail extends Activity
 {

         /*
          * (non-Javadoc)
          *
          * @see android.app.Activity#onCreate(android.os.Bundle)
          */
         @Override
         protected void onCreate(Bundle savedInstanceState)
         {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.alarmnotificationdetail);

                 Toast.makeText(this, this is a toast, Toast.LENGTH_LONG);
         }

 }

 Anyone can help me out ?

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

2009-06-22 Thread Josh Guilfoyle

You definitely don't want to access the list directly from the
adapter.  Instead for your design what you'd want to do is remove the
outer linear layout if you can and just have two separate XML files
with only 1 view each (text_row or icon_row).  Then in your adapter
override the methods getItemViewType and getViewTypeCount.  These
methods are provided for you to have two or more different types of
layouts for certain rows based.


On Jun 22, 10:16 am, az9702 az9...@gmail.com wrote:
 Hi,

 I have a ListView with two types of custom views.  It inflates
 icon_row view if  a drawable exists or a text_row if not.

 I came up w/ custom views for icon_row  text_row  include them in
 their XML like so :

 //text_row.xml
 LinearLayout 
     com.test.android.ALS.text_row
             ...
             app:text1=...
             app:textSize1=..
     
 /LinearLayout

 //icon_row.xml
 LinearLayout ...
     com.test.android.ALS.icon_row
         ...
         app:imgSrc=...
      
 /LinearLayout

 I have another main.xml that defines the ListView which is set to an
 adpater.

 In my adatper's getView (in separate class file), I will inflate:

     if(convertView == null) {
          if(no drawable) {
              convertView = mInflater.inflate(R.layout.text_row. null);
         }     else {
               convertView = mInflater.inflate(R.layout.icon_row,
 null);
         }
     }

 Both of icon_row, text_row have a root LinearLayout that seem to be
 redundant. The row layouts can be directly attached ListView.  This
 may be a case for merge.

 To use merge, I need a ViewGroup in inflate  that ViewGroup should be
 my ListView.

 My question is how to obtain a reference to the ListView w/o making
 the adapter as an inner class to the main activity.

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



[android-developers] Re: How to see the content of database on G1

2009-06-22 Thread Josh Guilfoyle

Since your application can read the database, you could build some
debug code and deploy it which lets you copy the file out to the
sdcard.  Then you could read it from that location or even use adb
pull to extract it.

On Jun 22, 9:55 am, n179911 n179...@gmail.com wrote:
 Hi,

 i hook up my G1 to my laptop and open a 'adb shell'. But as I execute
 the command 'cd /data/data', I get an error 'opendir failed,
 Permission denied'

 $ adb devices
 List of devices attached
 HT853GZ21556    device

 $ adb shell
 $ cd /data/data
 $ ls
 opendir failed, Permission denied

 I tried to cd the the right directory and then do 'sqlite3 mydatabase.db'

 How can i dump the content of the database on a real device?

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



[android-developers] Re: Push Notification Techniques: Discuss

2009-01-08 Thread Josh Guilfoyle

I thought I'd chime in with some recent work I have done on this
topic.  The Google services on Android use Gtalk to implement push
notifications and they do so using a persistent TCP connection as is
the case with most other data-based push systems (like Microsoft's
Exchange ActiveSync, for instance).  While there is additional
overhead, there are many ways to mitigate the burden on the CPU and
the radio.  I have constructed a simple demonstration of some of the
techniques I have learned from studying Gtalk's connection which can
be found here: 
http://devtcg.blogspot.com/2009/01/push-services-implementing-persistent.html.

The important thing to note is that using an AlarmManager allows the
CPU to sleep at relatively long intervals (it depends on your server
implementation, but with IMAP you can get away with almost 30 minute
intervals) while the radio remains awake but idle.  I have been
running my demonstration on my G1 handset for several weeks now and
have been unable to detect any significant change in battery
performance.

One small point to make is that often push services drag on the
battery for other less obvious reasons.  For instance, if your e-mail
arrives instantly, you are more often going to turn on the screen,
then open the e-mail app and spend time reading your new messages.
While I have no concrete estimation of battery drain, I think it can
be reasoned that 30-60 seconds of screen activity uses more battery
than a small keep alive TCP packet.

On Nov 26 2008, 3:34 pm, Tom Gibara m...@tomgibara.com wrote:
  So, the question is: with an open-but-quiet Internet connection on a
  carrier data network, how much power draw is there from the GSM radio?

 I'm probably beyond the limits of my understanding here, and definitely well
 beyond the limits of my competency :)

 But that won't stop me from choosing to extrapolate from the repeated
 comments by Google engineers to the effect that phones are designed to
 conserve power at any opportunity. On that basis, I anticipate that radio
 will go into a lower power state any opportunity it can; including when a
 quiet network connection is present. This seems entirely plausible given the
 packet based nature of the network.

 Tom.

 2008/11/26 Mark Murphy mmur...@commonsware.com



   And the radio is necessarily always on.

  Yeah, but...

  I was under the impression that, in normal operating mode, the GSM radio
  is in a low-power state. That's why you have talk time versus standby
  time in mobile device battery life specs -- when a call begins, the radio
  stays in a high-power-draw state until the call ends.

  So, the question is: with an open-but-quiet Internet connection on a
  carrier data network, how much power draw is there from the GSM radio?

  There's also the scenario of the device being on WiFi instead of GSM, but
  that's probably not as frequent.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What protocol does android use to sync contacts with gmail?

2008-11-28 Thread Josh Guilfoyle

I would recommend using SyncML, this is what it was designed for.
That said, I don't know what protocol Google is using, but it's
probably something they invented.

On Nov 28, 9:57 am, crontabpy [EMAIL PROTECTED] wrote:
 What's the implemented protocol?

 If I'd like to sync an outside database table with a with a sqlite3
 table, what protocol should I use? Is there any available class for
 this?

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



[android-developers] Can't get taskAffinity to behave as it should

2008-11-27 Thread Josh Guilfoyle

I have recently merged my application into one apk (from two) and need
the ability to treat the activities that previously were isolated in a
different apk as part of separate tasks.  I tried setting
taskAffinity=mypackage:Foo in the activities belonging to the
other task but this appears to have no effect whatsoever.  Is there
something else I need to be doing to make this work correctly?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Service binding pattern and the out-of-memory killer

2008-11-27 Thread Josh Guilfoyle

I have noticed most apps follow the pattern of starting and binding to
their services during an activity's onCreate, and similarly unbinding
during onDestroy.   From my understanding, this means that if the user
enters an activity with a transient service, but then leaves the
activity using the Home key (and not Back), the service will remain
connected even after stopSelf is called to indicate that the service
is no longer busy.

The implication of this is that the process hosting the service will
have an oom_adj of 2, leaving it much less likely to be reaped by the
out-of-memory killer even in the event that the service isn't busy
doing anything.

I tested this against the Music app in particular, and it is subject
to this problem.  Leaving the app with the home key will leave the
process active with oom_adj=2, even without music playing.

I have adjusted my application to bind/unbind during onStart/onStop
which is the only work-around to this that I know of.  In practice,
the performance does not seem to be much different.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can't get taskAffinity to behave as it should

2008-11-27 Thread Josh Guilfoyle

Wait, the problem was actually that on deploying this manifest, I see
the PackageParser complaining that I can't have a : character in
taskAffinity.  The documentation at 
http://code.google.com/android/intro/appmodel.html
recommends that I use a :, however.

On Nov 27, 8:06 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 I have recently merged my application into one apk (from two) and need
 the ability to treat the activities that previously were isolated in a
 different apk as part of separate tasks.  I tried setting
 taskAffinity=mypackage:Foo in the activities belonging to the
 other task but this appears to have no effect whatsoever.  Is there
 something else I need to be doing to make this work correctly?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can't get taskAffinity to behave as it should

2008-11-27 Thread Josh Guilfoyle

Filed an issue: http://code.google.com/p/android/issues/detail?id=1384

On Nov 27, 11:36 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 Wait, the problem was actually that on deploying this manifest, I see
 the PackageParser complaining that I can't have a : character in
 taskAffinity.  The documentation 
 athttp://code.google.com/android/intro/appmodel.html
 recommends that I use a :, however.

 On Nov 27, 8:06 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:

  I have recently merged my application into one apk (from two) and need
  the ability to treat the activities that previously were isolated in a
  different apk as part of separate tasks.  I tried setting
  taskAffinity=mypackage:Foo in the activities belonging to the
  other task but this appears to have no effect whatsoever.  Is there
  something else I need to be doing to make this work correctly?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Testing on Android device - question.

2008-11-22 Thread Josh Guilfoyle

Do you mean to load your own programs onto your phone for testing?
Use the android SDK (the adb tool in particular) to do that.

On Nov 22, 9:49 am, EvgenyV [EMAIL PROTECTED] wrote:
 All,

 If it's possible to downolad the application to G-1 for tests even if
 it still not released and not supported by cell companies?

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



[android-developers] Re: Is it possible delete rows from the top of a ListView (without recreating it)?

2008-11-19 Thread Josh Guilfoyle

You would update your adapter and call notifyDataSetChanged (from the
adapter).  The ListView would perform a full layout and draw, which
does not have as much overhead as you might think.  For instance, it
will only concern itself with the list items currently on screen.

You cannot manipulate the innards of a ListView as directly as you
want, and trust me: you don't want to.  ListView is exceptionally
complex and extremely well optimized.

On Nov 18, 7:37 pm, Ben [EMAIL PROTECTED] wrote:
 All,

 I'm dynamically updating a ListView by adding rows to the bottom, and
 I need a bit of code to delete the top row.  Here's the catch: There
 are already plenty of rows in the list, and I'd like to do this
 WITHOUT redrawing the entire List.  Ideally, as I add each row to the
 bottom, I'd like to delete/pop the very top row.

 Is this possible?  Every example I can find does this by redrawing the
 entire ListView.

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



[android-developers] Re: Network downloads in realworld uses

2008-11-17 Thread Josh Guilfoyle

I suggest that you examine the code for DownloadProvider from the
Android source tree.  It properly handles just about every type of
possible event the phone could encounter.

That said, in my experience EDGE and 3G can switch transparent to the
application, however you will see a somewhat significant throughput
delay during this transition.  Switching to Wi-Fi will always shut
down mobile data connections (EDGE/3G) and so you will see your
connections disrupted immediately and are expected to now retry on the
new network.  Wi-Fi will shut off after so many minutes of the screen
being off, which will then re-enable the mobile data connections and
again your program should reconnect.

One pitfall to watch out for is that the CPU may have fallen asleep on
you in which case only data transmission from the peer you are
connected to will wake it up.  So if your connection fails and you
schedule a timer to retry, you may find that the timer never triggers
until after the user has turned the screen back on.  To avoid this
behaviour, you would either hold a WakeLock (think carefully about
whether you need this, it is very expensive), or use an AlarmManager
which is capable of waking the CPU.

To answer your questions more directly:

1. No, you must handle network failure as if it were a common and
likely occurrence.  Mobile data connections are inherently very
unreliable.
2. Yes, but you should hold a WifiLock for this purpose.  Also, you
would use the ConnectivityManager to determine whether the phone was
on a Wi-Fi network or not.

On Nov 15, 7:12 pm, trisk [EMAIL PROTECTED] wrote:
 I'm currently writing an application that will be downloading
 potentially large files from the net (50-100 mb).  I am currently
 using a URLConnection and things are working great on my emulator.
 However, I'm fairly concerned about how this will work in the real
 world.  I have found very little discussions or documentation on this
 subject.

 What happens when the network connection switches (3g - wifi / wifi - 3g)?  
 Will the download magically switch?  Will it timeout/fail.  If

 the download were on 3g and wifi came on, would it remain on 3g and
 succeed?

 From a big picture level, I'm trying to answer the following
 questions:
 1.  Will I be able to reliably download large files without writing an
 extensive amount of retry / resume functionality?
 2.  Is it possible to give the user the option of enabling downloads
 only on wifi for reliability/battery purposes?  I'm not sure if it
 will auto-drop to 3g/edge if the wifi connection is lost.

 Has anyone dealt with this?  I would really appreciate any advice
 regarding these issues.

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



[android-developers] Re: JNI support in 1.0

2008-09-29 Thread Josh Guilfoyle

I haven't specifically tested with 1.0, but with 0.9r1 it was
certainly possible.  The issue of it being supported, however, is more
difficult.  There is no distribution mechanism for native code,
furthermore the /system image is not writable on normal phones.  So
unless there is a way to load native code from /data (I can't say one
way or another; haven't tried), it's certainly going to be out of
reach for any typical user to install.  Even still, it will require
some moderate sophistication to install apps that use native code, and
they won't be available on the Market which is probably a big
deterrent for most users.

On Sep 29, 12:15 am, wiki [EMAIL PROTECTED] wrote:
 HI,
 does Android supports JNI?
 I see the loadLibrary() function available in the System. but came
 across certain discussion that Native code is not supported in Android
 1.0.
 can somebody clear the picture please?

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



[android-developers] How to write a test case for custom MediaPlayer class

2008-09-27 Thread Josh Guilfoyle

I would like to create an instrumented unit test for my
StreamMediaPlayer class which extends the MediaPlayer to be add
support for arbitrary input streams.  I chose to extend
AndroidTestCase as MediaPlayer has a service component requiring an
Android context.  Everything seems to work correctly except the
MediaPlayer listeners never fire, which prevents the playback from
starting (without OnPreparedListener I can't know when to start audio
output).

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



[android-developers] Re: Audio cache strategies

2008-09-02 Thread Josh Guilfoyle

This is exactly the sort of problems my application (http://
five.googlecode.com) must contend with, and unfortunately I have came
to the conclusion that for 1.0, Android will simply not be able to
support our type of application.

Their current official recommendation is to work around this by
constructing your own local HTTP server to both stream and cache
(tee) the proxied content.  Even ignoring the enormous overhead this
introduces it still won't work.  There are yet more problems lurking
in the MediaPlayer which prevent applications which need information
about the buffering heuristics built into the system.  For instance,
the MediaPlayer.OnBufferingUpdateListener class can supposedly be used
to detect when the buffer is full (playback has begun), when it
becomes empty again (playback chokes), and everywhere in between so
the application using it can provide essential feedback to the user.

I constructed simple tests which clearly demonstrate that
onBufferUpdate is fired with entirely different metrics that I cannot
understand, but clearly do not represent buffer fill percentage.  In
my tests, playback started anywhere from 5% to 25% buffer fill
percentage, though it seemed more like the buffer fill percentage was
total file progress (but not quite).  Likewise, the buffer fill
percentage never declines, so it isn't possible to detect when a song
chokes.

Once open sourced, I will be working to fix the broken MediaPlayer so
hopefully I can target a 1.1 release without waiting on Google to fix
this set of classes.  Would've been really nice to have a heads up
that maybe the MediaPlayer brokenness from back in M5 was not a top
priority and was unlikely to make it into 1.0.

On Sep 1, 3:05 pm, David Given [EMAIL PROTECTED] wrote:
 I'm currently working on a custom audio player app for an online music
 site. It has the following main requirements:

 a) I need to be able to play music without waiting for it to download.

 b) I wish to cache the music locally so that the user's favourite tracks
 don't need to be downloaded again.

 Currently my strategy is to download the files locally and discard the
 oldest ones when I need more space, keeping all the metadata in an
 associated SQLite database; but this approach is rather problematic and
 very brittle due to having to keep the database and the files in sync,
 issues with ensuring that a file isn't removed when something else is
 wanting to use it, etc. Not the least of which is that caching entire
 files means using up rather a lot of disk space --- some of my music
 files can be 15MB+.

 Also, MediaPlayer appears to be very picky as to what it plays from: it
 insists on playing from a file, or at least a file descriptor, and when
 you start playing it measures the length of the file and won't play past
 the end point, which is a bit of a problem if you haven't finished
 writing it yet. At least 0.9 has fixed the issue where getDuration()
 used to calculate the duration of the media based on the physical file
 length.

 Can anyone suggest any alternative approaches to doing this? What I'd
 *really* like to do is to be able to store my entire cache in a single
 huge fixed-size file, optionally on the SD card, and stream fragments
 directly to MediaPlayer; but I don't think that's possible and Java
 would probably be too slow anyway. Alternatively, a block-level cacheing
 HTTP proxy would do almost as well. Does Android have one?

 --
 ┌─── dg@cowlark.com ─http://www.cowlark.com─
 │
 │ All power corrupts, but we need electricity. --- Diana Wynne Jones,
 │ _Archer's Goon_

  signature.asc
  1KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Audio cache strategies

2008-09-02 Thread Josh Guilfoyle

These tests were against 0.9, and I have complained loudly about it
with any Google engineer that would listen.  The outlook looks bleak
to get these fixes in for 1.0.

Also, in my tests, the MediaPlayer buffers poorly.  It seems to take 2
- 5 seconds to even gear up and make a connection for some reason, and
then it seems to buffer more than is necessary in certain
circumstances.  I'd like to load a simple test up on the HTC Vogue and
see what more I can learn about how 0.9 behaves on real hardware.

On Sep 2, 8:44 am, David Given [EMAIL PROTECTED] wrote:
 Josh Guilfoyle wrote:
  This is exactly the sort of problems my application (http://
  five.googlecode.com) must contend with, and unfortunately I have came
  to the conclusion that for 1.0, Android will simply not be able to
  support our type of application.

 Oh, dear.

 [...]

  I constructed simple tests which clearly demonstrate that
  onBufferUpdate is fired with entirely different metrics that I cannot
  understand, but clearly do not represent buffer fill percentage.  In
  my tests, playback started anywhere from 5% to 25% buffer fill
  percentage, though it seemed more like the buffer fill percentage was
  total file progress (but not quite).  Likewise, the buffer fill
  percentage never declines, so it isn't possible to detect when a song
  chokes.

 Is that on m5 or 0.9? I know there are a lot of bugs that have been
 fixed in 0.9 (and still some to go...).

 Also, how well does MediaPlayer work streaming off the real internet? Is
 the buffering effective?

 --
 David Given
 [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ServiceTestCase instrumentation and remote callbacks

2008-09-02 Thread Josh Guilfoyle

I have discovered more information about this issue which seems far
more troubling.  I created a simple test which I thought would
demonstrate this bug but instead the test worked.  So I returned to my
functional code and analyzed the logcat differences only to find the
following after I launch the instrumented tests:

D/AndroidRuntime(  764):
D/AndroidRuntime(  764):  AndroidRuntime START

D/AndroidRuntime(  764): CheckJNI is ON
D/AndroidRuntime(  764): --- registering native functions ---
I/jdwp(  764): received file descriptor 20 from ADB
D/ActivityManager(   49): Uninstalling process org.devtcg.five
D/ActivityManager(   49): Force removing process
ProcessRecord{434f8728 org.devtcg.five/10015} (org.devtcg.five/10015)
W/ActivityManager(   49): Crash of app org.devtcg.five running
instrumentation ComponentInfo{org.devtcg.five.tests/
android.test.InstrumentationTestRunner}
D/ActivityManager(   49): Uninstalling process org.devtcg.five
I/Process (   49): Sending signal. PID: 739 SIG: 9
I/ActivityManager(   49): Start proc org.devtcg.five for added
application org.devtcg.five: pid=770 uid=10015 gids={3003}
D/ActivityManager(   49): Received spurious death notification for
thread [EMAIL PROTECTED]

This is then followed by the tests seemingly running as expected but
without recursive binder transactions (callbacks don't fire).  The
lines about the forced removal and crashed app are not present when
running my simple demonstration code which works otherwise as
expected.

On Aug 26, 11:54 am, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 *bump*

 I'm sure I'm just doing something stupid wrong but I really would love
 to get this working right so I can write good automated tests for my
 project!  Please help if you can...

 On Aug 25, 4:01 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:

  I am trying to add unit tests to a service of mine that utilizes
  remote callbacks (managed by the service with RemoteCallbackList).  I
  know that this service functions properly already, I am just trying to
  formalize with a unit test as I have recently discovered how to make
  instrumentation work.  The service otherwise works fine except that it
  seems that the service callbacks never fire on the observing side.  My
  simple test case looks similar to the following sample:

  -- begin paste --

  public void testMyService() throws RemoteException {
IMyService svc = IMyService.Stub.asInterface(bindService(new
  Intent(this, MyService.class)));

svc.registerObserver(new IMyServiceObserver.Stub() {
  public void onFoo()
  {
Log.d(TAG, Here I am !);
synchronized(MyServiceTest.this) { mDone = true;
  MyServiceTest.this.notify(); }
  }
});

svc.doStuffThatWillEventuallyCallBack();

synchronized(this) {
  while (mDone == false) {
try { wait(); } catch (InterruptException e) {}
  }
}

  }

  -- end paste --

  Here I am is never logged, in this case and the call to adb shell am
  never returns.  I have verified that
  doStuffThatWillEventuallyCallback() does actually return, and the test
  thread enters the synchronized wait loop correctly.  My suspicion is
  that the binder's normal transaction thread loop is somehow not the
  same in the context of an instrumented test, however I have no way to
  validate this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Tool to generate callback listeners from AIDL

2008-08-27 Thread Josh Guilfoyle

I wrote a tool to generate extended RemoteCallbackList classes from an
AIDL interface for use in services that implement listeners.

The tool can be found here:
http://android-random.googlecode.com/svn/trunk/aidl-cblistsub/aidl-cbliststub.pl

With my full post here:
http://devtcg.blogspot.com/2008/08/generate-callback-listener-helpers-from.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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ServiceTestCase instrumentation and remote callbacks

2008-08-26 Thread Josh Guilfoyle

*bump*

I'm sure I'm just doing something stupid wrong but I really would love
to get this working right so I can write good automated tests for my
project!  Please help if you can...

On Aug 25, 4:01 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 I am trying to add unit tests to a service of mine that utilizes
 remote callbacks (managed by the service with RemoteCallbackList).  I
 know that this service functions properly already, I am just trying to
 formalize with a unit test as I have recently discovered how to make
 instrumentation work.  The service otherwise works fine except that it
 seems that the service callbacks never fire on the observing side.  My
 simple test case looks similar to the following sample:

 -- begin paste --

 public void testMyService() throws RemoteException {
   IMyService svc = IMyService.Stub.asInterface(bindService(new
 Intent(this, MyService.class)));

   svc.registerObserver(new IMyServiceObserver.Stub() {
     public void onFoo()
     {
       Log.d(TAG, Here I am !);
       synchronized(MyServiceTest.this) { mDone = true;
 MyServiceTest.this.notify(); }
     }
   });

   svc.doStuffThatWillEventuallyCallBack();

   synchronized(this) {
     while (mDone == false) {
       try { wait(); } catch (InterruptException e) {}
     }
   }

 }

 -- end paste --

 Here I am is never logged, in this case and the call to adb shell am
 never returns.  I have verified that
 doStuffThatWillEventuallyCallback() does actually return, and the test
 thread enters the synchronized wait loop correctly.  My suspicion is
 that the binder's normal transaction thread loop is somehow not the
 same in the context of an instrumented test, however I have no way to
 validate this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Instrumentation failing with classnotfound on android.test.InstrumentationTestRunner

2008-08-25 Thread Josh Guilfoyle

I have made this work correctly and discuss it on my blog here:

http://devtcg.blogspot.com/2008/08/android-instrumentation-example.html

On Aug 23, 1:02 am, Carl H. [EMAIL PROTECTED] wrote:
 Hi Megha,

 I did not notice that no, was looking at the site. I tried to add the
 second androidManifest to my project under the acceptance folder
 which is my test folder. When I try to compile and install the app
 onto the device, I get the following error:

 08-23 07:58:21.129: WARN/PackageParser(54): Unable to read
 AndroidManifest.xml of /data/app/vmdl31345.tmp
 08-23 07:58:21.129: WARN/PackageParser(54):
 java.io.FileNotFoundException: AndroidManifest.xml

 I did follow the instruction on changing the package name etc... I
 have several questions:

 1. Do I need to have theinstrumentationin another app - thus
 installing 2 different apps (signing them correctly I suppose)?
 2. Why do you use the permission run_instrumentation? I thought there
 was no need for it in 0.9?

 More documentation here would be much appreciated indeed!

 Thanks,
 Car aka acsia

 On Aug 22, 11:05 pm, Megha Joshi [EMAIL PROTECTED] wrote:

  Did you notice there is one more AndroidManifest.xml file under the /tests
  folder in ApiDemos...perhaps you are missing that...
  We will add more information to the docs ...

  On Fri, Aug 22, 2008 at 4:50 AM, Carl H. [EMAIL PROTECTED] wrote:

   Note that the cmd line is:

   adb shell am instrument -e class com.novoda.runbuddy.AllTests -w
   com.novoda.runbuddy/android.test.InstrumentationTestRunner

   and not as previously stated:
    adb shell am instrument -e class com.android.samples.AllTests -w
   com.novoda.runbuddy/android.test.InstrumentationTestRunner

   The error is still apparent

   On Aug 22, 12:18 pm, Carl H. [EMAIL PROTECTED] wrote:
Hello,

I am trying to follow the post on ApplicationInstrumentation:
  http://code.google.com/android/samples/ApiDemos/tests/src/com/android
   ..

My setup is very similar then the example. I have the following in my
manifest:
        instrumentationxmlns:android=
  http://schemas.android.com/apk/res/
android
                android:targetPackage=com.novoda.runbuddy
android:name=android.test.InstrumentationTestRunner
                android:label=testInst /

And I start theinstrumentationlike this:
 adb shell am instrument -e class com.android.samples.AllTests -w
com.novoda.runbuddy/android.test.InstrumentationTestRunner

I get the following error message:
INSTRUMENTATION_RESULT: shortMsg=Unable to instantiateinstrumentation
ComponentInfo{com.novoda.runbuddy/
android.test.InstrumentationTestRunner}:
java.lang.ClassNotFoundException:
android.test.InstrumentationTestRunner in loader
[EMAIL PROTECTED]
INSTRUMENTATION_RESULT: longMsg=java.lang.RuntimeException: Unable to
instantiateinstrumentationComponentInfo{com.novoda.runbuddy/
android.test.InstrumentationTestRunner}:
java.lang.ClassNotFoundException:
android.test.InstrumentationTestRunner in loader
[EMAIL PROTECTED]
INSTRUMENTATION_CODE: 0

I tried different combination and can not make the above work. The
documentation is sparse so I am not sure where I am going wrong. Why
would I get a class not found on android.test? There is no need for
permission from what I take with the new SDK.

Any ideas?
./Acsia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ServiceTestCase instrumentation and remote callbacks

2008-08-25 Thread Josh Guilfoyle

I am trying to add unit tests to a service of mine that utilizes
remote callbacks (managed by the service with RemoteCallbackList).  I
know that this service functions properly already, I am just trying to
formalize with a unit test as I have recently discovered how to make
instrumentation work.  The service otherwise works fine except that it
seems that the service callbacks never fire on the observing side.  My
simple test case looks similar to the following sample:

-- begin paste --

public void testMyService() throws RemoteException {
  IMyService svc = IMyService.Stub.asInterface(bindService(new
Intent(this, MyService.class)));

  svc.registerObserver(new IMyServiceObserver.Stub() {
public void onFoo()
{
  Log.d(TAG, Here I am !);
  synchronized(MyServiceTest.this) { mDone = true;
MyServiceTest.this.notify(); }
}
  });

  svc.doStuffThatWillEventuallyCallBack();

  synchronized(this) {
while (mDone == false) {
  try { wait(); } catch (InterruptException e) {}
}
  }
}

-- end paste --

Here I am is never logged, in this case and the call to adb shell am
never returns.  I have verified that
doStuffThatWillEventuallyCallback() does actually return, and the test
thread enters the synchronized wait loop correctly.  My suspicion is
that the binder's normal transaction thread loop is somehow not the
same in the context of an instrumented test, however I have no way to
validate this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Does anyone has the slide bar code used in music player ?

2008-08-23 Thread Josh Guilfoyle

Yes.  It's a new widget in 0.9r1 called a seek bar.  There is an API
demo for it.

On Aug 23, 6:42 pm, april [EMAIL PROTECTED] wrote:
 In music players, there always a sliding bar  with a moving small ball
 to indicate how long is the music and how many minutes music has been
 played?

 Is there any sample code for that?

 Thanks!

 April
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] android.os.StatFs still private?

2008-08-23 Thread Josh Guilfoyle

Was this done intentionally?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding content to a tab view dynamically

2008-08-22 Thread Josh Guilfoyle

This seems a bit goofed up to me.  First off, the FrameLayout holding
your tabs should initially be empty.  the TabHost will manage filling
it in with the contents of the tab you've selected.

addTouchables is very certainly not what you want.  You want to use
addView() but make sure that the view you get with getCurrentView is
what you expect.  Make one tab have a LinearLayout with android:id=@
+id/foobarbaz, then check that getCurrentView hands you a view for
which findViewById(R.id.foobarbaz) succeeds to find your
LinearLayout.  If not, try getCurrentTabView (there is nod
ocumentation, so we're just stabbing in the dark here).  The other
solution is to better abstract the tab content in question and let the
abstractions manage themselves.  You can do this by separating the
content of each tab into its own Activity and properly isolate them
that way.  When you click some button in Activity A, A can manage
adding views to its layout entirely on its own.

On Aug 21, 11:48 pm, Teo [EMAIL PROTECTED] wrote:
 Ok, great, thanks for the help! Here's the relevant code from the XML:

 *LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 TabHost android:id=@+id/tabhost
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 TabWidget android:id=@android:id/tabs
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 /
 FrameLayout android:id=@android:id/tabcontent
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:paddingTop=62px
 Button android:id=@+id/buttontab
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:text=A semi-random button
 /
 /FrameLayout
 /TabHost
 /LinearLayout*

 And here's how i tried to add something:

 *private void addItem(){
 CheckBox c=new CheckBox(this);
 ArrayListView a=new ArrayListView();
 a.add(c);
 tabs.getCurrentView().addTouchables(a);
 }*

 *tabs* is the TabHost object.

 Did i get it wrong with the *addTouchables*? I couldn't find any better
 method. Also, instead of *getCurrentView* i tried *getCurrentTabView* and i
 also tried a lot of casts applied to children and children of children and i
 couldn't get an effect.

 (I know the function above is called when it should be - i confirmed it
 during debug..)

 Thanks,
 Teo



 On Fri, Aug 22, 2008 at 12:06 AM, Josh Guilfoyle [EMAIL PROTECTED] wrote:

  Actually my mistake.  getCurrentTabView might just get the view of the
  tab you have selected (not the contents of the tab).  Try
  getCurrentView.  Post sample code if you can't get it working and I
  will explore further.

  On Aug 21, 2:04 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
   Do you mean to add a new tab or simply dynamically adjust the View
   hierarchy in a particular tab?  If so, getCurrentTabView will work to
   do what you need.  Just modify the view hierarchy found there.  Do
   realize that you are getting the root-level View of the tab, so you
   must search within that using View#findViewById to locate the actual
   view you're looking to modify.

   On Aug 21, 11:28 am, Teo [EMAIL PROTECTED] wrote:

Hi,

i tried debugging quite a bit, but i can't figure it out; is it
possible to add something (buttons, etc.) to a tab? I'm using a
FrameLayout inside a TabWidget inside a TabHost. I tried lots of
things, including adding to TabHost's getCurrentTabView, but i wasn't
lucky.

Any tips?

Thanks,
Teo

 --
 Teo (a.k.a. Teodor Filimon, Teominator)
 Site -www.teodorfilimon.com| Blog -www.teodorfilimon.blogspot.com
 GMT +2 (or PDT +10)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding content to a tab view dynamically

2008-08-21 Thread Josh Guilfoyle

Do you mean to add a new tab or simply dynamically adjust the View
hierarchy in a particular tab?  If so, getCurrentTabView will work to
do what you need.  Just modify the view hierarchy found there.  Do
realize that you are getting the root-level View of the tab, so you
must search within that using View#findViewById to locate the actual
view you're looking to modify.

On Aug 21, 11:28 am, Teo [EMAIL PROTECTED] wrote:
 Hi,

 i tried debugging quite a bit, but i can't figure it out; is it
 possible to add something (buttons, etc.) to a tab? I'm using a
 FrameLayout inside a TabWidget inside a TabHost. I tried lots of
 things, including adding to TabHost's getCurrentTabView, but i wasn't
 lucky.

 Any tips?

 Thanks,
 Teo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding content to a tab view dynamically

2008-08-21 Thread Josh Guilfoyle

Actually my mistake.  getCurrentTabView might just get the view of the
tab you have selected (not the contents of the tab).  Try
getCurrentView.  Post sample code if you can't get it working and I
will explore further.

On Aug 21, 2:04 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 Do you mean to add a new tab or simply dynamically adjust the View
 hierarchy in a particular tab?  If so, getCurrentTabView will work to
 do what you need.  Just modify the view hierarchy found there.  Do
 realize that you are getting the root-level View of the tab, so you
 must search within that using View#findViewById to locate the actual
 view you're looking to modify.

 On Aug 21, 11:28 am, Teo [EMAIL PROTECTED] wrote:

  Hi,

  i tried debugging quite a bit, but i can't figure it out; is it
  possible to add something (buttons, etc.) to a tab? I'm using a
  FrameLayout inside a TabWidget inside a TabHost. I tried lots of
  things, including adding to TabHost's getCurrentTabView, but i wasn't
  lucky.

  Any tips?

  Thanks,
  Teo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: callback function

2008-07-17 Thread Josh Guilfoyle

You can watch changes to these views, and respond meaningfully as a
result.  For example, you can watch an EditText by using
addTextChangedListener.

On Jul 14, 7:10 am, Billsen [EMAIL PROTECTED] wrote:
 Hi,

 Are there any callback functions for EditText and Spinner Veiws. I
 need to valid data as entered into EditText before submitting it. Also
 I have two Spinners and contents displayed in second Spinner depends
 on data selected in the first Spinner. Any help would be greatly
 appriciated.

 Thanks,
 Senshan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Setting a breakpoint in a service

2008-07-02 Thread Josh Guilfoyle

The problem you are likely experiencing is that the Eclipse plugin
only attaches by default to the process that hosts the activity
configured in the Run dialog.  Android is capable of running services
in their own separate process.  There are two ways around this: (1)
make sure that your manifest file doesn't declare the service process
as remote, or (2) switch to the DDMS perspective in Eclipse and
manually attach to the correct service process.

On Jul 1, 4:46 am, www.netthreads.co.uk
[EMAIL PROTECTED] wrote:
 Hi all,

 I have created a service based on AlarmService_Service.java from the
 SDK samples.

 In my service I want to do some work which will update a
 ContentProvider.

 The problem I am having is that I cannot seem to get a breakpoint
 inside the service to fire. I know it is executing the service as I
 can add log statements and see it pass the point where the breakpoint
 is set. Running in debug mode under Eclipse obviously.

 Is this possible? Can you step through the code for a background
 service?

 Al.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to run an application compiled with gcc

2008-07-02 Thread Josh Guilfoyle

This isn't entirely true.  While Java is the only officially supported
language, a quick Google search has revealed that folks have figured
out how to use the ARM toolchain to build native C applications and
even JNI libraries for use in Java.  Similarly, projects like Jython
demonstrate that it is possible to compile other langauges to the Java
bytecode, or even directly to the Dalvik bytecode, and then in turn
use those languages to develop on Android with the full Android
platform API available.

I fully expect that once source is released, developers will start
pursuing ways to gracefully integrate other languages with the Android
platform.

On Jul 2, 7:29 am, Fräntz Miccoli [EMAIL PROTECTED] wrote:
 It can't be done, for instance it's java only :(

 source :http://code.google.com/android/kb/general.html#c

 On 1 juil, 23:26, atilar [EMAIL PROTECTED] wrote:

  hi, everyone, i want to run an application compiled by gcc in android,
  how can i do it or does it can be done?

  best regard
  atilar
  2008/07/02
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Codec Support in Android

2008-07-02 Thread Josh Guilfoyle

Not currently, and given its proprietary nature, not likely ever.

On Jun 26, 8:42 pm, Rama [EMAIL PROTECTED] wrote:
 Hi
 Does Android support Windows Media Video(i.e WMV format) codec.

 Regards
 Rama
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Why do I get this SQLiteCursor exception ?

2008-07-02 Thread Josh Guilfoyle

While that may be true, this still represents a critical bug in
Android itself, specifically it looks like libsgl is the problem.  You
should submit this bug by using adb bugreport if you still have the
running emulator up, otherwise just paste that log you have in the bug
report and hopefully someone will be able to investigate.

To clarify, there is no condition in which your code can be at fault
for triggering SIGSEGV in the hosting dalvik process.  Generally only
bugs in Dalvik, the supporting JNI libraries, and/or the kernel can
cause this behaviour.

On Jun 29, 1:17 pm, Zach Hobbs [EMAIL PROTECTED] wrote:
 Usually happens when you fail to close a cursor.

 --

 Zach Hobbs
 HelloAndroid.com
 Android OS news, tutorials, downloads

 On Saturday 28 June 2008 06:13:59 Gavin Bong wrote:

  Specifically what causes this to happen ? Thanks.

  DEBUG/dalvikvm(927): Exception Ljava/lang/IllegalStateException; from
  SQLiteCursor.java:403 not caught locally
  INFO/dalvikvm(927): Uncaught exception thrown by finalizer (will be
  discarded):
  INFO/dalvikvm(927): Ljava/lang/IllegalStateException;: Finalizing
  cursor [EMAIL PROTECTED] on reports that
  has not been deactivated or closed
  INFO/dalvikvm(927):     at
  android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:403)
  INFO/dalvikvm(927):     at android.dalvik.NativeStart.run(Native
  Method)
  DEBUG/SurfaceFlinger(513): Surface 2, heap=0x1236e0 destroyed
  DEBUG/SurfaceFlinger(513): Surface 1, heap=0x1236e0 destroyed
  DEBUG/SurfaceFlinger(513): Surface 1, heap=0x1236e0 destroyed
  DEBUG/SurfaceFlinger(513): Surface 0, heap=0x1236e0 destroyed
  DEBUG/SurfaceFlinger(513): Surface 1, heap=0x1236e0 destroyed
  DEBUG/AdContentProvider(927): insert
  DEBUG/AdContentProvider(927): inserted new uricontent://org.mape.ad/ads/1
  DEBUG/AdServerService(927): received Advert for uuid
  c60e02e1-2ae6-707a6b41e445-Advert28  saved as content://org.mape.ad/ads/1
  VERBOSE/org.android.server.service.AdUnitDownloadServiceImpl$2(641):
  Message (what=2) received
  DEBUG/AdUnitDownloadService(641): numOfCallbacks 1
  DEBUG/AdUnitDownloadService(641): Broadcast advert
  c60e02e1-2ae6-707a6b41e445-Advert32
  INFO/DEBUG(490): *** *** *** *** *** *** *** *** *** *** *** *** ***
  *** *** ***
  INFO/DEBUG(490): pid: 927, tid: 1164   org.android.client 
  INFO/DEBUG(490): signal 11 (SIGSEGV), fault addr 03e4
  INFO/DEBUG(490):  r0 001d  r1 400898c8  r2 0140  r3 
  INFO/DEBUG(490):  r4 00f9  r5 ffeb  r6 0012ae18  r7 0012ae18
  INFO/DEBUG(490):  r8   r9 0140  10   fp 400898c8
  INFO/DEBUG(490):  ip 000e5c20  sp 42ccc644  lr ac035304  pc ac034ff0
  cpsr 2010
  INFO/DEBUG(490):          #01  pc ac034ff0  /system/lib/libsgl.so
  INFO/DEBUG(490):          #01  lr ac035304  /system/lib/libsgl.so
  INFO/DEBUG(490):          #02  pc   unknown
  INFO/DEBUG(490): stack:
  INFO/DEBUG(490):     42ccc600  03c0
  INFO/DEBUG(490):     42ccc604  afe0e5d8  /system/lib/libc.so
  INFO/DEBUG(490):     42ccc608  03c0
  INFO/DEBUG(490):     42ccc60c  0140
  INFO/DEBUG(490):     42ccc610  afe3c34c
  INFO/DEBUG(490):     42ccc614  afe0e448  /system/lib/libc.so
  INFO/DEBUG(490):     42ccc618  0012ae18  [heap]
  INFO/DEBUG(490):     42ccc61c  c000
  INFO/DEBUG(490):     42ccc620  01b4
  INFO/DEBUG(490):     42ccc624  afe0b1df  /system/lib/libc.so
  INFO/DEBUG(490):     42ccc628  00179718  [heap]
  INFO/DEBUG(490):     42ccc62c  0140
  INFO/DEBUG(490):     42ccc630  42a42f2c
  INFO/DEBUG(490):     42ccc634  
  INFO/DEBUG(490):     42ccc638  df002777
  INFO/DEBUG(490):     42ccc63c  e3a070ad
  INFO/DEBUG(490):     42ccc640  0003
  INFO/DEBUG(490): == 42ccc644  400898c8
  INFO/DEBUG(490):     42ccc648  
  INFO/DEBUG(490):     42ccc64c  0012ae18  [heap]
  INFO/DEBUG(490):     42ccc650  ac034fc4  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc654  0140
  INFO/DEBUG(490):     42ccc658  42a42f2c
  INFO/DEBUG(490):     42ccc65c  
  INFO/DEBUG(490):     42ccc660  0577
  INFO/DEBUG(490):     42ccc664  ac035304  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc668  
  INFO/DEBUG(490):     42ccc66c  ac1067ec  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc670  0064
  INFO/DEBUG(490):     42ccc674  000e5c20  [heap]
  INFO/DEBUG(490):     42ccc678  
  INFO/DEBUG(490):     42ccc67c  42ccc6a8
  INFO/DEBUG(490):     42ccc680  03ec
  INFO/DEBUG(490):     42ccc684  ac034764  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc688  ac034878  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc68c  ac034824  /system/lib/libsgl.so
  INFO/DEBUG(490):     42ccc690  00150238  [heap]
  INFO/DEBUG(490):     42ccc694  e0ffd8ff
  INFO/DEBUG(490):     42ccc698  464a1000
  INFO/DEBUG(490):     42ccc69c  01004649
  INFO/DEBUG(490):     42ccc6a0  0101
  INFO/DEBUG(490):     42ccc6a4  0100
  INFO/DEBUG(490):     42ccc6a8  
  INFO/DEBUG(490):     42ccc6ac  
  

[android-developers] Re: how to add progress bar with media Player??????

2008-07-01 Thread Josh Guilfoyle

Simply using the activities message loop to schedule an update message
every second.  The resolution of this timer will be sufficient to
report seconds of play to the user, however if you feel that it is
necessary to calibrate further you can invoke
MediaPlayer#getCurrentPosition inside your message handler.

On Jul 1, 5:05 am, bins [EMAIL PROTECTED] wrote:
 hi
 using the onBufferingUpdate(MediaPlayer arg0, int percent) i am able
 to show the buffering like the youtube player but how can a show the
 playing updater in my own style
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Check within App whether running on Android platform?

2008-06-27 Thread Josh Guilfoyle

Under what condition would you not be running an Android app on
Dalvik?  The emulator doesn't use your native JVM, it uses Dalvik as
well.

On Jun 24, 11:52 am, kobica [EMAIL PROTECTED] wrote:
 On Jun 24, 11:49 am, Josh Guilfoyle [EMAIL PROTECTED] wrote:

  You mean check if it's running on a real device or on the emulator?
  One approach currently might be to check if the IMEI number is 0,
  though I suspect they will fix that in the future.  Perhaps there is
  another system property which could also be used as a heuristic?

 How about checking if we are running on Delvik VM or Sun Java VM ?
 Is there anyway to query a property that distinguish one VM from the
 other?

 Thanks,
 Kobi.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SDK Update?

2008-06-27 Thread Josh Guilfoyle

There is no official comment from Google, but after talking to several
sources on the team, it is quite clear that they do not expect a
release until the handsets launch.  The ADC round 1 winners are now
under NDA with Google to get access to private updates which they are
not allowed to discuss or demonstrate publicly.

For more information, read my blog entry:

http://devtcg.blogspot.com/2008/05/detail-of-next-public-sdk.html

On Jun 17, 10:24 pm, maceghost [EMAIL PROTECTED] wrote:
 Anyone from google care to comment on this ?  It seems like r15 is a
 bit buggy, an update would be in order...

 On May 11, 8:16 pm, Biosopher [EMAIL PROTECTED] wrote:

  We need regular updates...especially because this isn't a shipped
  product so Google should be providing updates more rapidly.  Google's
  stated approach to dev rapid prototyping so they should be putting out
  2 new SDKs for each AppleSDK.

  That said, I'm glad they didn't put out one during the last month of
  the Round One Challenge. A new release might have broken one of the
  many work arounds I'd created for the many issues I addressed for
  submitting for Round 1.

  Now though, I hope many of those bugs have been squashed in the past 2
  months.  SO!   Please give us the newSDKas I'm sure I'm no
  different from other developers...holding off dev until the new
  release comes 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to change image on focus and unfocus

2008-06-24 Thread Josh Guilfoyle

Use a selector drawable as such:

res/drawable/foo.xml:
?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item
android:drawable=@drawable/foo_focused
android:state_focused=true /
item
android:drawable=@drawable/foo_not_focused /
/selector

Then simply use the foo drawable as your image or widget background.


On Jun 23, 1:47 am, Raj [EMAIL PROTECTED] wrote:
 How to chanage the image on focus and unfocus
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Download files onto SD Card

2008-06-18 Thread Josh Guilfoyle

If you're interested in specifics on how to store to the SD card, it
is not unlike storing files to a desktop machine with J2SE.  The path
(and other useful information) can be found by using the
android.os.Environment class.

On Jun 18, 9:06 am, Mark Murphy [EMAIL PROTECTED] wrote:
  No its not from the browser.

  I am getting the link of a file from the server and would like to
  download that onto the emulator. Is it possible!!

 There are APIs for making HTTP requests in Android. My personal favorite
 is the Apache Jakarta Commons HttpClient (org.apache.http.client), but you
 are welcome to use others.

 Full documentation on that API is at the HttpClient Web site:

 http://hc.apache.org/httpclient-3.x/

 If this isn't what you needed to know, write back with more specifics!

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ -- Available Now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TabHost remove Tab

2008-06-18 Thread Josh Guilfoyle

You can't currently.  I don't believe this is an inherent deficiency
in the design of TabHost, but rather that you ought not construct a UI
that behaves this way.  You are presuming to reveal a tab to the user
and then hide it through some event.  Will this be extremely clear to
your user why they have lost functionality?  Perhaps disabling tabs
makes more sense for your UI, or designing separate activities
entirely.

On Jun 15, 9:04 pm, Ahmy [EMAIL PROTECTED] wrote:
 Hello all

 I'm successfully create a tab using TabHost and TabHost.TabSpec.
 i found an addTab method but not removeTab.
 there is also clearAllTabs(boolean).  but that will remove all the
 tab;
 is there any way to remove tab by its tag name ?

 oh and i created the tab programatically or by code.

 thanx b4,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Access to Call Audio?

2008-06-18 Thread Josh Guilfoyle

Unlikely, as this is a contentious topic.  For example, in some
countries it is illegal to record voice conversations without the
other parties consent and knowledge, and in many others it is simply
dubious behaviour.

Also, the hardware may (and probably does) simply process the signal
and output it to the speaker, bypassing the software stack entirely.

On Jun 13, 1:18 pm, Shawn McMurdo [EMAIL PROTECTED] wrote:
 Will the 1.0 release provide application access to the call audio stream?
 Thanks.
 Shawn
  --==--==--
 Shawn McMurdo
 See my Low Vision Guide athttp://lowvisionguide.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GSolitaire is released

2008-06-12 Thread Josh Guilfoyle

You should translate this to a generalized solitaire engine and then
program Klondike and other games as components utilizing that engine.
In other words, I'd like to see Free Cell as well :)

On Jun 12, 10:14 am, Neo [EMAIL PROTECTED] wrote:
 yes, i definitely should do that.

 a friend suggested me not to move selected card to the bottom.
 Instead, flashing it might be good. I am thinking to how to implement
 that.

 anyway, thank you for the idea!

 On Jun 11, 3:04 am, eric [EMAIL PROTECTED] wrote:

  ah, thanks, got it.

  Maybe you need to include this instruction with the game.since it
  is a little different from the traditional solitaire on PC.

  Eric

  On Jun 11, 3:19 am, Neo [EMAIL PROTECTED] wrote:

   oh, it is a little different from javasol because I feel it is
   difficult to drag card on phone, so you just need to select card (then
   the card will move to the bottom) and click on the target card (then
   the selected card will be moved from bottom to the target).

   On Jun 10, 3:09 am, eric [EMAIL PROTECTED] wrote:

Hi,

Are you sure it works?

I installed it in the emulator (android-sdk_m5-rc15_windows) using
$adb install your_application.apk

   GSolitaireruns in the emulator but I have trouble playing it
Any card I click goes to the bottom middle of the screen and I can't
drag the card elsewhere.unlike Javasol which runs
normally

Maybe it needs fixing? or it is my emulator's fault?

Cheers
Eric

On Jun 10, 9:32 am, Neo [EMAIL PROTECTED] wrote:

 Here is it:

http://gsolitaire.cvs.sourceforge.net/*checkout*/gsolitaire/gsolitair...

 But I didn't try to install it with this 
 instruction:http://code.google.com/android/intro/installing.html#building,
  and the
 downloaded file is changed to a zip file, so I recommend you download
 the source code via CVS, then run the application.

 On Jun 9, 2:39 am, eric [EMAIL PROTECTED] wrote:

  mm, didn't see any installable files hosted on SourceForge.

  On Jun 9, 3:01 am, Neo [EMAIL PROTECTED] wrote:

  https://sourceforge.net/project/screenshots.php?group_id=229607ssid=...

  GSolitaire, a solitaire game on gPhone Android platform, is finally
   released.

   Basically this game is changed from Javasol (http://
   javasol.sourceforge.net/); I just changed the UI part into Android
   View, the whole program logic didn't change.

   To try this game, please install Android SDK 
   (http://code.google.com/
   android/intro/installing.html) and Eclipse (if you want to run 
   from
   source code).

   It now looks very ugly. :) So, my next step is to make it pretty.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: When will the next version of SDK be published

2008-05-19 Thread Josh Guilfoyle

I am also becoming anxious.  I had hoped for a release shortly after
the Apr 14th deadline, but now here we are well into the second round
of the challenge and there is no update.  Are we to assume that it
won't come until after the challenge is entirely over?

For those that are counting, it has been more than 3 months since the
last significant release, longer than the gap between M3 and M5.  In
fact, in the last 6 months, we have only seen 2 major releases.  I am
not filled with confidence by this unpredictable behaviour and
complete lack of official statement on schedule or road plan.

Let's not forget that the target for the official launch of the
platform is no more than 7 months away and we have seen precious few
details about the long term strategy for the SDK, platform in general,
or the launch of handsets.


On Apr 28, 1:25 pm, Adriano Crestani [EMAIL PROTECTED]
wrote:
 Soon? 1 week? 1 month? 6 months?

 On Apr 23, 12:13 am, Kosmaj [EMAIL PROTECTED] wrote:

  No idea but I hope very soon.

  IMO, it's not worth wasting any more time with this version.

  On Apr 23, 4:05 am, Jim T [EMAIL PROTECTED] wrote:

   I assume that Google has been holding this release in the pipeline to
   provide a non-moving target in the weeks leading up to the challenge.

   However, there are a number of bugs in the platform (Location Manager,
   XML Processing, Notification Manager, etc.).  I would like to respin
   my application with thenextversion of the platform.

   Any idea as to when we might see a version newer that M5-RC15?

   - Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: When will the next version of SDK be published

2008-05-19 Thread Josh Guilfoyle

I just saw this:

http://www.helloandroid.com/node/572

I will try to confirm this to be true when I'm at Google I/O next
week.  If true, I will officially pause development of my Android
project.

On May 19, 12:24 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
 I am also becoming anxious.  I had hoped for a release shortly after
 the Apr 14th deadline, but now here we are well into the second round
 of the challenge and there is no update.  Are we to assume that it
 won't come until after the challenge is entirely over?

 For those that are counting, it has been more than 3 months since the
 last significant release, longer than the gap between M3 and M5.  In
 fact, in the last 6 months, we have only seen 2 major releases.  I am
 not filled with confidence by this unpredictable behaviour and
 complete lack of official statement on schedule or road plan.

 Let's not forget that the target for the official launch of the
 platform is no more than 7 months away and we have seen precious few
 details about the long term strategy for the SDK, platform in general,
 or the launch of handsets.

 On Apr 28, 1:25 pm, Adriano Crestani [EMAIL PROTECTED]
 wrote:

  Soon? 1 week? 1 month? 6 months?

  On Apr 23, 12:13 am, Kosmaj [EMAIL PROTECTED] wrote:

   No idea but I hope very soon.

   IMO, it's not worth wasting any more time with this version.

   On Apr 23, 4:05 am, Jim T [EMAIL PROTECTED] wrote:

I assume that Google has been holding this release in the pipeline to
provide a non-moving target in the weeks leading up to the challenge.

However, there are a number of bugs in the platform (Location Manager,
XML Processing, Notification Manager, etc.).  I would like to respin
my application with thenextversion of the platform.

Any idea as to when we might see a version newer that M5-RC15?

- Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: When will the next version of SDK be published

2008-05-19 Thread Josh Guilfoyle

I think you missed a subtext in the referenced post.  According to
Zach's source, the public release will not be coming for several
months, effectively barring the ADC losers from even creating Android
software that is on schedule to launch with a real handset!

On May 19, 3:16 pm, Shane Isbell [EMAIL PROTECTED] wrote:
 As a Round 2 participant, we'll be providing you with the most up-to-date
 Android SDK so that you can take advantage of the latest tools  platform
 capabilities that will be shipping in devices later this year.

 I privately addressed concerns to Dan M. that Google is raising the next
 group of software vendors, rather than focusing on the general developer
 community; and I have also posted this comment publicly, which sums up my
 thoughts pretty well:

 http://androidguys.com/2008/05/14/speak-up-how-would-you-change-the-a...

 Shane

 On Mon, May 19, 2008 at 2:41 PM, Shane Isbell [EMAIL PROTECTED]
 wrote:

  I'm growing more skeptical about Android's openness with each passing day.
  Now the top 50 get advanced previews of the new SDK features.

  Shane

  On Mon, May 19, 2008 at 2:04 PM, Josh Guilfoyle [EMAIL PROTECTED] wrote:

  I just saw this:

 http://www.helloandroid.com/node/572

  I will try to confirm this to be true when I'm at Google I/O next
  week.  If true, I will officially pause development of my Android
  project.

  On May 19, 12:24 pm, Josh Guilfoyle [EMAIL PROTECTED] wrote:
   I am also becoming anxious.  I had hoped for a release shortly after
   the Apr 14th deadline, but now here we are well into the second round
   of the challenge and there is no update.  Are we to assume that it
   won't come until after the challenge is entirely over?

   For those that are counting, it has been more than 3 months since the
   last significant release, longer than the gap between M3 and M5.  In
   fact, in the last 6 months, we have only seen 2 major releases.  I am
   not filled with confidence by this unpredictable behaviour and
   complete lack of official statement on schedule or road plan.

   Let's not forget that the target for the official launch of the
   platform is no more than 7 months away and we have seen precious few
   details about the long term strategy for the SDK, platform in general,
   or the launch of handsets.

   On Apr 28, 1:25 pm, Adriano Crestani [EMAIL PROTECTED]
   wrote:

Soon? 1 week? 1 month? 6 months?

On Apr 23, 12:13 am, Kosmaj [EMAIL PROTECTED] wrote:

 No idea but I hope very soon.

 IMO, it's not worth wasting any more time with this version.

 On Apr 23, 4:05 am, Jim T [EMAIL PROTECTED] wrote:

  I assume that Google has been holding this release in the pipeline
  to
  provide a non-moving target in the weeks leading up to the
  challenge.

  However, there are a number of bugs in the platform (Location
  Manager,
  XML Processing, Notification Manager, etc.).  I would like to
  respin
  my application with thenextversion of the platform.

  Any idea as to when we might see a version newer that M5-RC15?

  - Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 'emulator-tcp-5555': Local file doesn't exist with Eclipse

2008-05-07 Thread Josh Guilfoyle

This generally happens when the apk file was not built for whatever
reason.  One thing to try is to clean and rebuild the project in
Eclipse by going to Project - Clean.  If that still doesn't work,
carefully examine the console/log to see if there are any Dalvik
compilation failures or other problems.

On May 7, 8:08 am, patrick [EMAIL PROTECTED] wrote:
 hi,

 I just recently experienced a very strange bug. I develop on android
 for 2 month now and I never had this problem before.

 I'm not able to upload any apks to the emulator anymore, eclipse
 console says:
 [2008-05-07 17:03:33 - android] Android Launch!
 [2008-05-07 17:03:33 - android] adb is running normally.
 [2008-05-07 17:03:33 - android] Launching: foo.bar.
 [2008-05-07 17:03:33 - android] Automatic Target Mode: reuse existing
 emulator.
 [2008-05-07 17:03:33 - android] Pushing android.apk to /data/app on
 device 'emulator-tcp-'
 [2008-05-07 17:03:33 - android] Failed to install android.apk on
 'emulator-tcp-': Local file doesn't exist.

 altough when I enter
 adb devices
 in the shell it lists:

 List of devices attached
 1       emulator-tcp-       device  0

 I'm also able to login via adb shell...

 It's really persistent, I deleted the local image of android, no
 change.

 Did you experience a similar problem yet?

 Thanks,
 Patrick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Story about interesting Android apps

2008-05-07 Thread Josh Guilfoyle

My app can be found here: http://five.googlecode.com.  I'd be happy to
describe it further if you're interested...

On May 6, 11:12 am, Vasanth Sridharan [EMAIL PROTECTED]
wrote:
 Hello,
 My name is Vas and I am a reporter for Silicon Alley Insider 
 (www.alleyinsider.com), a tech news site based out of NYC. I am trying to put
 together a story about interesting apps being developed for Android, and I
 was hoping that if you're a developer, you would be willing to pitch me your
 app, so I could write about it. I'm working on the story for the next week,
 so any pitches would be greatly appreciated.

 Thanks,
 Vas

 --
 Vasanth Sridharan
 Reporter
 Silicon Alley Insider
 C: (408) 455-2254http://www.alleyinsider.comhttp://www.vasanthsridharan.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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Does KXML2 api be usable in andorid

2008-04-17 Thread Josh Guilfoyle

I tried this, and it doesn't seem to be working.  I added
kxml2-2.2.2.jar to my build path in my Eclipse project and deployed my
application.  It is still using the kxml2 packages provided by
Android, which throw an exception if I try to use WbxmlSerializer.
What can I do?

On Mar 22, 10:21 am, Raja Nagendra Kumar [EMAIL PROTECTED]
wrote:
 Hi,

 Android rocks.. Just compile the andorid code with kxml api jar in
 javac path.. every thing rocks..

 kxml2 is 100% works with Andorid :)

 Regards,
 Raja Nagendra Kumar,
 C.T.Owww.tejasoft.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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Cross-fading?

2008-04-12 Thread Josh Guilfoyle

Does the audio subsystem support cross-fading, or at least offer
sufficient features to implement it gracefully?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing the 9 patch when selected?

2008-04-01 Thread Josh Guilfoyle

You're looking for a selector, I think.  A specialized demonstration
of this idea can be found at:

http://devtcg.blogspot.com/2008/03/advanced-tab-activity-demo.html

On Apr 1, 3:25 pm, Nixarn [EMAIL PROTECTED] wrote:
 I can't findout how exactly I change how a button using a 9 patch png
 looks when the button is selected? Surly there must be an attribute
 for it? Is there a list of all attributes somewhere?

 Thanks!

 Niklas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: TabActivity example?

2008-03-24 Thread Josh Guilfoyle

I have created another, more sophisticated example which does not
hardcode the layout:

http://devtcg.blogspot.com/2008/03/advanced-tab-activity-demo.html

On Mar 13, 11:30 am, Muthu Ramadoss [EMAIL PROTECTED] wrote:
 http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/

 On Mar 13, 1:57 pm, Ender [EMAIL PROTECTED] wrote:

  Hi!

  I was wondering if there is somebody who has already done something
  with aTabActivityand/or could provide a short example of how to add
  activities to aTabActivityand connect them to tabs?

  Regards,
  Ender
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to see android resources?

2008-03-24 Thread Josh Guilfoyle

I had reverse engineered the binary format and have produced a much
more thorough package than Mark's.  I simply used my tool to replace
every XML file found in all the system APKs on the emulator.  Take a
look at:

http://devtcg.blogspot.com/2008/03/tool-to-read-android-binary-xml-files.html

On Mar 22, 4:43 pm, vl [EMAIL PROTECTED] wrote:
 Mark,

 Thanks you very much for the help. It was the answer I was looking
 for.

 May be you can help me with these resource files a little bit more. I
 do not recall reading about the attribute style in resource
 definitions. I checked the index of Android help and do not see an
 entry style.

 Thanks,
 Viktor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---