Re: [android-developers] Re: Displaying Google Map Android API V2 in fragment

2013-12-16 Thread Surabhi Jain
Hi VenomVendor,

I have do the same, which you have mentioned in above post.

but getting black screen on place of map :(

In LogCat, I have got successful log that my map get set with location and
marker.

when I scroll from one fragment to another at that time on next fragment it
shows blank screen on place of map.

I am not getting that what is the problem ? :(

According to Harri, If I add fragmentManager.executePendingTransactions();
after commiting fragmentTransaction.

Then it throws exception:
*java.lang.IllegalArgumentException: No view found for id 0x7f0601e7
(com.abcd:id/map) for fragment MapFragment{419b5f80 #0 id=0x7f0601e7}*



On Sat, Dec 14, 2013 at 5:08 PM, VenomVendor™ yoganandh2...@gmail.comwrote:

 Hi,
 I have done same task, adding Map inside fragment, where fragment is
 placed inside ViewPager.

 public class Map extends Fragment {

 /** The view. */
 private static View view;

 /** The g map. */
 private static GoogleMap gMap;

 /** The bangalore. */
 private final LatLng BANGALORE = new LatLng(12.971689, 77.594504);

 /** The zoom. */
 private float zoom = 11.0f;

 @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,
 Bundle savedInstanceState) {
 if (container == null) {
 return null;
 }

 if (view != null) {
 ViewGroup parent = (ViewGroup) view.getParent();
 if (parent != null)
 parent.removeView(view);
 }
 try {
 view = inflater.inflate(R.layout.map, container, false);
 setUpMapIfNeeded();
 } catch (InflateException e) {
 // Log.wtf(S*, e.getMessage());
 }
 return view;
 }

 @Override
 public void onViewCreated(View view, Bundle savedInstanceState) {
 gMap = null;
 if (gMap != null)
 setUpMap();

 if (gMap == null) {
 gMap = ((SupportMapFragment)
 this.getActivity().getSupportFragmentManager()
 .findFragmentById(R.id.mapd)).getMap();
 if (gMap != null)
 setUpMap();
 }
 }

 /* Sets up the map if it is possible to do so */
 public void setUpMapIfNeeded() {

 if (gMap == null) {
 gMap = ((SupportMapFragment)
 getActivity().getSupportFragmentManager()
 .findFragmentById(R.id.mapd)).getMap();
 if (gMap != null)
 setUpMap();
 }
 }

 /**
  * This is where we can add markers or lines, add listeners or move
 the
  * camera.
  * p

  * This should only be called once and when we are sure that {@link
 #gMap}
  * is not null.
  */
 private void setUpMap() {
 gMap.addMarker(new MarkerOptions().position(BANGALORE).title(My
 Home)
 .snippet(Home Address));
 gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(BANGALORE,
 zoom));
 }

 /
  * The mapfragment's id must be removed from the FragmentManager or
 else if
  * the same it is passed on the next time then app will crash
  /
 // @Override
 // public void onDestroyView() {
 // super.onDestroyView();
 // FragmentManager fm = getActivity().getSupportFragmentManager();
 // Fragment fragment = (fm.findFragmentById(R.id.mapd));
 // FragmentTransaction ft = fm.beginTransaction();
 // ft.remove(fragment);
 // ft.commit();
 // }
 }



 On Thursday, 5 December 2013 14:04:28 UTC+5:30, surabhi jain wrote:

 Hi All,

 I have problem in showing Google map (API V2) in fragment.

 I am using ViewPager, inside that I have created my layout and also
 displaying map.

 I have created Map dynamically using SupportMapFragment.

 I have 3 pager (Fragment), all 3 fragments will showing map.

 When I switch to 1st fragment to 2nd fragment at that time map is not
 displaying in my 2nd fragment layout. Showing black screen. :(



 --
 Thanks  Regards
 Surabhi Jain

  --
 You received this message because you are subscribed to the Google
 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.




-- 
Thanks  Regards
Surabhi Jain

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

Re: [android-developers] Is it possible to access text messages to back up as they are received?

2013-12-16 Thread Daniel Chacon
ok, thanks now to find some time during the holidays to play around with
this app.

On Thu, Dec 12, 2013 at 9:30 PM, TreKing treking...@gmail.com wrote:


 On Thu, Dec 12, 2013 at 8:46 AM, Daniel Chacon cuban...@gmail.com wrote:

 Would I use the SmsManager and SmsMessage api calls?


 Never used those facilities, but strictly based on the name, sure seems
 like a good place to start.



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

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


-- 
You received this message because you are subscribed to the Google
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.


[android-developers] Have developers ever been sued because of what their program does?

2013-12-16 Thread Tina Seaburn
I am considering writing an app for the Android Market place.  I was 
looking around Google Play and I noticed quite a few apps that provide 
various ways to spy on other people.  Sometimes they are called phone 
locator or tracker or sometimes just spy.

This sounds like fun but I was wondering if app developers ever get sued 
when someone, for instance, is killed by a stalker who was using one of 
these apps.

Has this ever happened?
Thanks,
Tina

-- 
You received this message because you are subscribed to the Google
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.


Re: [android-developers] Have developers ever been sued because of what their program does?

2013-12-16 Thread Kristopher Micinski
The short answer is that you should ask a lawyer.

I have never heard of an app writer being sued for this kind of app,
but I wouldn't be surprised if their had been a lawsuit. In the US you
can sue someone for a pretty huge array of things.

It's probably pretty safe to assume that the answer to can I get
sued is probably yes if you're dealing with private information,
whether the suit would or would not be thrown out depends on the
situation, locale, entity, etc... That being said, nobody here can
give you legal advice.  I've definitely heard of app writers being
sued for things like patent infringement  (I mean, app writers
continue to get sued by Lodsys!).

Kris

On Mon, Dec 16, 2013 at 1:49 PM, Tina Seaburn
tinamarieseab...@gmail.com wrote:
 I am considering writing an app for the Android Market place.  I was looking
 around Google Play and I noticed quite a few apps that provide various ways
 to spy on other people.  Sometimes they are called phone locator or
 tracker or sometimes just spy.

 This sounds like fun but I was wondering if app developers ever get sued
 when someone, for instance, is killed by a stalker who was using one of
 these apps.

 Has this ever happened?
 Thanks,
 Tina

 --
 You received this message because you are subscribed to the Google
 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.

-- 
You received this message because you are subscribed to the Google
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.


[android-developers] Re: WeakReference containing callback interface

2013-12-16 Thread Doug
I don't know what AndroidQuery does for you exactly, but there is a general 
rule about how callbacks for asynchronous callbacks can work without 
leaking.  If you need to hold a reference to anything at all related the 
activity or UI that needs to be updated as a result of some async work, 
hold only a weak reference to that object, and check it for null before 
doing anything with it.  Also, don't define you callbacks as non-static 
inner classes in your activities, or the callback object will be implicitly 
holding a strong ref to the enclosing object (the activity) that will 
prevent it from being gc before the work ever ends.

It doesn't make sense for the callbacks themselves to be held as weak 
references.  The thing performing the work needs to hold the callbacks 
strongly since that may be the only reference to them at any moment.

Also, consider Picasso if you're trying to do async image loading.

Doug

On Wednesday, December 11, 2013 6:43:56 AM UTC-8, TheNetStriker wrote:

 I've got a question regarding WeakReferences in Android. I'am using 
 AndroidQuery in my app to load images asynchronous. I've modified the 
 AndroidQuery source a bit, so that it is also able to send progress 
 callbacks so that I can update the progressbars in my notifications. The 
 problem is that the progress object in AndroidQuery is referenced as 
 a WeakReference so that references to progressbars which are no longer 
 visible on the UI are getting garbage collected. The problem now that 
 AndroidQuery works with an ExecutorService and that my callback objects 
 also are getting garbage collected when the Runnable has to wait for its 
 execution. I could change the WeakReference to a hard one to fix this 
 proboem, but then I would have memory leaks when referencing progressbars 
 directly. Here is how I pass the callback interface to AndroidQuery:

 aq.progress(new ProgressCallback() { 
 @Override
 public void setProgress(final int progress) {
  //update progressbar
 }
  @Override
 public void setMax(int max, int progress) {
  //update progressbar
 }
 })

 Is there a way to pass such a callback object without loosing the 
 reference when it is referenced inside an WeakReference object?


-- 
You received this message because you are subscribed to the Google
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.


Re: [android-developers] Google Drive says Action Bars on the bottom are ok?

2013-12-16 Thread Nathan


On Sunday, December 15, 2013 6:29:11 PM UTC-8, Ken wrote:



 On Saturday, December 14, 2013 7:46:18 PM UTC-5, Douglas Drumond wrote:

 split action bar?
 https://developer.android.com/guide/topics/ui/actionbar.html#SplitBar


 Yep, you can do it w/ that, but what Google's doing in their apps is 
 something else...it's actually another panel that shifts up when you scroll 
 around.

 They are probably trying out a new design pattern that isn't a pattern 
yet.  
 

 Still, I think the split action bar isn't really recommended.  


I haven't gotten much leverage out of the split action bar. I'd hoped I 
could put more icons there to avoid the options menu, but no, it just moves 
them to the bottom. 

I guess the advantage of multiple design standards is that you can pick the 
one you like. 

The design pattern I am hating the most at the moment is the options menu. 
In a way, its worse than the menu button from 2X days, because it is 
broken. The options menu icon won't show when the user has a menu button. 
Users have no idea that they have one, particularly because Samsung has 
made them obscure and mysterious and dark until pressed. If users couldn't 
find the menu button when it stuck up and said MENU, they aren't going to 
find it now.  

I may be tempted to try the hamburger menu, I mean navigation drawer. You'd 
have to train users to click on it, but then, you would have to do that 
with the options menu. 

Nathan

-- 
You received this message because you are subscribed to the Google
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.


[android-developers] Re: Displaying Google Map Android API V2 in fragment

2013-12-16 Thread VenomVendor™
Black screen, 
1. Your are not adding mapv2 correctly.  Visit 
http://venomvendor.blogspot.com/2013/04/getting-started-with-google-mapv2-for.html
2. If you are getting Maps for the first time  not getting another time, 
i.e after switching between fragments, your are encountering this bug. 
http://code.google.com/p/gmaps-api-issues/issues/detail?id=4639
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4659
http://stackoverflow.com/q/18533433/1008278

If it;s case 2, then you have something wrong in your code, cox, am getting 
maps when i switch between fragments.

-- 
You received this message because you are subscribed to the Google
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.