<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Android location provider mock</title>
	<atom:link href="http://pedroassuncao.com/2009/11/android-location-provider-mock/feed/" rel="self" type="application/rss+xml" />
	<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/</link>
	<description>Thoughts on technology, skydiving, life, and the universe...</description>
	<lastBuildDate>Wed, 04 Jan 2012 17:34:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: How can can I override the Android system service LocationManager (GPS) for select applications? &#124; Software development support, software risk,bugs for bugs, risk analysis,</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-28337</link>
		<dc:creator>How can can I override the Android system service LocationManager (GPS) for select applications? &#124; Software development support, software risk,bugs for bugs, risk analysis,</dc:creator>
		<pubDate>Wed, 30 Nov 2011 00:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-28337</guid>
		<description>[...] searching has led me to the closest solution here: http://pedroassuncao.com/2009/11/android-location-provider-mock/ where there is code that feeds GPS data directly into the LocationManager. However, I see no way of [...]</description>
		<content:encoded><![CDATA[<p>[...] searching has led me to the closest solution here: <a href="http://pedroassuncao.com/2009/11/android-location-provider-mock/" rel="nofollow">http://pedroassuncao.com/2009/11/android-location-provider-mock/</a> where there is code that feeds GPS data directly into the LocationManager. However, I see no way of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nocivus</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-14700</link>
		<dc:creator>nocivus</dc:creator>
		<pubDate>Tue, 30 Aug 2011 08:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-14700</guid>
		<description>Hi pbc,I wish i could help but, unfortunately, i haven&#039;t worked on android for quite some time now :(Best of luck.Pedro </description>
		<content:encoded><![CDATA[<p>Hi pbc,I wish i could help but, unfortunately, i haven&#039;t worked on android for quite some time now <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> Best of luck.Pedro</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pbc</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-13723</link>
		<dc:creator>pbc</dc:creator>
		<pubDate>Tue, 16 Aug 2011 21:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-13723</guid>
		<description>Nocivus &amp; Paul, 
Thanks for sharing.   
I am working a project where I am trying to use mock locations to simulate a driving route in Google&#039;s Navigation application. Do you guys have experience with anything similar?  I can get the mock location to show up on the map but the Nav app will not recalculate the route without the GPS signal.  Just wondering if anyone had any thoughts on how to fake the application into thinking that the mock location is the GPS signal.  I&#039;m using  
String mocLocationProvider = LocationManager.GPS_PROVIDER; 
locationManager.addTestProvider(mocLocationProvider, false, false, 
false, false, true, true, true, 0, 5); 
locationManager.setTestProviderEnabled(mocLocationProvider, true); 
locationManager.requestLocationUpdates(mocLocationProvider, 0, 0, this); 
but still no luck. Any help would be appreciated.  Thanks.</description>
		<content:encoded><![CDATA[<p>Nocivus &amp; Paul,<br />
Thanks for sharing.<br />
I am working a project where I am trying to use mock locations to simulate a driving route in Google&#039;s Navigation application. Do you guys have experience with anything similar?  I can get the mock location to show up on the map but the Nav app will not recalculate the route without the GPS signal.  Just wondering if anyone had any thoughts on how to fake the application into thinking that the mock location is the GPS signal.  I&#039;m using<br />
String mocLocationProvider = LocationManager.GPS_PROVIDER;<br />
locationManager.addTestProvider(mocLocationProvider, false, false,<br />
false, false, true, true, true, 0, 5);<br />
locationManager.setTestProviderEnabled(mocLocationProvider, true);<br />
locationManager.requestLocationUpdates(mocLocationProvider, 0, 0, this);<br />
but still no luck. Any help would be appreciated.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-13463</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 15 Jul 2011 18:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-13463</guid>
		<description>Hey, 
 
thanks for sharing this code. It was a great solution to test my GPS enabled Android app, because the emulator isn&#039;t working well for me (my application uses rather big digital maps in Bitmap format and the emulator keeps crashing). 
 
I rewrote the code to make better use of the AsyncTask class. It provides a better way to control the Thread once it is started and also provides support for orientation changes (savedInstanceState). 
 
You can download the code here:  &lt;a href=&quot;http://www.cowlumbus.nl/forum/MockGpsProvider.zip&quot; rel=&quot;nofollow&quot;&gt;http://www.cowlumbus.nl/forum/MockGpsProvider.zip&lt;/a&gt; 
 
Probably the easiest way to compile it is to extract the ZIP and then use the &#039;Import &gt; General &gt; Exisiting Projects into Workspace&#039; Eclipse function. Browse to the folder and click Finish. 
 
Paul </description>
		<content:encoded><![CDATA[<p>Hey, </p>
<p>thanks for sharing this code. It was a great solution to test my GPS enabled Android app, because the emulator isn&#039;t working well for me (my application uses rather big digital maps in Bitmap format and the emulator keeps crashing). </p>
<p>I rewrote the code to make better use of the AsyncTask class. It provides a better way to control the Thread once it is started and also provides support for orientation changes (savedInstanceState). </p>
<p>You can download the code here:  <a href="http://www.cowlumbus.nl/forum/MockGpsProvider.zip" rel="nofollow">http://www.cowlumbus.nl/forum/MockGpsProvider.zip</a> </p>
<p>Probably the easiest way to compile it is to extract the ZIP and then use the &#039;Import &gt; General &gt; Exisiting Projects into Workspace&#039; Eclipse function. Browse to the folder and click Finish. </p>
<p>Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nocivus</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-10358</link>
		<dc:creator>nocivus</dc:creator>
		<pubDate>Tue, 22 Mar 2011 12:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-10358</guid>
		<description>Hi Palban, unfortunately i don&#039;t have that code anymore, but i&#039;m sure if you google for android examples you can wire something together ;) </description>
		<content:encoded><![CDATA[<p>Hi Palban, unfortunately i don&#039;t have that code anymore, but i&#039;m sure if you google for android examples you can wire something together <img src='http://pedroassuncao.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: palban</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-10357</link>
		<dc:creator>palban</dc:creator>
		<pubDate>Tue, 22 Mar 2011 12:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-10357</guid>
		<description>Hi nocivus, 
can u please mail me the full source code? 
webdiskproject@gmail.com </description>
		<content:encoded><![CDATA[<p>Hi nocivus,<br />
can u please mail me the full source code?<br />
<a href="mailto:webdiskproject@gmail.com">webdiskproject@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beefheart</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-8503</link>
		<dc:creator>Beefheart</dc:creator>
		<pubDate>Sat, 22 Jan 2011 15:07:43 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-8503</guid>
		<description>Thanks for that code. It just saved me hours. </description>
		<content:encoded><![CDATA[<p>Thanks for that code. It just saved me hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nocivus</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-5923</link>
		<dc:creator>nocivus</dc:creator>
		<pubDate>Thu, 23 Sep 2010 13:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-5923</guid>
		<description>Hi Sridhar, 
 
keep in mind that this is old code (don&#039;t recall if android 1.6 or 2.0) so it&#039;s very likely that it has changed in the meantime. 
 
That being said, what i posted is pretty much all the code. The rest is just wiring that you should be able to put together from any simple android project tutorial. </description>
		<content:encoded><![CDATA[<p>Hi Sridhar, </p>
<p>keep in mind that this is old code (don&#039;t recall if android 1.6 or 2.0) so it&#039;s very likely that it has changed in the meantime. </p>
<p>That being said, what i posted is pretty much all the code. The rest is just wiring that you should be able to put together from any simple android project tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sridhar</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-5904</link>
		<dc:creator>sridhar</dc:creator>
		<pubDate>Thu, 23 Sep 2010 01:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-5904</guid>
		<description>public class MockLocationProvider extends Thread { 
    private LocationManager locationManager; 
    private String mocLocationProvider; 
    public MockLocationProvider(LocationManager locationManager, 
            String mocLocationProvider) { 
        this.locationManager = locationManager; 
        this.mocLocationProvider = mocLocationProvider; 
            } 
 
    @Override 
    public void run() { 
                     
            Double latitude = 17.408305; 
            Double longitude = 78.465729; 
                        Location location = new Location(mocLocationProvider); 
            location.setLatitude(latitude); 
            location.setLongitude(longitude); 
                                 location.setTime(System.currentTimeMillis()); 
 
            locationManager.setTestProviderLocation(mocLocationProvider, 
                    location); 
        } 
    } 
 </description>
		<content:encoded><![CDATA[<p>public class MockLocationProvider extends Thread {<br />
    private LocationManager locationManager;<br />
    private String mocLocationProvider;<br />
    public MockLocationProvider(LocationManager locationManager,<br />
            String mocLocationProvider) {<br />
        this.locationManager = locationManager;<br />
        this.mocLocationProvider = mocLocationProvider;<br />
            } </p>
<p>    @Override<br />
    public void run() { </p>
<p>            Double latitude = 17.408305;<br />
            Double longitude = 78.465729;<br />
                        Location location = new Location(mocLocationProvider);<br />
            location.setLatitude(latitude);<br />
            location.setLongitude(longitude);<br />
                                 location.setTime(System.currentTimeMillis()); </p>
<p>            locationManager.setTestProviderLocation(mocLocationProvider,<br />
                    location);<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sridhar</title>
		<link>http://pedroassuncao.com/2009/11/android-location-provider-mock/comment-page-1/#comment-5903</link>
		<dc:creator>sridhar</dc:creator>
		<pubDate>Thu, 23 Sep 2010 01:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://diffract.me/?p=578#comment-5903</guid>
		<description>i used following code instead of reading from file i set the latitude and logitude directly..But it didnt worked for me(in google maps i didnt see any blinking).. 
 
public class GpsLocation extends Activity implements LocationListener { 
    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
 
super.onCreate(savedInstanceState); 
setContentView(R.layout.main); 
 
//((TextView) this.findViewById(R.id.textView)).setText(&quot;Something else&quot;); 
 
 
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); 
 
String mocLocationProvider = LocationManager.GPS_PROVIDER; 
locationManager.addTestProvider(mocLocationProvider, false, false, 
false, false, true, true, true, 0, 5); 
locationManager.setTestProviderEnabled(mocLocationProvider, true); 
locationManager.requestLocationUpdates(mocLocationProvider, 0, 0,this); 
 
 
 
new MockLocationProvider(locationManager, mocLocationProvider).start(); 
 
 
} 
 
 
} </description>
		<content:encoded><![CDATA[<p>i used following code instead of reading from file i set the latitude and logitude directly..But it didnt worked for me(in google maps i didnt see any blinking).. </p>
<p>public class GpsLocation extends Activity implements LocationListener {<br />
    /** Called when the activity is first created. */<br />
    @Override<br />
    public void onCreate(Bundle savedInstanceState) { </p>
<p>super.onCreate(savedInstanceState);<br />
setContentView(R.layout.main); </p>
<p>//((TextView) this.findViewById(R.id.textView)).setText(&quot;Something else&quot;); </p>
<p>LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); </p>
<p>String mocLocationProvider = LocationManager.GPS_PROVIDER;<br />
locationManager.addTestProvider(mocLocationProvider, false, false,<br />
false, false, true, true, true, 0, 5);<br />
locationManager.setTestProviderEnabled(mocLocationProvider, true);<br />
locationManager.requestLocationUpdates(mocLocationProvider, 0, 0,this); </p>
<p>new MockLocationProvider(locationManager, mocLocationProvider).start(); </p>
<p>} </p>
<p>}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

