Re: [android-developers] How are credentials stored in the OS framework?

2010-11-10 Thread Connick
Just curious as to the underlying storage mechanism for the data itself.
Dealing with rooting and access via API's is separate concern for IT.

Cheers,
Stace


On Wed, Nov 10, 2010 at 9:11 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

  That's a privileged API, and can't be called by an arbitrary
 application.
  Heard of rooting? :)
  How do you root somebody else's phone?

 It does not matter. Read thread former's question first.

 Also, if one will be willing to steal some people passwords it can be done
 with some efforts and for some pool of users being potential victim. That's
 the point here. And if you rooted your device, you can be a victim too,
 no matter how clever you think you are. And (far too) many people rooted
 their
 phones because it's h4x0r or they simply found a tool for that, and
 not because
 they really neded to. Majority got not much idea what rooting really
 means.

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


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

[android-developers] How are credentials stored in the OS framework?

2010-11-09 Thread Connick
Fielding questions from our IT dept around security and I didn't know this
one off hand. Can anyone provide insight as to how credentials are stored in
Android OS? (hashed, encrypted etc)

Thanks,
Stace

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

2010-10-18 Thread Connick
Hi folks,

I'm downsampling an image via BitmapFactory.decode then base64 encoding the
bytes to ship to the server. (long story on the latter part of that formula)
It seems this process nukes all Exif data in the image data. Am I
approaching this the wrong way or is this a fact of life?

Thanks,
Stace

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

2010-10-18 Thread Connick
Tried just grabbing the bytes of the file, encoding and sending to server.
Sure enough exif data is intact. I'm guessing I'll need to downsample the
original image, write back out to a file, re-add exif data then grab the
file bytes, encode and ship off to the server.
Ugh ...If there's a better option, I'm all ears.

Thanks,
Stace


On Tue, Oct 19, 2010 at 12:01 AM, Connick oconn...@gmail.com wrote:

 Hi folks,

 I'm downsampling an image via BitmapFactory.decode then base64 encoding the
 bytes to ship to the server. (long story on the latter part of that formula)
 It seems this process nukes all Exif data in the image data. Am I
 approaching this the wrong way or is this a fact of life?

 Thanks,
 Stace


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

2010-10-13 Thread Connick
Hi folks,

I've released an update to our app in the market but users are receiving an
extra dialog warning stating that their previous version will be replaced.
The upgrade happens successfully and data is retained but I'm at a loss as
to why this dialog is coming up.

Thanks!
Stace

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

2010-10-13 Thread Connick
My bad, don't know how I missed that before. Thanks.


On Wed, Oct 13, 2010 at 3:06 PM, TreKing treking...@gmail.com wrote:

 On Wed, Oct 13, 2010 at 12:43 PM, Connick oconn...@gmail.com wrote:

 I'm at a loss as to why this dialog is coming up.


 That's how it works ...


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

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

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

Re: [android-developers] Re: Synchronization period

2010-09-29 Thread Connick
I don't believe you can rely on a sync request to be executed on
immediately. It will be added to the queue of accounts to be synchronized
which means it may take a number of seconds before action is taken. Also, be
sure that sync is not turned off under Accounts  sync.

Cheers,
Stacy


On Wed, Sep 29, 2010 at 8:10 AM, Roman Mazur mazur.ro...@gmail.com wrote:

 Tanks for explanations.

 I have one more strange thing with synchronization.
 Calling ContentResolver.requestSync does nothing unfortunately. But I
 expect the synchronization to start.
 Dose anyone know a reason for such a behavior?

 On 27 September 2010 16:09, Roman Mazur mazur.ro...@gmail.com wrote:




 -- Forwarded message --
 From: Jens dunkingbikk...@gmail.com
 Date: Sep 26, 11:50 pm
 Subject: Synchronization period
 To: Android Developers


 If you are using 2.2 / api level 8 you could use

 http://developer.android.com/reference/android/content/ContentResolve...)

 For 2.1 you're going to have to use the AlarmManager to schedule your
 synchronizations.

 On 24 Sep, 13:50, Roman Mazur mazur.ro...@gmail.com wrote:



  What is the method to define a sync period for some account?
  ContentResolver allows to set automatic sync flag only. But what is
  period?
  Have I missed something?
  Or have I to schedule sync requests myself using the AlarmManager?

  Thanks.




 --
 Best regards,
 Roman Mazur

 Tech Lead at Stanfy (http://stanfy.com.ua)
 Skype: roman.mazur.f
 LinkedIn: http://ua.linkedin.com/in/romanmazur
 Twitter: http://twitter.com/roman_mazur

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


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

[android-developers] Confused over activities and creating new tasks

2010-08-31 Thread Connick
Hi folks,

I'm launching a wizard as a series of views. (dialog theme) I need the user
to be able to step back and forth through the series of views. When the
final step is completed I'd like to return the to the original view that
launched this new task. (i.e. close the series of dialogs) The only way I've
gotten this to work is to call finish() on each dialog before starting the
activity of the next step. (that rules out being able to navigate back)

I've tried launching the initial intent with Intent.FLAG_ACTIVITY_NEW_TASK
as well as setting a taskAffinity for the views involved to no avail.

Any insight appreciated,
Stace

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can non-market app be updated from a market app later?

2010-08-26 Thread Connick
If I've got a non-market app installed can I later upgrade with a market
version if they're signed with same cert? (Figuring out pre-release builds
etc)


Thanks!
Stace

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Will user get notified of market update that matches package of a previously installed non-market app?

2010-08-26 Thread Connick
Sorry, follow-up question. Will user get notified of market update of an app
that matches package of a previously installed non-market app?

Cheers,
Stace

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

2010-08-16 Thread Connick
Does it give any specific details? I've only seen this when there was
something wrong with the markings on the outer 1 pixel border.

-Stace


On Mon, Aug 16, 2010 at 8:16 PM, Lorensius W. L. T lor...@londatiga.netwrote:

 Hello All,

 I'm using Eclipse 3.5.2 on win7 with latest sdk update. Every time i
 create ninepatch image and copy it into drawable folders, the project
 becomes error, seems that the file cause error and not supported. Any
 solutions?

 Thanx in advance.

 --
 Kind Regards

 - Lorensius W. L. T -
 - http://www.londatiga.net -

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

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

2010-08-12 Thread Connick
The OS governs the sync process. As for interval, there's periodic sync but
that's only as of 2.2. To work around that I ended up using alarm manager on
2.1 to request a sync at whichever interval.

-Stace

On Wed, Aug 11, 2010 at 5:30 PM, Tom Millett thomas.w.mill...@gmail.comwrote:

 I've read through the SampleSyncAdapter project (http://
 developer.android.com/resources/samples/SampleSyncAdapter/index.html).

 The main entry point for the SampleSyncAdapter appears to be the
 onPerformSync(...) method.  In the documentation page for the sample,
 it mentions that [onPerformSync]...gets called whenever the sync
 manager issues a sync operation for that sync adapter.

 Who is this 'sync manager', and at what intervals will it instruct the
 sync adapter to onPerformSync()?

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

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

[android-developers] Possible to increase size of hit area for a View?

2010-08-10 Thread Connick
Users are finding it difficult to register clicks on text links ...is there
any way I can increase the hit area for a given view?

Thanks,
Stace

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

Re: [android-developers] Re: Possible to increase size of hit area for a View?

2010-08-10 Thread Connick
That'll do it, thanks!


On Tue, Aug 10, 2010 at 11:56 PM, Sarwar Erfan erfanonl...@gmail.comwrote:



 On Aug 11, 7:35 am, Connick oconn...@gmail.com wrote:
  Users are finding it difficult to register clicks on text links ...is
 there
  any way I can increase the hit area for a given view?

 Hi,
 You can consider this:

 http://developer.android.com/reference/android/view/TouchDelegate.html

 Regards
 Sarwar Erfan




 
  Thanks,
  Stace

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


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

[android-developers] How can I measure FPS?

2010-08-03 Thread Connick
Is there a way to measure frames per second? Would be helpful in evaluating
perf tweaks.

Thx!
Stace

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

Re: [android-developers] Re: How can I measure FPS?

2010-08-03 Thread Connick
Thanks! Will give that a shot ...

On Tue, Aug 3, 2010 at 11:46 AM, mrqzzz marcus.ob...@gmail.com wrote:

 Here is an example (in my case, using Canvas) where in the game loop i
 call the doDraw(Canvas canvas) to repeatedly paint the scene:

 private long now;
 private int framesCount=0;
 private int framesCountAvg=0;
 private long framesTimer=0;
 private Paint  fpsPaint=new Paint();

   private void doDraw(Canvas canvas) {
// DO YOUR  STUFF HERE
.
// DRAW FPS:
now=System.currentTimeMillis();
canvas.drawText(framesCountAvg+, 20, 20, fpsPaint);
framesCount++;
if(now-framesTimer1000){
framesTimer=now;
framesCountAvg=framesCount;
framesCount=0;
}
}


 Cheers!
 Marcus.

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


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

[android-developers] HTTPClient hanging on occasion + really bizarre solution

2010-08-01 Thread Connick
I have a service that is loading images from a server. Almost every time the
service runs it gets hung up on what seems to be misfire with the connection
to the server. On closer inspection it looks as though HTTPClient
spontaneously decides to hang as the last successful request from the server
results in a status 200 and I don't see the next request go out. What's
really bizarre is that it unblocks if I turn the device and force landscape
(or vice-versa). If I'm loading, say 30 images, I'll have to turn the device
portrait and landscape 2-3x for all the requests to complete sucessfully.
Definately a wtf moment.

Here's my setup:

HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion( params, HttpVersion.HTTP_1_1 );
HttpProtocolParams.setContentCharset( params,
HTTP.DEFAULT_CONTENT_CHARSET );
HttpProtocolParams.setUseExpectContinue( params, true );

HttpConnectionParams.setConnectionTimeout( params,
Constants.HTTP_CONNECTION_TIMEOUT );
HttpConnectionParams.setSoTimeout( params,
Constants.HTTP_SOCKET_TIMEOUT );
HttpConnectionParams.setStaleCheckingEnabled( params, true );
HttpConnectionParams.setLinger( params, 0 );

SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register( new Scheme( http,
PlainSocketFactory.getSocketFactory(), 80 ) );
schemeRegistry.register( new Scheme( https,
SSLSocketFactory.getSocketFactory(), 443 ) );

ClientConnectionManager connectionManager = new
ThreadSafeClientConnManager( params, schemeRegistry );

HttpRequestInterceptor preemptiveAuth = new
HttpRequestInterceptor()
{
public void process( final HttpRequest request, final
HttpContext context ) throws HttpException, IOException
{
AuthState authState = (AuthState) context.getAttribute(
ClientContext.TARGET_AUTH_STATE );
CredentialsProvider credsProvider =
(CredentialsProvider) context.getAttribute( ClientContext.CREDS_PROVIDER );
HttpHost targetHost = (HttpHost) context.getAttribute(
ExecutionContext.HTTP_TARGET_HOST );

if( authState.getAuthScheme() == null )
{
AuthScope authScope = new AuthScope(
targetHost.getHostName(), targetHost.getPort() );
Credentials creds = credsProvider.getCredentials(
authScope );
if( creds != null )
{
authState.setAuthScheme( new BasicScheme() );
authState.setCredentials( creds );
}
}
}
};
httpClient = new DefaultHttpClient( connectionManager, params );
httpClient.addRequestInterceptor( preemptiveAuth, 0 );

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

2010-08-01 Thread Connick
Forgot to mention, it's hanging on httpClient.execute( request )


On Sun, Aug 1, 2010 at 5:23 PM, Connick oconn...@gmail.com wrote:

 I have a service that is loading images from a server. Almost every time
 the service runs it gets hung up on what seems to be misfire with the
 connection to the server. On closer inspection it looks as though HTTPClient
 spontaneously decides to hang as the last successful request from the server
 results in a status 200 and I don't see the next request go out. What's
 really bizarre is that it unblocks if I turn the device and force landscape
 (or vice-versa). If I'm loading, say 30 images, I'll have to turn the device
 portrait and landscape 2-3x for all the requests to complete sucessfully.
 Definately a wtf moment.

 Here's my setup:

 HttpParams params = new BasicHttpParams();
 HttpProtocolParams.setVersion( params, HttpVersion.HTTP_1_1 );
 HttpProtocolParams.setContentCharset( params,
 HTTP.DEFAULT_CONTENT_CHARSET );
 HttpProtocolParams.setUseExpectContinue( params, true );

 HttpConnectionParams.setConnectionTimeout( params,
 Constants.HTTP_CONNECTION_TIMEOUT );
 HttpConnectionParams.setSoTimeout( params,
 Constants.HTTP_SOCKET_TIMEOUT );
 HttpConnectionParams.setStaleCheckingEnabled( params, true );
 HttpConnectionParams.setLinger( params, 0 );

 SchemeRegistry schemeRegistry = new SchemeRegistry();
 schemeRegistry.register( new Scheme( http,
 PlainSocketFactory.getSocketFactory(), 80 ) );
 schemeRegistry.register( new Scheme( https,
 SSLSocketFactory.getSocketFactory(), 443 ) );

 ClientConnectionManager connectionManager = new
 ThreadSafeClientConnManager( params, schemeRegistry );

 HttpRequestInterceptor preemptiveAuth = new
 HttpRequestInterceptor()
 {
 public void process( final HttpRequest request, final
 HttpContext context ) throws HttpException, IOException
 {
 AuthState authState = (AuthState) context.getAttribute(
 ClientContext.TARGET_AUTH_STATE );
 CredentialsProvider credsProvider =
 (CredentialsProvider) context.getAttribute( ClientContext.CREDS_PROVIDER );
 HttpHost targetHost = (HttpHost) context.getAttribute(
 ExecutionContext.HTTP_TARGET_HOST );

 if( authState.getAuthScheme() == null )
 {
 AuthScope authScope = new AuthScope(
 targetHost.getHostName(), targetHost.getPort() );
 Credentials creds = credsProvider.getCredentials(
 authScope );
 if( creds != null )
 {
 authState.setAuthScheme( new BasicScheme() );
 authState.setCredentials( creds );
 }
 }
 }
 };
 httpClient = new DefaultHttpClient( connectionManager, params
 );
 httpClient.addRequestInterceptor( preemptiveAuth, 0 );




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

2010-08-01 Thread Connick
Turns out there's a 3rd timeout:

ConnManagerParams.setTimeout( params, 2000 );

For whatever reason the connection isn't being established and it was
hanging in limbo. Specifying a timeout on the connection manager at least
allows me to handle the situation. Just FYI in case anyone else runs into
this prob.

-S

On Sun, Aug 1, 2010 at 5:29 PM, Connick oconn...@gmail.com wrote:

 Forgot to mention, it's hanging on httpClient.execute( request )



 On Sun, Aug 1, 2010 at 5:23 PM, Connick oconn...@gmail.com wrote:

 I have a service that is loading images from a server. Almost every time
 the service runs it gets hung up on what seems to be misfire with the
 connection to the server. On closer inspection it looks as though HTTPClient
 spontaneously decides to hang as the last successful request from the server
 results in a status 200 and I don't see the next request go out. What's
 really bizarre is that it unblocks if I turn the device and force landscape
 (or vice-versa). If I'm loading, say 30 images, I'll have to turn the device
 portrait and landscape 2-3x for all the requests to complete sucessfully.
 Definately a wtf moment.

 Here's my setup:

 HttpParams params = new BasicHttpParams();
 HttpProtocolParams.setVersion( params, HttpVersion.HTTP_1_1 );
 HttpProtocolParams.setContentCharset( params,
 HTTP.DEFAULT_CONTENT_CHARSET );
 HttpProtocolParams.setUseExpectContinue( params, true );

 HttpConnectionParams.setConnectionTimeout( params,
 Constants.HTTP_CONNECTION_TIMEOUT );
 HttpConnectionParams.setSoTimeout( params,
 Constants.HTTP_SOCKET_TIMEOUT );
 HttpConnectionParams.setStaleCheckingEnabled( params, true );
 HttpConnectionParams.setLinger( params, 0 );

 SchemeRegistry schemeRegistry = new SchemeRegistry();
 schemeRegistry.register( new Scheme( http,
 PlainSocketFactory.getSocketFactory(), 80 ) );
 schemeRegistry.register( new Scheme( https,
 SSLSocketFactory.getSocketFactory(), 443 ) );

 ClientConnectionManager connectionManager = new
 ThreadSafeClientConnManager( params, schemeRegistry );

 HttpRequestInterceptor preemptiveAuth = new
 HttpRequestInterceptor()
 {
 public void process( final HttpRequest request, final
 HttpContext context ) throws HttpException, IOException
 {
 AuthState authState = (AuthState)
 context.getAttribute( ClientContext.TARGET_AUTH_STATE );
 CredentialsProvider credsProvider =
 (CredentialsProvider) context.getAttribute( ClientContext.CREDS_PROVIDER );
 HttpHost targetHost = (HttpHost) context.getAttribute(
 ExecutionContext.HTTP_TARGET_HOST );

 if( authState.getAuthScheme() == null )
 {
 AuthScope authScope = new AuthScope(
 targetHost.getHostName(), targetHost.getPort() );
 Credentials creds = credsProvider.getCredentials(
 authScope );
 if( creds != null )
 {
 authState.setAuthScheme( new BasicScheme() );
 authState.setCredentials( creds );
 }
 }
 }
 };
 httpClient = new DefaultHttpClient( connectionManager, params
 );
 httpClient.addRequestInterceptor( preemptiveAuth, 0 );





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

Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-31 Thread Connick
For anyone looking to dynamically add a header to a sorted cursor in a list,
Kostya's suggestion worked brilliantly. In getView override check the column
value you're sorting on of the previous cursor position to determine if you
need to use a regular row or a view which contains both a header *and* a row
layout.


On Fri, Jul 30, 2010 at 3:02 PM, Connick oconn...@gmail.com wrote:

 I'm with you on that ...re: header part of hierarchy, that's the direction
 I'm going but I was worried about position mapping ...you're suggestion to
 include the header view with a row item would solve that problem!
 Gracias, will give that a shot.

 Cheers
 S


 On Fri, Jul 30, 2010 at 2:53 PM, Kostya Vasilyev kmans...@gmail.comwrote:

  It does on my phone - Samsung Galaxy S with Android 2.1update1. This is
 the built-in Android email client, set up with an IMAP account.

 I just had an idea.

 It should be much easier to implement the header as part of data item view
 hierarchy. This way the number of items in the list view is exactly the same
 as the number of items in the cursor, and you can avoid extra code dealing
 with counting data items and mapping their positions.

 You'd have two kinds of list item views - one with the header, one
 without. Deciding which one to use is pretty simple - in the adapter's
 getView, compare the item's data with the previous item's. If they differ,
 you need to use the version with the header.

 -- Kostya



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

2010-07-31 Thread Connick
Is there a way to throttle change notifications emanating from a content
provider? Was thinking some sort of timer solution but that could get messy.
e.g. if the last notification isn't made then data on the UI will be
inaccurate.

Thanks,
Stace

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

[android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
Requirement: Display query results in a list with a header view atop each
group. (results grouped from database)
Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
cursor and have each adapter filter on the group field? That a viable
approach?

Cheers,
Stacy

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

Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
Knowing it's possible is enough for me to go on and start digging. :)
Will post back if I figure it out!


On Fri, Jul 30, 2010 at 2:32 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Fri, Jul 30, 2010 at 2:29 PM, Connick oconn...@gmail.com wrote:
  Requirement: Display query results in a list with a header view atop each
  group. (results grouped from database)
  Looking at Mark's MergeAdapter. Wondering if I might be able to use a
 single
  cursor and have each adapter filter on the group field? That a viable
  approach?

 I suspect that would be troublesome, since Cursor objects know their
 position, and you'd need the position to be constantly jumping around.

 You can do headings with a single Cursor -- my sleep-deprived brain
 has a couple of ideas, none I'm in position to flesh out right this
 moment -- but you'd need to take a substantially different approach
 than does the MergeAdapter.

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

 _Android Programming Tutorials_ Version 2.9 Available!

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

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

Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
The grouping itself is no problem ...its tossing in the arbitrary view to
act as a header to each group within that list. From the looks of the client
it doesn't use any type of headers in its list ...but thanks for the
suggestion!


On Fri, Jul 30, 2010 at 2:38 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 Stacy,

 You might want to look at the source for Android's built-in email client.
 It groups messages by date, i.e. today, yesterday, more recent.

 Don't know for sure if its source is available, but I think it is (K9 mail
 is based on it).

 -- Kostya

 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


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

Re: [android-developers] Adding headers to listview for cursor with grouped results

2010-07-30 Thread Connick
I'm with you on that ...re: header part of hierarchy, that's the direction
I'm going but I was worried about position mapping ...you're suggestion to
include the header view with a row item would solve that problem!
Gracias, will give that a shot.

Cheers
S

On Fri, Jul 30, 2010 at 2:53 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  It does on my phone - Samsung Galaxy S with Android 2.1update1. This is
 the built-in Android email client, set up with an IMAP account.

 I just had an idea.

 It should be much easier to implement the header as part of data item view
 hierarchy. This way the number of items in the list view is exactly the same
 as the number of items in the cursor, and you can avoid extra code dealing
 with counting data items and mapping their positions.

 You'd have two kinds of list item views - one with the header, one without.
 Deciding which one to use is pretty simple - in the adapter's getView,
 compare the item's data with the previous item's. If they differ, you need
 to use the version with the header.

 -- Kostya



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

Re: [android-developers] Re: R cannot be resolved

2010-07-21 Thread Connick
I often get those errors when importing projects ...and I have to do an
explicit clean on the project then that error goes away. Don't know if
you're seeing the same behavior (on OS X) but hope that helps.


On Wed, Jul 21, 2010 at 2:00 PM, Kacee komal...@gmail.com wrote:

 Try creating a helloAndroid project in Eclipse and run it. If it
 runs successfully, then there is no problem with yr set up.

 The problem might be only with tutorial apps

 Let us know.

 Cheers,
 Kacee


 On Jul 21, 10:56 pm, Satya Komatineni satya.komatin...@gmail.com
 wrote:
  It is a basic question, but let me ask you anyway, do you have the ADT
  installed in Eclipse?
 
  When you expand the project do you see an R.java in a sub directory
  similar to what is at the following url?
 
  http://www.satyakomatineni.com/akc/filestorage/satya/documentfiles/32...
 
  Perhaps, give your directory structure in that project and probably
  the contents of the R.java file.
 
  Satya Komatinenihttp://www.satyakomatineni.comhttp://www.androidbook.com
 
 
 
  On Tue, Jul 20, 2010 at 6:31 PM, Marc marc.d.pa...@gmail.com wrote:
   Hi.
 
   I'm an Android development newb, and I got a problem with Eclipse. I
   tried a few tutorials, but I can't run the tutorial-apps because it
   pops up with this error: R cannot be resolved .
   I've searched a lot of different fora, where people describes the same
   problem, but I just can't fix it.
   A lot of people recommend unchecking Build automatically, Cleaning
   and rechecking Build automatically, people also suggest that it's a
   line that says import R. that causes the problem, but it feels like
   I've tried everything and I still can't make it work...
 
   I use this SDK :http://developer.android.com/sdk/index.html
   along with 3 different versions of Eclipse, but it's the same error-
   message i get in every version.
 
   NB.: I don't have a .classpath file, nor do I have a .project file.
   Could that cause the problem ?
 
   Help is greatly appreciated.
 
   Thanks.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en- Hide quoted
 text -
 
  - Show quoted text -

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


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

Re: [android-developers] Re: Is there anyone know why Google allow only 4 connections on Android?

2010-07-21 Thread Connick
Imagine having 5 apps each attempting to make 30 connections...


On Wed, Jul 21, 2010 at 8:29 PM, Frank Weiss fewe...@gmail.com wrote:

 You said that more than 4 connections would give better performance.
 How much faster would it be with a 5th connection?

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


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

Re: [android-developers] Re: Permanent socket connection drains battery

2010-07-15 Thread Connick
Possible to leverage Googles cloud messaging instead? You can push intents
down to the device.


On Thu, Jul 15, 2010 at 9:41 AM, Namrata puranik.namr...@gmail.com wrote:

  Do you really need to have a socket open at all times?
 yes, my application is based on push technique for which I always need
 to keep it open

 only keep the socket open while the user is actually using the
 application.
 yup I am doing it. Actually the fuctionality of app includes
 minimization of app and still listening to server push.



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

Re: [android-developers] Re: Speech to text not working behind corporate firewall

2010-07-14 Thread Connick
To replace googles built-in facilities? Leveraging what google has baked
into the OS is very simple to use. If you know how to fire an intent, you're
90% of the way there.

Stace


On Wed, Jul 14, 2010 at 3:18 PM, Maxood maqs...@salsoft.net wrote:

 I have a simple question here: Is it possible to develop a Speech To
 Text app on Android?
 Thank you

 On Jul 6, 4:12 am, greg sep...@eduneer.com wrote:
  Pardon me.  I mixed up the order of the words speech and text.
  When you asked about speechtotext, I thought of texttospeech ...
 perhaps because there is a class named TextToSpeech.
  However, I now realize you were asking about voice input (or voice
  recognition).
  I haven't tried connecting to Google's voice recognition server other
  than through cellular or WIFI connections.
 
  On Jul 5, 3:14 pm, greg sep...@eduneer.com wrote:
 
 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Not sure if this is a bug? RelativeLayout + fill_parent

2010-07-12 Thread Connick
Found a quirk and wondering if I'm missing something. I have a View inside
of a RelativeLayout which has its background color set at runtime. I'm
finding in this case I need to set an explicit height otherwise the view
will not show. i.e. if I set the layout_height=fill_parent, it's not
visible.

RelativeLayout
   android:id=@+id/detail_header
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   android:orientation=vertical
   android:background=@color/detail_task_header_bg

  View
 android:id=@+id/detail_account_color
 android:layout_width=5dip
 android:layout_height=135dip
 android:layout_alignTop=@id/detail_header
 android:layout_alignLeft=@id/detail_header /

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

2010-07-11 Thread Connick
Not to my knowledge. I will typically rely on a local database with the
appropriate filter clause. (Would be nice if we had a lightweight ORM
framework to leverage though)

-Stace

On Sun, Jul 11, 2010 at 12:05 PM, gpasq g...@pasq.net wrote:

 Anyone know of any libs for Collections that are similar to iOS
 NSPredicate?  The NSPredicate classes allow you to specify SQL-like
 filtering rules which can be applied to collections of object, other
 collections, etc., to retrieve filtered results.

 Thanks in advance!

 -Regards
 Greg Pasquariello

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

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

Re: [android-developers] ProgressDialog fills screen in Froyo 2.2

2010-07-11 Thread Connick
I've noticed progress dialogs being wider (i.e. extra padding) but it's not
extending the width of the screen. (same size in portrait and landscape)

-Stace

On Sun, Jul 11, 2010 at 5:16 PM, Rmac ry...@me.com wrote:

 I am not sure if this is a bug or new feature so I'd like feedback
 if others have noticed it.  Prior to Froyo 2.2, when a ProgressDialog
 (or AlertDialog) was shown it would wrap to its content so that the
 dialog would horizontally span to the message content width.  Now with
 2.2, the width of the dialog extends to the width of the screen
 regardless of message content length.

 I find the previous dialog display in Android 2.1 and below to be much
 more visually appealing to have the dialog only as wide as needed to
 display a message.  To have the dialog span the width of the screen
 for a one word message that is left justified just looks odd.

 Have others noticed this?

 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] Possible to achieve using relative layout?

2010-07-10 Thread Connick
I have a relative layout with an imageview aligned to parent left and a
textview centered horizontally/vertically in the parent. Is there a way I
can indicate that the textview should not overlap the imageview should the
text be long enough to fill the parent?

Cheers,
Stace

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

Re: [android-developers] Re: Possible to achieve using relative layout?

2010-07-10 Thread Connick
Thanks for the input. Actually that will do the trick as I'd like to keep an
area on the far right for a sync progress image anyway.


On Sat, Jul 10, 2010 at 9:14 PM, Streets Of Boston
flyingdutc...@gmail.comwrote:

 Good luck with that one... i tried but no luck.

 If you think about it, it makes sense that this is not 'easy' to do
 with the standard controls (like the text view).

 The text-view knows about its parent (the rel. layout), not about its
 siblings (imageview).
 If you center the text-view in the parent, the largest extent of the
 text-view is the left-and right border of the parent. The text-view
 doesn't know about the imageview and where it exactly is and can not
 position itself or its text relative to the image-view borders.

 You can also specify instead that the text-view is right-aligned and
 is 'to-the-right-of' the imageview and the text inside the text-view
 is centered. However, that will put the text off-center, a bit too
 much to the right.

 I 'solved' it by putting an equal amount of empty space (an empty
 View) to the right of the text-view:
  imageview: left aligned, with specific width.
  textview: right-of imageview, left-of emptyview. Text is centered.
  emptyview: right aligned, with same width as imageview.
 This solution is not perfect, since the text will never go all the way
 to the right. But then, again, this does make some sense, since the
 text doesn't go all the way to the left either. If the text would
 extend all the way to the right and not all the way to the left, the
 text would appear off-center.


 On Jul 10, 5:29 pm, Connick oconn...@gmail.com wrote:
  I have a relative layout with an imageview aligned to parent left and a
  textview centered horizontally/vertically in the parent. Is there a way I
  can indicate that the textview should not overlap the imageview should
 the
  text be long enough to fill the parent?
 
  Cheers,
  Stace

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


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

[android-developers] ListView not refreshing on back button when cursor is changed

2010-07-08 Thread Connick
My user has a menu option to jump from a list activity to a preference
screen which has options for filtering and/or sorting visible data in the
aforementioned list activity. When the user hits the back button, inside
onResume() I am calling cursor.managedQuery() with the new sort/filter
params. The query is executing (with expected sorted results) but the
ListView isn't updating. If I force onCreate to fire by rotating the device,
the list updates appropriately. The only workaround I've found so far is to
re-create the adapter onResume ...which obviously isn't the best approach as
I lose scroll position etc.

I've attempted notify change manually to no avail. (as well as requery - but
the problem isn't data retrieval) I'm sure I'm missing something obvious. :\

Stace

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

Re: [android-developers] ListView not refreshing on back button when cursor is changed

2010-07-08 Thread Connick
On Thu, Jul 8, 2010 at 4:20 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Thu, Jul 8, 2010 at 3:14 PM, Connick oconn...@gmail.com wrote:
  My user has a menu option to jump from a list activity to a preference
  screen which has options for filtering and/or sorting visible data in the
  aforementioned list activity. When the user hits the back button, inside
  onResume() I am calling cursor.managedQuery() with the new sort/filter
  params.

  There is no managedQuery() method on a Cursor, AFAIK.


Oops, sorry I meant to say I was setting the cursor = managedQuery( ...new
where clause etc ...)

Cursor cursor;
MyCursorAdapter adapter;

onCreate(){
  refresh();
  adapter = new MyCursorAdapter( this, cursor );
  setListAdapter( adapter );
}

onResume(){
 refresh()
}

refresh(){
  // read prefs, build new where clause
  cursor = managedQuery( ...new where clause etc ...)
}

I guess I can understand why this is happening ...data isn't actually
changing, just the contents of the cursor.

 The only workaround I've found so far is to
  re-create the adapter onResume ...which obviously isn't the best approach
 as
  I lose scroll position etc


 If I change sort or filter conditions, as a user I would expect to be
  taken to the top of the list, since the previous scroll position is
  meaningless.


For a sort, absolutely ..but if I'm re-setting the adapter then when the
user drills down (versus jumping to preferences) then hits back, the scroll
position is also reset. Perhaps a compromise would be to fire a broadcast
from prefs that resets the adapter on the list. Then drill down and back
won't be affected.

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

Re: [android-developers] Re: Can load html from assets but loading JS, CSS from within that HTML is another story ...

2010-07-08 Thread Connick
In case anyone is ever looking to do the same ...(load html from sqlite and
reference assets for JS, CSS, images etc)

webview.loadDataWithBaseURL( file:///android_asset/, html, text/html,
utf-8, null );

Then have relative path to assets within html and you're golden.

-Stace


On Thu, Jul 8, 2010 at 2:55 AM, Maxood maqs...@salsoft.net wrote:

 Look into the WebViewDemo here:
 http://code.google.com/p/apps-for-android/

 Maqsood

 On Jul 7, 10:21 pm, Connick oconn...@gmail.com wrote:
  I'm loading html into a webview from my assets folder, works no problem.
 In
  my second experiment I've loaded HTML from a database (after pulling from
  remote source) and displayed in a webview (also no prob) ...Now I'm
 trying
  to change the baseref inside the html to have all JS and CSS references
  point to source files under assets. This part doesn't seem to work. I get
  warnings from the web console that it can't load these files due to
 security
  issue.
 
  Now I've resorted back to a content provider and overriding openFile (and
  setting base ref with content://...) but now I'm hitting another problem
  with the JS and CSS files in assets being compressed.
 
  Before I dig deeper, am I over-complicating this?
 
  Cheers,
  Stace



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

[android-developers] How would I include non-class files in my apk?

2010-07-07 Thread Connick
I'm looking to load some JS and CSS into a webview (via content provider)
which is all well and good ...but how should these files be packaged in the
APK such that I can reference them from the provider impl at runtime? i.e.
com.domain.myprovider/foo.js

Thanks!
Stace

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 would I include non-class files in my apk?

2010-07-07 Thread Connick
More specifically ...have the files show up:
/data/data/com.mydomain.foo/media/foo.js

Is this something I would have to provision programatically at runtime?


On Wed, Jul 7, 2010 at 1:35 PM, Connick oconn...@gmail.com wrote:

 I'm looking to load some JS and CSS into a webview (via content provider)
 which is all well and good ...but how should these files be packaged in the
 APK such that I can reference them from the provider impl at runtime? i.e.
 com.domain.myprovider/foo.js

 Thanks!
 Stace


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 would I include non-class files in my apk?

2010-07-07 Thread Connick
Part of the answer. res/raw
Now just need to figure out where those end up. :)

On Wed, Jul 7, 2010 at 1:51 PM, Connick oconn...@gmail.com wrote:

 More specifically ...have the files show up:
 /data/data/com.mydomain.foo/media/foo.js

 Is this something I would have to provision programatically at runtime?



 On Wed, Jul 7, 2010 at 1:35 PM, Connick oconn...@gmail.com wrote:

 I'm looking to load some JS and CSS into a webview (via content provider)
 which is all well and good ...but how should these files be packaged in the
 APK such that I can reference them from the provider impl at runtime? i.e.
 com.domain.myprovider/foo.js

 Thanks!
 Stace




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 would I include non-class files in my apk?

2010-07-07 Thread Connick
R.raw

Case closed. :)


On Wed, Jul 7, 2010 at 1:56 PM, Connick oconn...@gmail.com wrote:

 Part of the answer. res/raw
 Now just need to figure out where those end up. :)




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

Re: [android-developers] Re: How would I include non-class files in my apk?

2010-07-07 Thread Connick
Beauty. Thanks Mark.


On Wed, Jul 7, 2010 at 2:01 PM, Mark Murphy mmur...@commonsware.com wrote:

 Usually, for stuff to load into a WebView, assets/ is a better answer
 than res/raw/. Here is a sample project:

 http://github.com/commonsguy/cw-advandroid/tree/master/WebView/GeoWeb1/

 On Wed, Jul 7, 2010 at 1:56 PM, Connick oconn...@gmail.com wrote:
  Part of the answer. res/raw
  Now just need to figure out where those end up. :)


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can load html from assets but loading JS, CSS from within that HTML is another story ...

2010-07-07 Thread Connick
I'm loading html into a webview from my assets folder, works no problem. In
my second experiment I've loaded HTML from a database (after pulling from
remote source) and displayed in a webview (also no prob) ...Now I'm trying
to change the baseref inside the html to have all JS and CSS references
point to source files under assets. This part doesn't seem to work. I get
warnings from the web console that it can't load these files due to security
issue.

Now I've resorted back to a content provider and overriding openFile (and
setting base ref with content://...) but now I'm hitting another problem
with the JS and CSS files in assets being compressed.

Before I dig deeper, am I over-complicating this?

Cheers,
Stace

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

Re: [android-developers] Re: How to set sync interval for accounts in pre-froyo

2010-07-06 Thread Connick
I ended up using a hybrid solution. Alarm manager to perform a requestSync.
I believe auto is feasible if you have the option of leveraging their
cloud-device messaging.


On Tue, Jul 6, 2010 at 6:55 PM, Carlos Silva r3...@r3pek.org wrote:

 On Tue, Jul 6, 2010 at 23:50, baka rkabhi1...@gmail.com wrote:

 On Eclair, I think accounts can be synced only manually by going to
 Settings - Accounts - Sync Now


 Google accounts sync automatically :)


  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] Speech to text not working behind corporate firewall

2010-07-05 Thread Connick
I've noticed that speech to text only works on cellular or WiFi connections
not behind corporate firewalls. I'm guessing it uses non-standard ports of
some kind? Anyone else seen this?

-Stace

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

Re: [android-developers] Re: Speech to text not working behind corporate firewall

2010-07-05 Thread Connick
Yeah, it needs to reach google ...only prob is if you have a connection but
it's wifi behind a firewall, you're out of luck. (at least in our case) Not
great for enterprise. :(


On Mon, Jul 5, 2010 at 2:30 PM, EdKawas ed.ka...@gmail.com wrote:

 Not sure if this helps, but I noticed that if my nexus one doesnt have
 a wifi/data signal, speech to text does not work. Only when a
 connection is present does it work.

 Eddie

 On Jul 5, 10:59 am, Connick oconn...@gmail.com wrote:
  I've noticed that speech to text only works on cellular or WiFi
 connections
  not behind corporate firewalls. I'm guessing it uses non-standard ports
 of
  some kind? Anyone else seen this?
 
  -Stace

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

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

Re: [android-developers] Re: Speech to text not working behind corporate firewall

2010-07-05 Thread Connick
I'm wondering if it's because it's waiting for a return intent (async
process) from the server? Google follks? :)


On Mon, Jul 5, 2010 at 2:39 PM, Connick oconn...@gmail.com wrote:

 Yeah, it needs to reach google ...only prob is if you have a connection but
 it's wifi behind a firewall, you're out of luck. (at least in our case) Not
 great for enterprise. :(




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

2010-07-02 Thread Connick
Hi folks,

We're looking to augment our mobile team and are looking for an additional
contractor for Android development. (on-site in Ottawa)
Please contact me off list ( styo...@adobe.com ) if you're interested and/or
would like more information.

Cheers,
Stacy Young
Adobe Systems

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

[android-developers] Activity saved state not always working?

2010-07-02 Thread Connick
I've got a TextView which keeps losing it's previous value between intent
invocations. If I enter some text, hit the home button then relaunch the app
the text is restored as expected. If I change orientation, onCreate fires
and again text is restored as expected. However if I navigate elsewhere in
the app via menu option then navigate BACK to the original screen via the
menu, onCreate receives null for the incoming Bundle and my TextView loses
state. I can see onSaveInstanceState being called before navigating away so
I'm scratching my head as to what's going on.

Menu option is firing an intent like so:
intent = new Intent( Constants.INTENT_FORM_LIST );
startActivity( intent );

-Stace

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

2010-07-02 Thread Connick
That's what's throwing me for a loop. onDestroy is never called ...and I
don't believe there's any reason it'd be killed off forcefully.


On Fri, Jul 2, 2010 at 3:31 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, Jul 2, 2010 at 3:30 PM, Connick oconn...@gmail.com wrote:
  However if I navigate elsewhere in
  the app via menu option then navigate BACK to the original screen via the
  menu, onCreate receives null for the incoming Bundle and my TextView
 loses
  state.

 What caused the activity to be destroyed?

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

 Android Training...At Your Office: http://commonsware.com/training

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

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

Re: [android-developers] Activity saved state not always working?

2010-07-02 Thread Connick
On Fri, Jul 2, 2010 at 3:48 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, Jul 2, 2010 at 3:46 PM, Connick oconn...@gmail.com wrote:
  That's what's throwing me for a loop. onDestroy is never called ...and I
  don't believe there's any reason it'd be killed off forcefully.

  Are you really sure onCreate() is being called? Do you see anything
  interesting in logcat?

 It's absolutely being called (onCreate, onResume) ...onDestroy is called on
orientation change and state is restoring properly. I'll keep fishing.

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

2010-07-02 Thread Connick

  Whereas calling startActivity( intent ) from within an application
 implies a
  reset state and will not have the same affect as navigating back in the
  activity stack.

  Calling startActivity() usually creates a new instance of the
  activity, which by definition has no saved state.

 http://groups.google.com/group/android-developers?hl=en

Thanks for clarification. I was assuming that if the activity was still
residing in the stack the instance would be re-used.

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

2010-07-01 Thread Connick
I'm considering the use of hints on TextViews but curious to know if hint *
bubbles* are possible? (out of the box)

Thanks,
Stace

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

[android-developers] Best way to change text styles in a list? (performance)

2010-06-30 Thread Connick
Hi all,

Ever since I added conditional text formatting on my list items I've noticed
a performance drop. It's still usable but I'm somewhat obsessive about
performance/experience so I would really like to tweak my approach as best I
can. The following snippet is how I'm achieving my conditional formatting.
Is this the only way? (Perf drop appears to be related to making TextViews
spannable)

if( w.state.equalsIgnoreCase( Tasks.STATE_READ ))
{
  s.setSpan( new StyleSpan( Typeface.NORMAL ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
  i.setSpan( new StyleSpan( Typeface.NORMAL ), 0, i.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

  w.getInstructions().setTextColor( 0xFFBDBEBD );
  w.getDeadline().setTextColor( 0xFFBDBEBD );
}
else
{
  s.setSpan( new StyleSpan( Typeface.BOLD ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
  i.setSpan( new StyleSpan( Typeface.BOLD ), 0, i.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

  w.getInstructions().setTextColor( 0xFFBDBEBD );
  w.getDeadline().setTextColor( 0x );
 }

Thanks

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

Re: [android-developers] Best way to change text styles in a list? (performance)

2010-06-30 Thread Connick
Thanks Mark,

I knew it had to be simpler. I've turfed all the Spannable stuff ...almost
flawless now. Only one slight stutter on fast fling. Next stop is addressing
nested layout in the row xml ...

if( w.state.equalsIgnoreCase( Tasks.STATE_READ ))
{
w.getStepName().setTypeface( Typeface.DEFAULT );
w.getInstructions().setTypeface( Typeface.DEFAULT );


}
else
{
w.getStepName().setTypeface( Typeface.DEFAULT_BOLD );
w.getInstructions().setTypeface( Typeface.DEFAULT_BOLD );


 }


On Wed, Jun 30, 2010 at 10:47 AM, Mark Murphy mmur...@commonsware.comwrote:

 1. w.getInstructions().setTextColor( 0xFFBDBEBD ); appears to be the
 same in both branches of your if(), meaning it probably does not need
 to be called every time.

 2. Create private data members for new StyleSpan( Typeface.NORMAL )
 and new StyleSpan( Typeface.BOLD ) and reference those data members,
 rather than creating new instances every time.

 3. If s and i are TextViews, skip the Spannable stuff and just call
 setTypeface() (using cached normal and bold Typeface objects)

 On Wed, Jun 30, 2010 at 10:29 AM, Connick oconn...@gmail.com wrote:
  Ever since I added conditional text formatting on my list items I've
 noticed
  a performance drop. It's still usable but I'm somewhat obsessive about
  performance/experience so I would really like to tweak my approach as
 best I
  can. The following snippet is how I'm achieving my conditional
 formatting.
  Is this the only way? (Perf drop appears to be related to making
 TextViews
  spannable)
 
  if( w.state.equalsIgnoreCase( Tasks.STATE_READ ))
  {
s.setSpan( new StyleSpan( Typeface.NORMAL ), 0, s.length(),
  Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
i.setSpan( new StyleSpan( Typeface.NORMAL ), 0, i.length(),
  Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
 
w.getInstructions().setTextColor( 0xFFBDBEBD );
w.getDeadline().setTextColor( 0xFFBDBEBD );
  }
  else
  {
s.setSpan( new StyleSpan( Typeface.BOLD ), 0, s.length(),
  Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
i.setSpan( new StyleSpan( Typeface.BOLD ), 0, i.length(),
  Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
 
w.getInstructions().setTextColor( 0xFFBDBEBD );
w.getDeadline().setTextColor( 0x );
   }

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

 Android Training...At Your Office: http://commonsware.com/training

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

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

Re: [android-developers] Camera in Froyo emulator crashes

2010-06-28 Thread Connick
Don't know if it's related but the camera app crashes every one of our Nexus
one's. (actual hardware)

-Stace


On Mon, Jun 28, 2010 at 6:57 AM, Fina Mesina fina.mes...@gmail.com wrote:

 Hello!

 We are exploring the default applications in Froyo and we found out
 that the Camera app always crashes seconds after it loads.

 Is this related to the no camera/video input limitation of the application?
 If not, what seems to be the problem?
 We already added all the additional properties to the AVD.
 We also disabled the auto-rotate screen option.

 Attached is the stacktrace.

 Thank you

 --
 Fina

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

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

[android-developers] TextView showing invisible chars in 2.0 - 2.1

2010-06-27 Thread Connick
In testing my app across different OS versions I've noticed what appears to
be carriage returns showing as visible squares in TextView. This doesn't
happen on Froyo ...wondering if anyone knows how get around this in previous
versions?

Thanks,
Stace

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

Re: [android-developers] Re: sqlite3 in adb not in 2.2?

2010-06-27 Thread Connick
Hmm it should work as I've been using it for some time in 2.2. Try to su
root first.


On Sun, Jun 27, 2010 at 11:50 PM, Vincent Tsao caojunvinc...@gmail.comwrote:



 On May 24, 7:41 am, Mark Murphy mmur...@commonsware.com wrote:
  schwiz wrote:
   So I just watched the talk at Google I/O where they showed how to use
  sqlite3in ADB to help debug your database.  I didn't know you could
   do that way cool.  So I was doing it on my nexus which is rooted and
   it was working fine.
 
  Then I went ahead and installed 2.2 and now when I typesqlite3in the
 shell it sayssqlite3notfound  Any ideas?
 
  Well, it's in the 2.2 emulator image, for what that's worth.

 i found it's too bad to check data  debug from my app

 i can't check my data from my nexus one anymore, that's bad!

 
  --Mark Murphy (a Commons Guy)http://commonsware.com|
 http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy
 
  Android Consulting:http://commonsware.com/consulting
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group athttp://
 groups.google.com/group/android-developers?hl=en

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


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

Re: [android-developers] Re: Using SyncAdapter for syncing application data

2010-06-24 Thread Connick
p.s. I should add to this that if u set to sync automatically ...it can
respond to a network tickle pre-2.2. At least according to the docs. I would
guess this would work via google's cloud messaging.

-Stace


On Wed, Jun 23, 2010 at 8:25 AM, Connick oconn...@gmail.com wrote:

 I've been using a sync adapter for application data and it worked out
 really well. The downside is that there is no API to set the sync interval
 unless you're targeting froyo. (at least to my knowledge) Kind of defeats
 the purpose. I've had to roll with alarm manager for pre-froyo clients. My
 main reason for going the sync adapter route was to play nice with the users
 ability to manage background sync globally.

 -Stace



 On Wed, Jun 23, 2010 at 8:18 AM, Hugo Visser botte...@gmail.com wrote:

 Let me clarify: In this case I don't need or want to have the sync be
 very visible. I just want to enter some data on the device and sync it
 to the server eventually, so when the network connection is available.
 Batching would be OK too.
 Because that's kind of like editing a contact or updating a calendar I
 thought it would be suitable for a sync adapter, and I guess the sync
 framework also takes care of some things that I otherwise have to
 manage myself.

 Could you elaborate on your statement that a sync adapter would be the
 right choice when it's tied to UI redrawing? I'd guess that the
 opposite would be true?

 Hugo

 On Jun 23, 11:34 am, Gyan gnanesh@gmail.com wrote:
  Nice thought. But do you really think you need an adapter to answer
 this.
  This is just a data sync functionality! If its tightly tied to UI
  re-drawing/customization then you might go with writing SyncAdapter
  otherwise you can, very well, stick with an interface!
 
  Thanks
  Gyan

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




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

Re: [android-developers] Re: Using SyncAdapter for syncing application data

2010-06-23 Thread Connick
I've been using a sync adapter for application data and it worked out really
well. The downside is that there is no API to set the sync interval unless
you're targeting froyo. (at least to my knowledge) Kind of defeats the
purpose. I've had to roll with alarm manager for pre-froyo clients. My main
reason for going the sync adapter route was to play nice with the users
ability to manage background sync globally.

-Stace


On Wed, Jun 23, 2010 at 8:18 AM, Hugo Visser botte...@gmail.com wrote:

 Let me clarify: In this case I don't need or want to have the sync be
 very visible. I just want to enter some data on the device and sync it
 to the server eventually, so when the network connection is available.
 Batching would be OK too.
 Because that's kind of like editing a contact or updating a calendar I
 thought it would be suitable for a sync adapter, and I guess the sync
 framework also takes care of some things that I otherwise have to
 manage myself.

 Could you elaborate on your statement that a sync adapter would be the
 right choice when it's tied to UI redrawing? I'd guess that the
 opposite would be true?

 Hugo

 On Jun 23, 11:34 am, Gyan gnanesh@gmail.com wrote:
  Nice thought. But do you really think you need an adapter to answer this.
  This is just a data sync functionality! If its tightly tied to UI
  re-drawing/customization then you might go with writing SyncAdapter
  otherwise you can, very well, stick with an interface!
 
  Thanks
  Gyan

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


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

Re: [android-developers] Sleep mode - technical documentation?

2010-06-23 Thread Connick
One thing I've noticed on froyo, and this could be due to my lack of
understanding, is that network connections sometimes fail over wifi even
with cpu and wifi lock. Wifi reports its connected yet calls fail
immediately. The second I wake up the phone, back in business. (if I disable
wifi and re-try, works fine over 3G)

-Stace


On Wed, Jun 23, 2010 at 9:15 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Wed, Jun 23, 2010 at 9:05 PM, Steve stec...@gmail.com wrote:
  1. What causes a device to enter / exit sleep mode?

 Lack of user input.

  2. How are running processes impacted when the device enters sleep
  mode?

 They freeze in place, picking up when the CPU starts up again.

  Are the above issues (and any other relevant issues) documented
  anywhere?

 Not really, AFAIK.

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

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


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

[android-developers] How to set sync interval for accounts in pre-froyo

2010-06-22 Thread Connick
Hi folks,

Does anyone know if there's a way to set the sync interval on accounts via
sync adapter in pre-froyo? They've added the API to do so in 2.2 but I'm
curious to know if there is a workaround in 2.0-2.1. (My backup plan is the
alarm manager) What's odd is there doesn't even seem to be any preset
interval either ...so accounts are never synced!

Thanks,
Stace

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

2010-06-22 Thread Connick
Very cool. Setting up continuous integration was on my to-do this week and u
just made my life easier. Cheers! :)



On Tue, Jun 22, 2010 at 1:53 PM, Matt matthew.quig...@gmail.com wrote:

 Hi everyone.  I've started my first blog to document my experience
 with Android development, and so far I've put up some tutorials.  I'd
 appreciate some feedback because this is my first experience doing
 this.  Not to mention checks for accuracy.

 www.androidengineer.com

 There's one about creating custom themes/styles in UI, and one about
 using Ant build scripts.  I've got a bunch more ideas about tutorials
 to post, but it'd be nice if I could hammer out some kinks sooner
 rather than later.

 Thanks all,
 -Matt

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


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

[android-developers] Fwd: OnSharedPreferenceChangeListener never receives callback

2010-06-20 Thread Connick
Hi,

I'm not sure I understand what you are trying to do ...but if it helps any,
I ended up using a broadcast/receiver to relay the preference change. While
I could have just re-read from preferences onResume on the second activity,
I didn't want the user to see data shifting around in the list as the new
sort was applied.

Cheers,
Stace

-- Forwarded message --
From: FrankG frankgru...@googlemail.com
Date: Thu, Jun 17, 2010 at 8:15 AM
Subject: Re: OnSharedPreferenceChangeListener never receives callback
To: Connick oconn...@gmail.com


Hello Connick,

sorry to bother you, but have you done, that it works now
for you ?

My situation :
   Service  A has SharedPreference .. write them after some kernel
events

  Activity B can read them ( i.e. in onResume )

  BUT, if the Activity is currently shown   I will update them via
 a SharedPreferenceChangeListener. But he isn't called , when Service
a changes the Preference.

 For me a very simular situation to yours, right ?

So what is the missing point ? Thanks a lot !

  Frank




On 15 Jun., 23:52, Connick oconn...@gmail.com wrote:
 Cancel that, I just grasped what you were getting at. :)



 On Tue, Jun 15, 2010 at 5:18 PM, Connick oconn...@gmail.com wrote:
  Will file a big, thx!

  On Tue, Jun 15, 2010 at 4:45 PM, Mark Murphy mmur...@commonsware.com
wrote:

  On Tue, Jun 15, 2010 at 4:42 PM, Connick oconn...@gmail.com wrote:
   Interesting, it only works if used within an activity that extends
   PreferenceActivity. Crap.

  So long as all components are using the same preference file, it
  should work for modifications from any source. That is what I meant by
  correct in my previous reply.

  --
  Mark Murphy
  CommonsWare
  mmur...@commonsware.com
 http://commonsware.com

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

 - Zitierten Text anzeigen -

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

[android-developers] Making TextViews Spannable causes ListView performance to tank

2010-06-18 Thread Connick
Hi all,

I've got a list few which I've optimized in every possible way. Performance
matches the exchange email client so I'm happy in that respect. It's very
fluid regardless of the number of records. The problem is the moment I
introduce some conditional formatting of TextViews (think bold for unread,
normal for read) the list starts to get choppy when the user flings the
list. Is there a better way to tackle this formatting?

My layout is optimized (single relative layout) and I'm using a viewwrapper.

Example: (in my actual code there are 4 Textviews)

Spannable s = (Spannable) w.stepname.getText();


if( state.equalsIgnoreCase( Tasks.STATE_READ ))
{
s.setSpan( new StyleSpan( Typeface.NORMAL ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

w.getStepName().setTextColor( 0xFFBDBEBD );
}
else
{
s.setSpan( new StyleSpan( Typeface.BOLD ), 0, s.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );

w.getStepName().setTextColor( 0x );
}

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

[android-developers] Should I bother with my own sync adapter?

2010-06-17 Thread Connick
In my current app I decided to integrate into account management and create
a sync adapter. I'm wondering if it's worth doing this over an alarm manager
approach as I don't believe it's supported below 2.0? Even worse I'm
currently using a 2.2 API to set the sync interval (not possible before ??)
which is definitely a problem! Also the users accounts have no contacts
associated with them so at times my account type shows up in dialogues that
aren't really applicable.

Sounds like I've answered my own question but I'm curious to hear other
perspectives.

Cheers,
Stace

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

Re: [android-developers] ListView with sections from a SINGLE Cursor

2010-06-16 Thread Connick
I'm facing this exact challenge this morning! +1


On Wed, Jun 16, 2010 at 11:33 AM, sasq jonas.minnb...@gmail.com wrote:

 I've been looking around a lot on how to separate a ListView into
 sections with headers, and all solutions are based on using multiple
 adapters.

 I have only a single database query that is ordered by a specific
 field. I want to present this information in a ListView, and insert
 headings whenever the field changes.

 For instance, you search a large amount of music files for love and
 get a list like this:

 == Alice Bung ==
 Love boat
 === Beavers ===
 Lots of Love
 No Love
 Zlovek Zlatan
 === Some other Group ==
 Another song about love
 Yet another song about love

 Actually inserting the headers as a second viewtype requires you to
 scan the whole result to get an accurate count.
 The best I've come up with is returning the Header combined with the
 first item as a single view so as to keep the count correct, but then
 selection looks wrong.

 Any tips?

 -- Jonas


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

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

[android-developers] Setting background color on row layout prevents display of highlight on select

2010-06-16 Thread Connick
I'm setting background color based on a given state of an object in each row
in a list. That part is working just fine but when I set the background
color on the outermost layout the row no longer highlights when selected.
Probably a specific attribute I'm not setting/changing?

Thanks,
Stace

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Implementing Filterable Cursor Adapter: How to I invoke/refresh filter?

2010-06-15 Thread Connick
Hi folks

I've overriden runQueryOnBackgroundThread and done what I've needed to do
for the corrent query to be excuted with a given constraint. My current
challenge is figuring out how to actually pass in the constraint. I've got
an ActivityList which I'd like to filter on a stored preference. I'm
thinking I will need to perform a filter during onStart such that the most
recent preference changes are picked up. All that is in place, just not
clicking on how I'd actually cause the filter to happen!

Appreciate any insight,
Cheers
Stace

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

2010-06-15 Thread Connick
Hi folks,

I'm trying to listen for preference changes from an activity (see below). It
never fires. Is it due to the fact that the activity in question is not in
focus when the change event fires?

sharedPrefs = PreferenceManager.getDefaultSharedPreferences(
getApplicationContext() );

SharedPreferences.OnSharedPreferenceChangeListener prefListener = new
SharedPreferences.OnSharedPreferenceChangeListener()
{
  @Override
  public void onSharedPreferenceChanged( SharedPreferences
sharedPreferences, String key )
  {
 Log.w( TAG, Pref key:  + key );
  }
};
sharedPrefs.registerOnSharedPreferenceChangeListener( prefListener );

Cheers,
Stacy

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

2010-06-15 Thread Connick
No effect. I'm registering the listener in onCreate of my activity, not sure
if that has any implications. I've also been assuming this should fire when
prefs are either changed via a pref activity and/or when a commit is called
from a shared pref editor?

-Stace


On Tue, Jun 15, 2010 at 4:28 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 4:25 PM, Connick oconn...@gmail.com wrote:
  I'm trying to listen for preference changes from an activity (see below).
 It
  never fires. Is it due to the fact that the activity in question is not
 in
  focus when the change event fires?

 It shouldn't be. It works in services, and services never have the focus.

  sharedPrefs = PreferenceManager.getDefaultSharedPreferences(
  getApplicationContext() );

 Try using this instead of getApplicationContext()

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.com

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


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

2010-06-15 Thread Connick
Interesting, it only works if used within an activity that extends
PreferenceActivity. Crap.


On Tue, Jun 15, 2010 at 4:40 PM, Connick oconn...@gmail.com wrote:

 No effect. I'm registering the listener in onCreate of my activity, not
 sure if that has any implications. I've also been assuming this should fire
 when prefs are either changed via a pref activity and/or when a commit is
 called from a shared pref editor?

 -Stace



 On Tue, Jun 15, 2010 at 4:28 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 4:25 PM, Connick oconn...@gmail.com wrote:
  I'm trying to listen for preference changes from an activity (see
 below). It
  never fires. Is it due to the fact that the activity in question is not
 in
  focus when the change event fires?

 It shouldn't be. It works in services, and services never have the focus.

  sharedPrefs = PreferenceManager.getDefaultSharedPreferences(
  getApplicationContext() );

 Try using this instead of getApplicationContext()

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.com

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




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

2010-06-15 Thread Connick
Will file a big, thx!

On Tue, Jun 15, 2010 at 4:45 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 4:42 PM, Connick oconn...@gmail.com wrote:
  Interesting, it only works if used within an activity that extends
  PreferenceActivity. Crap.

 So long as all components are using the same preference file, it
 should work for modifications from any source. That is what I meant by
 correct in my previous reply.

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.com

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


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

2010-06-15 Thread Connick
Cancel that, I just grasped what you were getting at. :)


On Tue, Jun 15, 2010 at 5:18 PM, Connick oconn...@gmail.com wrote:

 Will file a big, thx!


 On Tue, Jun 15, 2010 at 4:45 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 4:42 PM, Connick oconn...@gmail.com wrote:
  Interesting, it only works if used within an activity that extends
  PreferenceActivity. Crap.

 So long as all components are using the same preference file, it
 should work for modifications from any source. That is what I meant by
 correct in my previous reply.

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.com

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




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ListView no longer responding to select when checkbox added to row view

2010-06-10 Thread Connick
I'm sure this is an obvious one but I'm at a loss. I'm using my own layout
for list rows, all well and fine ...but the moment I add a checkbox view to
the rows layout only the checkbox responds to user selection. I'd like for
the checkbox to change state if the user taps anywhere within a given row.
(as with android prefs)

Any pointers appreciated!
Stace

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

2010-06-07 Thread Connick
Hi folks,

Been doing some digging but so far it's not apparent on how I can have my
app be notified (via intent possibly?) on when an account type associated
with my app is removed from the manager. When this happens I need to perform
data cleanup for that account in a local database etc.

Any insight appreciated.

Cheers,
Stacy

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

2010-05-19 Thread Connick
Hi all,

I've looked at the SampleSyncAdapter project that ships with the SDK and
I've implemented my own sync service successfully. However I've noticed
there does not seem to be any public APIs for controlling sync frequency.
Did I miss something obvious?

Thanks!
Stacy

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