Skip to main content



      Home
Home » Newcomers » Newcomers » WCF Services
WCF Services [message #869690] Thu, 03 May 2012 16:39 Go to next message
Eclipse UserFriend
Hi all,

I am new to the Eclipse/Android world. I have been developing in C# and VB.NET for some time and coming from a Microsoft Visual Studio to an Eclipse environment I think will be challenging. C# and Java are very similar, however.

Anyway, my question is this.

I am developing my first android application, which will be using web services to retrieve data from SQL. I found some articles on the Internet and followed them through; however, when I debug the android application, it does not seem to work. I followed this walk through.

fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx

The line that fails is the one below.

HttpResponse result = httpClient.execute(request);

Any help would be appreciated.

Thanks in advance.
Re: WCF Services [message #869905 is a reply to message #869690] Fri, 04 May 2012 13:53 Go to previous messageGo to next message
Eclipse UserFriend
O.K found the solution by doing some internet searching. The code below needed to be added to the "onCreate" event.

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//This code needed to be added here.
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.build());

}

Hope this helps somebody facing the same issue.
Re: WCF Services [message #869976 is a reply to message #869905] Sat, 05 May 2012 07:59 Go to previous message
Eclipse UserFriend
On 05/04/2012 11:53 AM, Jose Ortega wrote:
> O.K found the solution by doing some internet searching. The code below
> needed to be added to the "onCreate" event.
>
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> //This code needed to be added here.
> StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
> .detectDiskReads() .detectDiskWrites() .detectNetwork() .penaltyLog()
> .build()); }
>
> Hope this helps somebody facing the same issue.
Except that this isn't an Android support forum. Your post would likely
help someone if it were on stackoverflow or one of the Android forums.
Previous Topic:any gui window in open view
Next Topic:java disappeared after being there for some days
Goto Forum:
  


Current Time: Fri Jul 04 03:05:27 EDT 2025

Powered by FUDForum. Page generated in 0.55989 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top