[android-developers] Auto update of an App after manual installation directly on the phone?

2016-02-04 Thread Danny D
One way I've solved this is to have your app check the version (either against your server by other means), then open the Play-Store app with an intent directing it to your app listing there. To the user, it looks just as if they had navigated there themselves. If I remember, there's a way to

Re: [android-developers] ContentProvider contains dirty data from a previous JUnit test

2014-02-24 Thread Danny D
I haven't tested with the MockContentProvider, but I'm pretty sure that you just need to create one in the JUnit setup() routine and clear it in the teardown(). Make it a member of the JUnit class. I saw several detailed posts after doing a Google search, have a look

Re: [android-developers] ContentProvider contains dirty data from a previous JUnit test

2014-02-23 Thread Danny D
As I read your reply, I'm confused now about what's being tested. Are you testing the ContentProvider or the Activity? If testing the Activity, it may be better to create a MockContentProvider that's responsible for providing back the info. If testing the ContentProvider, skip the Activity

[android-developers] ContentProvider contains dirty data from a previous JUnit test

2014-02-22 Thread Danny D
Is the object instance for the content provider different between test runs? How are you destroying and recreating the ContentProvider? I suspect that if the Application instance is the same between test runs the ContentProvider might be too. It's created at the Application level through the

[android-developers] How does Manifest recognize the particular activity as a main or first activity in android?

2014-02-18 Thread Danny D
The Activity that is launched is determined by the incoming Intent and the various IntentFilters you have configured in your manifest. The intent filter that you have set there in the manifest channels the launch intents to your 'Main' Activity. Try moving the entire intent filter block from

[android-developers] RSS feed parsing multiple images with SAX parser for same nodes/parameters

2013-12-24 Thread Danny D
Not 100℅ understanding your question. How familiar with SAX are you? You should be handling the start element and end element for each imageurl, put them into a list of either String or URL or URI objects. For the latter two, you'll need to add the host and any path stuff. There are lots of

[android-developers] Connect android device to local server

2013-05-15 Thread Danny D
I've done this many times, my typical setup is to have the handset connect to our office LAN through the wireless. You'll need to get the local address of the server, most WiFi access points will give you a listing of devices that they are routing for. I've also used Dynamic DNS services to

[android-developers] Re: [Socket/Client-Server communication ] how to verify if url and port is working fine

2013-04-08 Thread Danny D
Depending on what you want to test, there many different tools. Here are some suggestions based on what I've used in the past. Testing that the server works, try a browser as described above for really basic yes/no test. If the data isn't HTML or JSON/XML, you might just use wireshark to see

[android-developers] Parallel download images from different fragment

2013-04-03 Thread Danny D
I generally don't prefer loading images directly from the Fragment/Activity, because I typically use the images multiple places throughout the app and don't want the user to pay for the same data twice. General solution: setup a Singleton image cache like described in the docs, along with an

[android-developers] Re: How can I get notified when the server has closed the TCP connection

2013-04-02 Thread Danny D
I absolutely agree with putting the 'smarts' at the application level instead of relying on various flags and events from the TCP/IP layer. What interested me in this thread was your process / equipment control via the handset. As a safety mechanism, any equipment should go immediately into a

[android-developers] Re: Automatied Environment for Android Building and Testing

2013-02-21 Thread Danny D
I agree with Mark's comment. Jenkins has plug ins for all this. I got from zero to working automated build system in something like two days. Hardest part was getting the SVN pull working correctly. Getting EMMA configured right was also a little tough, but once done it's 100% hands-off.

[android-developers] using IP address 10.0.2.2 for android simulator works, but how do I point to localhost when testing on android device?

2013-01-05 Thread Danny D
I use the office WiFi without any trouble. Development machine is setup with a local 192... address, the hansdet will get another local address on the same subnet. I just direct requests to the development machine's address and everything works great. Debug through ADB is still by USB

[android-developers] Re: Problem while updating adapter from AsyncTask

2012-11-04 Thread Danny D
I'm pretty sure that you're going to need to do these updates through the runOnUiThread() method. Here's an example of how I typically notify the list adapter/view /etc. Basically, if I think that there's any chance of cross thread problems, opt for the runOnUiThread() @Override

[android-developers] ActivityUnitTestCase and sendKeys()

2012-04-27 Thread Danny D
Can anyone please quickly confirm that ActivityUnitTestCase and sendKeys() DO work as the Android Developer docs describe. I've searched through a number of threads on this topic and I'm getting conflicting info. I've run through the Spinner and SpinnerTest samples, and the call to sendKeys()

[android-developers] Re: Modify a textview value in a custom listview after clicking

2012-03-26 Thread Danny D
Does the no modification rule apply to moving the views around? I've got a ListView object, where I'm using the TouchListView.java adaption to allow the user to resort the items Does this movement qualify as a modification? I'm performing data changes within the Adapter, but the actual view

[android-developers] Re: httpclient post - debug the request?

2012-03-25 Thread Danny D
Hey Paul, I've had good luck with the TCP Monitor that's built into Eclipse. That seems to work really well for me. I've been debugging from one instance of Eclipse with the Android debugger against another instance of Eclipse running my servlet code in Tomcat. I've been able to use the TCP

[android-developers] Best way to update location of OverlayItem

2011-08-17 Thread Danny D
I'm writing an application that will have lots of map points, using the Google Maps API. The locations of my OverlayItems will be moving and changing, so I'd like input on best approach to take to update the new locations of the points as they move. I think that I have only two options (correct

[android-developers] Re: KML Layers on Google Maps

2011-06-30 Thread Danny D
I don't believe that you can just pass the KML file to maps, at least I have not seen a way to do this. I am currently doing something similar, and I think you will need to draw the polygon manually on the canvas. As I'm approaching the problem, the individual OverlayItem (or child class derived

[android-developers] OverlayItem Parcelable?

2011-06-26 Thread Danny D
Hi, Is the Maps API class OverlayItem parcelable? If not, can I extend the OverlayItem class and add my own implementation of Parcelable (for my extended data) and have it function correctly? Thanks. -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Use of the Resource reference ? when setting widget attributes.

2011-06-08 Thread Danny D
Hi, I'm trying to set a widget's style attribute with a reference to a custom attribute that's been loaded with a real-concrete style. The Android SDK docs show an explicit example for just setting the textColor attribute based on a style reference: EditText id=text

[android-developers] Re: Use of the Resource reference ? when setting widget attributes.

2011-06-08 Thread Danny D
Thanks Kostya, I think I'm doing pretty much what you said (I'll check again), I'm trying to use the ?foo reference to dynamically set the style of an individual view or view-group. 1) I've created my own fixed styles, there are three of these. I want to select one of the three by setting the

[android-developers] Re: Use of the Resource reference ? when setting widget attributes.

2011-06-08 Thread Danny D
I think that may be where we're getting mixed up. I've created a style tree that follows the SDK recommendations like this. It follows inheritance, using the . notation, just like the examples in the SDK MyCompanyStyle | MyCompanyStyle.Header | | | MyCompanyStyle.Header.Bold |

[android-developers] Switching styles and themes

2011-06-02 Thread Danny D
I've setup my widgets to all reference a style/theme that I've created in styles.xml, the individual buttons look something like this: !--BUTTONS -- LinearLayout style=@style/CustomSetupWizard.ControlBackground android:id=@+id/LL2 Button style=@style/CustomButton.Cancel

[android-developers] Finding ant_rules_r3.xml?

2011-03-30 Thread Danny D
Hi, I'm working on a continuous integration system (Hudson) and I'm trying to debug some existing build configurations. I'm looking for the ant_rules_r3.xml file that's described in a number of posts and trying to determine how it's configured. I'm not finding these in any of the android-sdk