[android-developers] Re: Scenario where initLoader() does not call onLoadFinished()

2015-01-11 Thread Tobias Fuss
Hello Rainer, 
currently struggling with the same issue and already tried nearly every 
possible solution out there (besides using the SupportLoaderManager)
Your solution does not work in my case, after configuration change i still 
get no onLoadFinished-callback and therefore the data-field stays empty. 
.
I'm using an activity with a single fragment that contains all the 
loader-stuff in onActivityCreated (also tried this in other lifecycle 
methods), any other solutions found in the meantime? (API 21, Lollipop)
Thanks in advance

Am Donnerstag, 4. Juli 2013 20:16:41 UTC+2 schrieb Rainer:

 Etienne, your solution is nearly correct. This is the working solution

 public static T void initLoader(final int loaderId, final Bundle args, 
 final LoaderCallbacksT callbacks,
 final LoaderManager loaderManager) {
 final LoaderT loader = loaderManager.getLoader(loaderId);
 if (loader != null  loader.isReset()) {
 loaderManager.restartLoader(loaderId, args, callbacks);
 } else {
 loaderManager.initLoader(loaderId, args, callbacks);
 }}


 On Friday, July 27, 2012 12:00:17 AM UTC+2, Etienne wrote:

 Actually it should be:

 Loader loader = getLoaderManager().getLoader(-1);
 if (loader != null  !loader.isReset()) {
   getLoaderManager().restartLoader(-1, null, this);
 } else {
   getLoaderManager().initLoader(-1, null, this);
 }


 You should only restart the loader if the loader is NOT reset.  So the 
 second condition in the if condition changes to the negated version.  I got 
 this to work for me.


 On Thursday, January 12, 2012 10:47:58 PM UTC-8, David Wu wrote:

 Hi there, 

 I ran into a very similar problem and solved it by replacing the 
 following line in onActivityCreate() 

 getLoaderManager().initLoader(0, getArguments(), this); 

 to 

 Loader loader = getLoaderManager().getLoader(0); 
 if ( loader != null  loader.isReset() ) { 
 getLoaderManager().restartLoader(0, getArguments(), this); 
 } else { 
 getLoaderManager().initLoader(0, getArguments(), this); 
 } 


 Not sure if it addresses your problem.  I hope it helps. 


 On Dec 13 2011, 3:29 pm, kaciula catalin.moro...@gmail.com wrote: 
  As I said, the initial bugs were fixed by revision 4 of ACL. However, 
 there 
  is still a bug present in both the ACL and Android. I've tested it 
 with 
  Android version 3.2 and 4.0. Check out the updated project athttps://
 github.com/kaciula/BugRetain 
  
  I think this is a pretty important bug. The scenario is this: From 
 activity 
  A, go to activity B, switch once the orientation and go back to 
 activity A. 
  As a consequence of this bug, I can't write an app with fragments that 
 use 
  setRetainInstance and is available in both orientations. I really need 
 a 
  workaround until the Android guys fix the issue. Thoughts?



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


[android-developers] Proxy support for ALL apps (when?)

2013-05-02 Thread Tobias Fuss
Hey guys, 
one of the most important features for using android devices at 
universities, companys, governments etc. is still missing in android!

*It's proxy support (with authentication) for ALL apps and not just the 
browser...*

There are a few issue-threads on google code (
https://code.google.com/p/android/issues/detail?id=36481, 
https://code.google.com/p/android/issues/detail?id=35930), where many 
people beg for proxy support, but no one seems to care about!
So i opened up this thread to gain some more attention on this issue and i 
hope it will finally be integrated into the next version of android, that 
will be presented at google io 2013.

I really hope, that some folks from google (eg. JBQ) read this and pass it 
over to their developers, if not already done...
This feature is essential for some of us, and it's sad to see that iOS has 
support since 4.3 (it's just one simple checkbox labeled Use this proxy 
for all apps), while android still doesn't!

I'm sure this isn't a big deal for the great devs at google, so please 
finally implement it, we really need this in android 4.3.

PS: none of the root solutions (eg. proxy droid) worked for me and this 
must be possible WITHOUT root, as rooting your device is not allowed at 
some companies etc.

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