Deepak,
Not sure if it will help, but I have a minimal SyncAdapter that, on both
my phone and on a Genymotion emulator, syncs about every 20 minutes (which
is a bit odd, because it is nominally scheduled every 15 minutes).
The docs are, to this day, nearly useless. The example program is so
methods and the actual account creation, are also significant., can you
give more detail about this as I didn't find this in documentation or
forums I read.
On Thu, Jul 24, 2014 at 1:07 PM, G. Blake Meike blake...@gmail.com
javascript: wrote:
Apparently, the order in which you call
the
account). So is my application sync some how linked to sync of other
applications?
Regards,
*Deepak*
On Sun, Jul 20, 2014 at 12:37 PM, G. Blake Meike blake...@gmail.com
javascript: wrote:
Sorry, missed the note that you were passing false in the original.
I've build several Sync
Yeah! I'll bet that's it.
Please see:
http://developer.android.com/training/sync-adapters/running-sync-adapter.html
Especially the sections entitled:
Run the Sync Adapter After a Network Message
and
Run the Sync Adapter Periodically
-blake
--
You received this message because you
Sorry, missed the note that you were passing false in the original.
I've build several Sync Adapters that sync periodically. They seem to work
fine. It is hard to guess what could be wrong.
The period is, definitely, in seconds, not millis.
Have you checked to see that none of your calls
Do you have any calls to ContentResolver.notifyChange() in your app? If
you pass true as the third argument, it will force a sync.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
They really are fairly different. Loaders are managed AsyncTasks.
AsyncTasks are (pretty much) managed Runnables. Use loaders if you can.
See:
http://stackoverflow.com/questions/15463146/is-using-asynctask-still-recommended-for-loading-listview-items-in-the-backgroun/15463279#15463279
@Lew on 3/14: +many Why, oh why, do people insist on lazy initialization?
A lot of the debate about singletons ignores specifics. I bet nobody has a
problem with:
public static final String MY_CONSTANT = CONSTANT;
That's a singleton. Singletons that are mutable are weirder. Lazily
On Sunday, March 17, 2013 9:09:54 AM UTC-7, Piren wrote:
If your application has a singleton that takes 200MB of memory and takes a
minute to load (dont ask why :-) ), but is only needed if you use a
specific part of the app, why load it on the app load?
Can you suggest a better time?
http://omappedia.org/wiki/PandaBoard/4430vs4460PandaBoard
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Would and ES work?
On Friday, March 1, 2013 5:10:59 PM UTC-8, mike digioia wrote:
Hi
Anyone have a pandaboard not use and willing to sell it?
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
oh bob. how very butch.
The last para of the posting that TreKing cites gives the answer: in old
versions of Android, the Apache libs worked better. In post HC, the Java
ones work better. If you happen to be using Android Spring, it chooses the
correct implementation based on runtime
I think you need a state machine. The behavior of your onTouch will be
determined by what the user does and the current state. That will, in
turn, change the state.
-blake
On Tuesday, February 26, 2013 11:44:39 PM UTC-8, Numair Qadir wrote:
Greetings,
Can nested onTouch method be
+10
very spooky, dude!
On Friday, February 15, 2013 9:57:34 AM UTC-8, bob wrote:
It is probably a null pointer exception because you are using an
uninitialized widget.
Make sure you call findViewById to initialize all widgets before use.
On Thursday, February 14, 2013 11:58:55 PM
their processes from being
managed. In the long run, it they just don't work.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
on the thread on which the
AsyncTask is created, provided that thread is a Looper? If you just init
your background thread as a Looper, you might be able to use the AsyncTask
normally...
-blake
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
additional work
(that's not that much of a priority - i was thinking of making that
an AsyncTask.
The notify/wait was a generic question - whether those can be used
and/or recommended for use under the android platform.
On Thursday, February 7, 2013 10:27:38 AM UTC-5, G. Blake Meike wrote
First of all, congrats for not doing this with an AsyncTask.
Second, as of Honeycomb, you may not touch the network from the UI thread
(as you've probably surmised by now). The fact that you are getting that
error message suggest to me that you are using a Handler *attached to the
UI thread*
If you choose Mark's second solution, be sure to move the view *before* the
animation. If you don't you'll get a flash at the end of the animation,
when you move the view.
-blake
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
Toast.LENGTH_LONG is a flag, not a number of ms. Check its value: I think
it is, like, 1, or 2.
-blake
On Tuesday, January 22, 2013 11:04:57 PM UTC-8, Revathi Ramanan wrote:
Hi All,
I trigger a toast message when a wrong number is entered by user in Edit
Text box.
The toast duration
There's an ugly flash after the menu slides out. If you find out what it
is, please let me know!
-blake
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To
Fixed.
-blake
On Tuesday, January 22, 2013 1:24:23 PM UTC-8, dashman wrote:
yes there is.
i think i'll use a viewflipper or something similar.
i appreciate your help.
On Tuesday, January 22, 2013 10:46:35 AM UTC-5, G. Blake Meike wrote:
There's an ugly flash after the menu slides out
it with the menu.
-blake
On Monday, January 21, 2013 4:11:43 AM UTC-8, dashman wrote:
i see that it's a library.
do you have a sample code as to how to use it.
thanks.
On Sunday, January 20, 2013 3:25:04 PM UTC-5, G. Blake Meike wrote:
I've been poking around at this for a while
, January 21, 2013 4:11:43 AM UTC-8, dashman wrote:
i see that it's a library.
do you have a sample code as to how to use it.
thanks.
On Sunday, January 20, 2013 3:25:04 PM UTC-5, G. Blake Meike wrote:
I've been poking around at this for a while. You might be interested it
this:
https
Done. There is now a basic eclipse Hello World example, with the slider
added.
Enjoy.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message because you are subscribed to the Google
Groups Android Developers group
I've been poking around at this for a while. You might be interested it
this:
https://github.com/bmeike/SlidingMenu
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message because you are subscribed to the Google
Groups
If the task is actually cancellable -- that is, if it actually stops when
you cancel it -- that should be sufficient. If you implement the AT's
onCancelled method, make sure it doesn't use any stale references.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly
the Task is still running, if there
is nobody to whom to report a result...
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
will have spent battery computing a useless result. If you are willing to
throw the result away, just cancel the task.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message because you are subscribed to the Google
Groups Android
).
Nulling out pointers and AsyncTasks that survive screen
reorientation (despite the fact that I proposed it myself, at one
point) are just Voodoo.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
On Monday, January 14, 2013 1:10:52 AM UTC-8
a constant and use it.
2) The way you cancel a pending intent is by creating an *exact* copy of
it. I suggest, then, that you use exactly the same code to create the
intent that you use, for either starting or stopping the service. That's
way less error prone.
G. Blake Meike
Marakana
totally handle
the architecture that does this the right way. ... and, fwiw, it has
nearly nothing to do with freaking AsyncTasks. Gimme a ping. I'd be happy
to help.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message
You should probably have a look at ContentResolver.notifyChange and
registerContentObserver. Look at the implementation of
Cursor.setNotificationUri. These won't help you monitor access to the DB,
but they are a great way of monitoring changes to the data that the DB
contains.
G. Blake Meike
the alarm should get rid of it.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
On Sunday, December 30, 2012 11:51:06 AM UTC-8, Giuseppe wrote:
I have created a PendingIntent with AlarmManager that send an email every
minute with following code
that it
is worth making it waste battery, even when no-one is watching (which is
what a persistent AT does), it makes sense to put it somewhere less
ephemeral: a Service.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message
back to sleep...
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
I think that the fact that this question is about writing to internal
memory is confusing people. I think that all you want to do is allow App2
access to a file owned by App1. That is probably pretty easy:
App1 will own the file(s). They will be in its sandbox files directory
and not
http://en.wikipedia.org/wiki/Bob's_your_uncle
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
FWIW, this part was pilot error. Copying the files works fine.
For bitmaps from File Descriptors, I have no answer.
-blake
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
I believe I'm seeing weirdness in the behavior
of BitmapFactory.decodeFileDescriptor. tl;dr: I can get a bitmap from a
stream, but not from a related fd.
There are four snippets of code, below. The first two succeed, the second
two fail.
The respective error messages for the 3rd and 4th
I have one more bit of information on this. I'm pretty sure, now, that
assets are different from the files that generated them. I've seen a bunch
of stuff around, about renaming files .mp3 in order to keep them from
being compressed. There are even postings of lists of file types that
the concept,
thought they don't explain it.
Just have another look around.
G. Blake Meike
Marakana
The second edition of Programming Android is available:
http://shop.oreilly.com/product/0636920023005.do
On Thursday, November 1, 2012 6:12:08 AM UTC-7, krithika rajan wrote:
Hi im a newbee
processed event. Each new even will observe consistent state.
... but the main point is that you don't need to worry: unless you
explicitly start a new thread, looper or asynctask, everything in the UI is
on a single thread. It is safe.
G. Blake Meike
Marakana
The second edition of Programming
You probably want to use the method SQLiteDatabase.rawQuery
-blake
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
On Wednesday, October 10, 2012 10:23:26 PM UTC-7, ANKUR1486 wrote:
Hi all
i am trying
This code works:
https://github.com/bmeike/ProgrammingAndroid2Examples/blob/master/SimpleFragment/src/com/oreilly/demo/android/pa/simplefragment/SimpleFragment.java
G. Blake Meike
Marakana
The second edition of Programming Android is now available:
http://shop.oreilly.com/product
for the
fragment.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers
typical cause of this problem is that the AsyncTask is not static
and, therefore, has a pointer to the Activity in which it is declared.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message
it drives...
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android
the load in
the doInBackground method and the copy in onPostExecute. Better yet, have
a look at using a Loader.
However you decide to do it, you must change the Adapter visible list only
from the UI thread.
G. Blake Meike
Marakana
The second edition of Programming Android is now available
seem
right.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android
.
The only good news is that once you get things set up, they will, pretty
much, stay set up.
These instructions might help:
http://marakana.com/support/android_setup.html
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005
This is probably a terrible idea. There's a discussion over on Stack
Overflow that might help.
http://stackoverflow.com/questions/5015592/connecting-to-oracle-in-android
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product
one I've seen myself, involves setting the display density way lower
than it actually is. Kind of a drag after paying all those bucks for that
sweet looking laptop...
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005
Many of the features in 4.1 can also be found in the Support Package
(formerly the ACL). Depending on the exact features you need, you may be
able to build your app for 4.1 and then backport it to 2.2, by adding the
Support Library to the project.
G. Blake Meike
Marakana
The second edition
() actually running? I notice it says while (stopped).
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
in the case statement runs in the same thread as the
Handler.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group
I'd say you've got yourself a bug. Very nice work. This code, run first
under java 6, then under Android, confirms it for me:
package net.callmeike.sandbox.p1;
public class BaseClass {
public void run() { callFoo(); }
void foo() { System.out.println(P1 foo: + this); }
private
I really can't figure out what you are asking here. There's no evidence or
a runnable. I'm guessing that m and myNum are data members? Are they being
updated from two different threads?
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com
On Thursday, July 5, 2012 2:53:14 AM UTC-7, Alex Belyaev wrote:
Here are the sources of:
ListView.java
...
Those are publicly available sources! The source that would be most
helpful is the source for CustomListView...
-blake
--
You received this message because you are subscribed
+1
Starting your own thread is broken: it won't work across process boundaries.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
On Thursday, July 5, 2012 6:09:47 AM UTC-7, rahul kaushik wrote:
Intent intent
Whoah. I've only had a minute or two to look at this but, for the moment
at least, I'm baffled.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
On Thursday, July 5, 2012 8:44:51 AM UTC-7, Alex Belyaev wrote
in CustomListView class, this doesn't
work for me.
So the question is, why?
This one I don't understand. That seems like it should work. Can you give
more details.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product
Since you asked: Programming Android has a two chapters describing, in
some detail, how Android UI components work.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
On Tuesday, July 3, 2012 5:54:24 PM UTC-7
If there's a reason to do this asynchronously, you should do it with an
AsyncTask. On the other hand, I'm with Justin wondering why you want it
done asynchronously, at all...
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product
with the library being
downloaded to the wrong place, when the manager is run from eclipse. In my
case it is a bug that the template require the support library at all...
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
Mark's stuff is, indeed, awesome. I humbly suggest Programming Android, as
well...
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
On Sunday, July 1, 2012 7:12:39 PM UTC-7, Jason Hsu wrote:
I'm considering
Mahmoud,
I'd be interested in pursuing this, if you are still having the problem.
Would you:
- Post the code for the anonymous onClick handler, in which the exception
is being thrown?
- Post the entire exception that is the problem
Thanks,
G. Blake Meike
Marakana
The second edition
If the parent container for both the button and list view is a linear
layout, you should be able to set the list view's layout_height=0dpi and
layout_weight=1
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
two different
implementations of onPreExecute?
It looks to me as if one of those dialogs is being created when the context
is null, or at least invalid. I totally cannot figure out, from the
fragments you've posted, though, why that is.
G. Blake Meike
Marakana
The second edition
While I've never seen this happen in Indigo, it happens *constantly* in
Juno. I know, I know: not supported. It is, however, certainly a way to
drive a similar bug, consistently.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product
Got it. Thanks Dianne.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email
... actually, on more thing. I'd expect the remote reference to be
released if I unbind the service. Is that so?
-blake
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
. When does that happen?
I've followed this down as far as a Parcel.flatten_binder, but I kind of
lose it after that.
What is the right way to keep from leaking, for instance, implicit pointers
to my Activity, when I use asynchronous callbacks with a bound Service?
Thanks
-blake
G. Blake
Well, since you asked...
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
G. Blake Meike
Marakana
On Wednesday, June 13, 2012 5:27:52 AM UTC-7, Parth Amin wrote:
Hello,
Can anyone suggest me how to master android layouts, views
It would be very helpful to have the *actual* error message. Most
probably, though, your workspace has been corrupted. The simplest thing to
do is to delete it, since it probably doesn't have much in it yet. By
default, I believe, it is in ~/Documents/eclipse
G. Blake Meike
Marakana
, somewhere,
with absolutely nothing in it except the .metadata file. The actual
projects live in some other directory tree, not rooted at the workspace.
That means that you can delete, copy, or use an alternate workspace
independent of the projects visible from it.
G. Blake Meike
Marakana
above has to be in your apk. All of it has to be
correctly translated from java byte codes into Dalvik byte codes.
I think your first step should be to look in your apk and see what is
there. Verify that the libs you know about, at least, are in there and are
dex files.
G. Blake Meike
Do you have more information on this problem? I tried to reproduce it and
could not do so. The following works as I would expect, parsing correct
XML and generating error messages on malformed XML on emulators running ICS
(4.0.4) and HC (3.2).
G. Blake Meike
Marakana
The second edition
available to apply to
some task that are not being used, because that task is ordered behind some
other task.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed
initialized at creation, I don't
think you'd have the problem.
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers group
If you have a concern, you probably ought to look at the bytecodes.
Honestly, I can't imagine what kind of concern there might be at this level
but, if you have one, that's the way to resolve it. I mean, this isn't
J2ME or anything...
G. Blake Meike
Marakana
The second edition of Programming
the lifecycle of the DialogFragment to the
lifecycle of the Activity?
G. Blake Meike
Marakana
The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do
--
You received this message because you are subscribed to the Google
Groups Android Developers
82 matches
Mail list logo