Search Results

Search found 25798 results on 1032 pages for 'android xml'.

Page 121/1032 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Android: Retrieving Password via registered Email on My Server

    - by Raghavan'G'
    i am working on retrieving password to the user when he submits his mail id that he registered on my server. I need to check whether he entered correct registered id and give him response by sending password to his corresponding mail and set dialog as password sent to your mail or if he entered wrong mail id i have to show mail id not registered... Any Idea? This is my code... package com.soap; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText public class Register extends Activity { /** Called when the activity is first created. */ // static Spinner operator = null; private static final String SOAP_ACTION = "......"; private static final String METHOD_NAME = "......"; private static final String NAMESPACE = "......"; private static final String URL = "My site"; private static final String TAG = "HELLO"; Thread t; ProgressDialog dialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.forgotpasswordpage); Button signin = (Button) findViewById(R.id.fpwdsubmit); signin.setOnClickListener(new OnClickListener() { public void onClick(View v) { showDialog(0); t = new Thread() { public void run() { register(); } }; t.start(); } }); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case 0: { dialog = new ProgressDialog(this); dialog.setMessage("Please wait while connecting..."); dialog.setIndeterminate(true); dialog.setCancelable(true); return dialog; } } return null; } public void register() { Log.v(TAG, "Trying to Login"); EditText etxt_user = (EditText)findViewById(R.id.fpedtext); String email_id = etxt_user.getText().toString(); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("Email", email_id); Pattern EMAIL_ADDRESS_PATTERN =Pattern.compile( "[a-zA-Z0-9\\+\\.\\_\\%\\-\\+]{1,256}" + "\\@" + "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" + "(" + "\\." + "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" + ")+"); Matcher matcher = EMAIL_ADDRESS_PATTERN.matcher(email_id); if(matcher.matches()){ Log.v(TAG, "Your email id is valid ="+email_id); // System.out.println("Your email id is valid ="+email); } else{ // System.out.println("enter valid email id"); Log.v(TAG, "enter valid email id" ); } SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet = true; soapEnvelope.setOutputSoapObject(request); HttpTransportSE aht = new HttpTransportSE(URL); try { aht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); aht.call(SOAP_ACTION, soapEnvelope); SoapObject resultsRequestSOAP = (SoapObject) soapEnvelope.bodyIn; Log.v("TAG", String.valueOf(resultsRequestSOAP)); } catch (Exception e) { e.printStackTrace(); } } }

    Read the article

  • Is there an Android remote app compatible with LibreOffice Impress under Ubuntu?

    - by WarriorIng64
    I have an upcoming presentation I want to make in LibreOffice Impress on my Ubuntu 12.10 laptop. I was wondering if I could get ahold of an Android app which would act like a remote control, allowing me to switch between slides from my phone over WiFi without having to stay near the laptop (I've been told I need to move around more during my presentations). A quick look on the Google Play store seemed to turn up a handful of PowerPoint remote apps for Windows or maybe Mac. I also took a look at Can an Android phone control Ubuntu like a remote?, but that seems more for controlling an Ubuntu media center. Is there anything which will work with LibreOffice Impress on Ubuntu? My phone is a Samsung Galaxy Precedent on Straight Talk, running Android 2.2.2 (latest available version from the carrier). It's not rooted, and there's not much memory on it either, so the smaller and simpler the app the better. Also, it has to be free because I currently don't have a means to pay for an app I may/may not like.

    Read the article

  • How do I make the jump from developing for Android to Windows Phone 7?

    - by Rob S.
    I'm planning on making the jump over from developing apps for Android to developing apps for Windows Phone 7 as well. For starters, I figured I would port over my simplest app. The code itself isn't much of a problem as the transition from Java to C# isn't that bad. If anything, this transition is actually easier than I expected. What is troublesome is switching SDKs. I've already compiled some basic Windows Phone 7 apps and ran through some tutorials but I'm still feeling a bit lost. For example, I'm not sure what the equivalent of a ScrollView on Android would be on Windows Phone 7. So does anyone have any advice or any resources they can offer me to help me make this transition? Additionally, any comments on the Windows Phone 7 app market (especially in comparison to the Android market) would also be greatly appreciated. Thank you very much in advance for your time.

    Read the article

  • How do I make the jump from Android to Windows Phone 7?

    - by Rob S.
    I'm planning on making the jump over from developing apps for Android to developing apps for Windows Phone 7 as well. For starters, I figured I would port over my simplest app. The code itself isn't much of a problem. The transition from Java to C# isn't that bad. It's actually easier than I expected. What is troublesome is switching SDKs. I've already compiled some basic Windows Phone 7 apps and ran through some tutorials but I'm still feeling a bit lost. For example, I'm not sure what the equivalent of a ScrollView on Android would be on Windows Phone 7. So does anyone have any advice or any resources they can offer me to help me make this transition? Additionally, any comments on the Windows Phone 7 app market (especially in comparison to the Android market) would be greatly appreciated as well. Thank you very much in advance for your time.

    Read the article

  • What are the benefits of Android way of "saving memory" - explicitly passing Context objects everywhere?

    - by Sarge Borsch
    Turned out, this question is not easy to formulate for me, but let's try. In Android, pretty much any UI object depends on a Context, and has defined lifetime. It also can destroy and recreate UI objects and even whole application process at any time, and so on. This makes coding asynchronous operations correctly not straightforward. (and sometimes very cumbersome) But I never have seen a real explanation, why it's done that way? There are other OSes, including mobile OSes (iOS, for example), that don't do such things. So, what are the wins of Android way (Activities & Contexts)? Does that allow Android applications to use much less RAM, or maybe there are other benefits?

    Read the article

  • How difficult it is to develope Apps for Android and iOS? [on hold]

    - by netsetter
    I'm an experienced web developer in PHP, HTML, Javascript, MySQL, CSS and I'm running communities where people can register to be able to login and do some stuff. Now more and more people are requestion an App, I told them that I have no time and experience to develope Apps with many functions for such complex communities I am running, but then the users told me what would be enough for them and this sounds already simpler to me: An app to install on Android / iOS just to be able to login (+ autologin), so they appear always online in the community when they have internet connection. Then only 1 function like a counter of new activities regarding their user account (new messages, new replies, etc..), and if they click on the app then a browser window will open to read the info at the main website. So, what you think, it will be a big thing to develope such an app for the members? Is there a big diffrence between developing for Android and iOS? How to test the App if you don't have an Android or iOS phone in example?

    Read the article

  • Is it possible to have an app in the Play Store that will modify/change the behavior of the Gmail for Android application?

    - by Benjamin Bakhshi
    For example, is it possible for Rapportive (which works on Gmail for web), to work on Gmail for Android. I understand that the UI would be vastly different, but the question remains, is it possible at all to overlay content or change behavior of the Gmail app for android. I have done some research but cannot find the right resources that would tell me if this is possible or not on Android devices. This is a trivial question for Gmail for Web, ie. making a Chrome extension has lots of resources, and services like Rapportive manipulate Gmail apparent ease.

    Read the article

  • Change the scale-policy of OpenGL ES in Android?

    - by wanting252
    I currently develop a game for Android in OpenGL ES 1.0, use libgdx library. I target the 720x480 screen size. For example, I design only one arts pack for 720x480. And what will happen in Android phones with screen-size smaller or bigger than it, 480x320 for instance? Could you please tell me how to change the scale-policy of OpenGL ES in Android? Or in libgdx specially? Is there anything like "Resample Image" like photoshop?(Nearest Neighbor, Bilinear, Bicubic etc..) for libgdx? Edit: I found some tutorials about texture filter in OpenGL, test it with Linear and Nearest. Linear is good for scaling but slow down the game, and Nearest is on the contrary. What should I do to get a balance between those?

    Read the article

  • Should I go with Android or Try Windows Phone 7?

    - by Omnion
    I already know C# and am familiar with XNA. So it would make sense to develop for the Windows Phone 7, but would it be worth while to learn Java, get familiar with Android, and instead develop for Android devices? Android has been around longer so it would probably have a larger user base. Is it really worth it to try to develop for one of the more popular mobile platforms. (Windows Phone 7 has been out for like a month?) I haven't tried either one yet though. I'm also going to buy a phone, so this decision would probably influence the phone that I buy. (to develop/test on)

    Read the article

  • JAXB adding namespace to parent but not to the child elements contained

    - by Nishant
    I put together an XSD and used JAXB to generate classes out of it. Here are my XSDs- myDoc.xsd : <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="http://www.mydoc.org" targetNamespace="http://www.mydoc.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mtp="http://www.mytypes.com" elementFormDefault="qualified"> <xs:import namespace="http://www.mytypes.com" schemaLocation="mytypes.xsd" /> <xs:element name="myDoc"> <xs:complexType> <xs:sequence> <xs:element name="crap" type="xs:string"/> <xs:element ref="mtp:foo"/> <xs:element ref="mtp:bar"/> </xs:sequence> </xs:complexType> </xs:element> mytypes.xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.mytypes.com" xmlns="http://www.mytypes.com" xmlns:tns="http://www.mytypes.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified"> <xs:element name="foo" type="tns:Foo"/> <xs:element name="bar" type="tns:Bar"/> <xs:element name="spam" type="tns:Spam"/> <xs:simpleType name="Foo"> <xs:restriction base="xs:string"></xs:restriction> </xs:simpleType> <xs:complexType name="Bar"> <xs:sequence> <xs:element ref="spam"/> </xs:sequence> </xs:complexType> <xs:simpleType name="Spam"> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:schema> The document marshalled is- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <myDoc xmlns:ns2="http://www.mytypes.com"> <crap>real crap</crap> <ns2:foo>bleh</ns2:foo> <ns2:bar> <spam>blah</spam> </ns2:bar> </myDoc> Note that the <spam> element uses the default namespace. I would like it to use the ns2 namespace. The schema (mytypes.xsd) expresses the fact that <spam> is contained within <bar> which in the XML instance is bound to the ns2 namespace. I've broken my head over this for over a week and I would like ns2 prefix to appear in <spam>. What should I do? Required : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <myDoc xmlns:ns2="http://www.mytypes.com"> <crap>real crap</crap> <ns2:foo>bleh</ns2:foo> <ns2:bar> <ns2:spam>blah</ns2:spam><!--NS NS NS--> </ns2:bar> </myDoc>

    Read the article

  • Recursive XSD Help

    - by Alon
    Hi, i'm trying to learn a little bit XSD and I'm trying to create a XSD for this xml: <Document> <TextBox Name="Username" /> <TextBox Name="Password" /> </Document> ... so there's an element, which is an abstract complex type. Every element have elements and so on. Document and TextBox are extending Element. I trid this: <?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Document"> <xs:complexType> <xs:complexContent> <xs:extension base="Element"> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:complexType name="Element" abstract="true"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="Element" type="Element"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="TextBox"> <xs:complexContent> <xs:extension base="Element"> <xs:attribute name="Name" type="xs:string" /> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema> I compiled it to C# with Xsd2Code, and now I try to deserialize it: var serializer = new XmlSerializer(typeof(Document)); var document = (Document)serializer.Deserialize(new FileStream("Document1.xml", FileMode.Open)); foreach (var element in document.Element1) { Console.WriteLine(((TextBox)element).Name); } Console.ReadLine(); and it dosen't print anything. When I try to serialize it like so: var serializer = new XmlSerializer(typeof(Document)); var document = new Document(); document.Element1 = new List<Element>(); document.Element1.Add(new TextBox() { Name = "abc" }); serializer.Serialize(new FileStream("d.xml", FileMode.Create), document); ...the output is: <?xml version="1.0"?> <Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Element1> <Element xsi:type="TextBox"> <Element1 /> <Name>abc</Name> </Element> </Element1> </Document> When it should be: <Document> <TextBox Name="abc" /> </Document> Any ideas how to fix the xsd or another code generator? Thanks.

    Read the article

  • FragmentActivity cannot be resolve to a type

    - by Pratik
    I am starting learning for android tablet programming and I am able to updated my Eclipse as well as all new sdk for android. I have start testing application from this blog while at extending the FragmentActivity getting this error I have google it but not getting any solution. My project was created with 3.0 version having 11 level, all other packages are successfully used in the code but only this FragmentActivity was not able to resolve. Am I missing any library or any thing? My code public class Testing_newActivity extends FragmentActivity { // here the FragmentActivity getting error package not found for import /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { // If the screen is now in landscape mode, we can show the // dialog in-line so we don't need this activity. finish(); return; } if (savedInstanceState == null) { // During initial setup, plug in the details fragment. DetailsFragment details = new DetailsFragment(); details.setArguments(getIntent().getExtras()); getSupportFragmentManager().beginTransaction().add( android.R.id.content, details).commit(); } } } android manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searce.testingnew" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Testing_newActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

    Read the article

  • JAXB adding namespace to parent but not to the child elements contained

    - by Nishant
    I put together an XSD and used JAXB to generate classes out of it. Here are my XSDs- myDoc.xsd : <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="http://www.mydoc.org" targetNamespace="http://www.mydoc.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mtp="http://www.mytypes.com" elementFormDefault="qualified"> <xs:import namespace="http://www.mytypes.com" schemaLocation="mytypes.xsd" /> <xs:element name="myDoc"> <xs:complexType> <xs:sequence> <xs:element name="crap" type="xs:string"/> <xs:element ref="mtp:foo"/> <xs:element ref="mtp:bar"/> </xs:sequence> </xs:complexType> </xs:element> mytypes.xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.mytypes.com" xmlns="http://www.mytypes.com" xmlns:tns="http://www.mytypes.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified"> <xs:element name="foo" type="tns:Foo"/> <xs:element name="bar" type="tns:Bar"/> <xs:element name="spam" type="tns:Spam"/> <xs:simpleType name="Foo"> <xs:restriction base="xs:string"></xs:restriction> </xs:simpleType> <xs:complexType name="Bar"> <xs:sequence> <xs:element ref="spam"/> </xs:sequence> </xs:complexType> <xs:simpleType name="Spam"> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:schema> The document marshalled is- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <myDoc xmlns:ns2="http://www.mytypes.com"> <crap>real crap</crap> <ns2:foo>bleh</ns2:foo> <ns2:bar> <spam>blah</spam> </ns2:bar> </myDoc> Note that the <spam> element uses the default namespace. I would like it to use the ns2 namespace. The schema (mytypes.xsd) expresses the fact that <spam> is contained within <bar> which in the XML instance is bound to the ns2 namespace. I've broken my head over this for over a week and I would like ns2 prefix to appear in <spam>. What should I do? Required : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <myDoc xmlns:ns2="http://www.mytypes.com"> <crap>real crap</crap> <ns2:foo>bleh</ns2:foo> <ns2:bar> <ns2:spam>blah</ns2:spam><!--NS NS NS--> </ns2:bar> </myDoc>

    Read the article

  • AndEngine: Black screen when using LayoutGameActivity

    - by Lemuel Hogben
    I used to use SimpleBaseGameActivity for my app and everything was ok, but now I want to add some ads into the app, so I tried to use LayoutGameActivity. But I get the screen completely black and I don't know why. That's my code: public class AcGame extends LayoutGameActivity { [...] @Override protected int getLayoutID() { return R.layout.ad; } @Override protected int getRenderSurfaceViewID() { return R.id.layout_render; } @Override public EngineOptions onCreateEngineOptions() { [...] return new EngineOptions(true, ScreenOrientation.PORTRAIT_FIXED, resolution, camera); } @Override public void onCreateResources(OnCreateResourcesCallback pOnCreateResourcesCallback) throws Exception { createResources(); pOnCreateResourcesCallback.onCreateResourcesFinished(); } @Override public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception { pOnCreateSceneCallback.onCreateSceneFinished(createScene()); } @Override public void onPopulateScene(Scene pScene, OnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception { pOnPopulateSceneCallback.onPopulateSceneFinished(); } And that's my layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="top" android:id="@+id/layout_ad" > <Button android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Ad Sample"/> </LinearLayout> <org.andengine.opengl.view.RenderSurfaceView android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:id="@+id/layout_render" /> </LinearLayout> When I'm trying to debug, I can see that EngineOptions are creating, but no one of the LayoutGameActivity's methods was called (onCreateResources, onCreateScene or onPopulateScene). Can someone tell me what I've missed?

    Read the article

  • Fill listview from fragment

    - by Bohsen
    I have a layout file containing a listview that I would like to fill with the help of a Fragment. But it continues to give me errors. The layout file: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" > </ListView> <TableLayout android:id="@+id/details" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:stretchColumns="1" > <Button android:id="@+id/create_patient_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/create_patient_button" /> </TableLayout> </RelativeLayout> My fragmentActivity: public class BasicFragmentActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.create_patient_view); FragmentManager fm = getSupportFragmentManager(); Fragment fragment = fm.findFragmentById(R.id.list); if (fragment == null) { FragmentTransaction ft = fm.beginTransaction(); ft.add(R.id.list, new BasicFragment()); ft.commit(); // Make sure you call commit or your Fragment will not be added. // This is very common mistake when working with Fragments! } } } My ListFragment: public class BasicFragment extends ListFragment { private PatientAdapter pAdapter; @Override public void onActivityCreated(Bundle savedState) { super.onActivityCreated(savedState); pAdapter = new PatientAdapter(getActivity(), GFRApplication.dPatients); setListAdapter(pAdapter); } } The error: java.lang.UnsupportedOperationException: addView(View) is not supported in AdapterView

    Read the article

  • Having trouble binding a ksoap object to an ArrayList in Android

    - by Maskau
    I'm working on an app that calls a web service, then the webservice returns an array list. My problem is I am having trouble getting the data into the ArrayList and then displaying in a ListView. Any ideas what I am doing wrong? I know for a fact the web service returns an ArrayList. Everything seems to be working fine, just no data in the ListView or the ArrayList.....Thanks in advance! EDIT: So I added more code to the catch block of run() and now it's returning "org.ksoap2.serialization.SoapObject".....no more no less....and I am even more confused now... package com.maskau; import java.util.ArrayList; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.AndroidHttpTransport; import android.app.*; import android.os.*; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import android.view.View; import android.view.View.OnClickListener; public class Home extends Activity implements Runnable{ /** Called when the activity is first created. */ public static final String SOAP_ACTION = "http://bb.mcrcog.com/GetArtist"; public static final String METHOD_NAME = "GetArtist"; public static final String NAMESPACE = "http://bb.mcrcog.com"; public static final String URL = "http://bb.mcrcog.com/karaoke/service.asmx"; String wt; public static ProgressDialog pd; TextView text1; ListView lv; static EditText myEditText; static Button but; private ArrayList<String> Artist_Result = new ArrayList<String>(); @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); myEditText = (EditText)findViewById(R.id.myEditText); text1 = (TextView)findViewById(R.id.text1); lv = (ListView)findViewById(R.id.lv); but = (Button)findViewById(R.id.but); but.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { wt = ("Searching for " + myEditText.getText().toString()); text1.setText(""); pd = ProgressDialog.show(Home.this, "Working...", wt , true, false); Thread thread = new Thread(Home.this); thread.start(); } } ); } public void run() { try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName("ArtistQuery"); pi.setValue(Home.myEditText.getText().toString()); request.addProperty(pi); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); AndroidHttpTransport at = new AndroidHttpTransport(URL); at.call(SOAP_ACTION, envelope); java.util.Vector<Object> rs = (java.util.Vector<Object>)envelope.getResponse(); if (rs != null) { for (Object cs : rs) { Artist_Result.add(cs.toString()); } } } catch (Exception e) { // Added this line, throws "org.ksoap2.serialization.SoapObject" when run Artist_Result.add(e.getMessage()); } handler.sendEmptyMessage(0); } private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { ArrayAdapter<String> aa; aa = new ArrayAdapter<String>(Home.this, android.R.layout.simple_list_item_1, Artist_Result); lv.setAdapter(aa); try { if (Artist_Result.isEmpty()) { text1.setText("No Results"); } else { text1.setText("Complete"); myEditText.setText("Search Artist"); } } catch(Exception e) { text1.setText(e.getMessage()); } aa.notifyDataSetChanged(); pd.dismiss(); } }; }

    Read the article

  • webview.loadUrl() problem in android?

    - by androidbase Praveen
    Hi guys, I am loading a URL whose datatype is String in a WebView. Using something like: webview.loadUrl(string_variable); but it is automatically redirected to the browser. I got this in my LOGCAT, 02-13 14:11:08.586: INFO/ActivityManager(5Cool: Displayed activity com.example.brown/.Bru_Press_MostRecent_ArticleView: 2583 ms (total 2583 ms) 02-13 14:11:09.376: INFO/ActivityManager(5Cool: Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://mobile.twitter.com/brownuniversity/statuses/8681812931 cmp=com.android.browser/.BrowserActivity (has extras) } 02-13 14:11:09.506: INFO/ActivityManager(5Cool: Start proc com.android.browser for activity com.android.browser/.BrowserActivity: pid=285 uid=10014 gids={3003, 1015}

    Read the article

  • httpclient ssl certificate on android

    - by Mojo Risin
    Hi all I have some troubles with ssl using httpclient on android i am trying to access public trusted certificate in details i want my app to trust all certificates. First i tried using this guide http://hc.apache.org/httpclient-3.x/sslguide.html on Desktop is working fine but on android i still got javax.net.ssl.SSLException: Not trusted server certificate. After searching in google i found some other examples how to enable ssl. http://groups.google.com/group/android-developers/browse_thread/thread/62d856cdcfa9f16e - Working when i use URLConnection but with HttpClient still got the exception. http://www.discursive.com/books/cjcook/reference/http-webdav-sect-self-signed.html - on Desktop using jars from apache is working but in android using included in SDK classes can't make it work. So any ideas how can i access trust public certificates on android using HttpClient

    Read the article

  • Android XMLRPC Fault Code

    - by sameersegal
    Hey, We have been using XMLRPC for android and it was working well until we got our hands dirty with Base64 encoding for byte[] (images) -- (we did base64_string.replace("/","$$") for transmission). We have tried undoing the changes and its looking an XMLRPC error. We are getting the following error in the DDMS: 06-10 23:27:02.970: DEBUG/Test(343): org.xmlrpc.android.XMLRPCFault: XMLRPC Fault: [code 0] 06-10 23:27:02.970: DEBUG/Test(343): at org.xmlrpc.android.XMLRPCClient.callEx(XMLRPCClient.java:308) 06-10 23:27:02.970: DEBUG/Test(343): at org.xmlrpc.android.XMLRPCMethod.run(XMLRPCMethod.java:33) Just before this I checked the body (xml message -- which is perfect) and the response received: 06-10 23:27:02.940: INFO/System.out(343): Response received: org.apache.http.message.BasicHttpResponse@437762f8 Since it the message is not even reaching our cloud, the issue is with XMLRPC for android. Any help will be most appreciated. Thanks Best Sameer

    Read the article

  • Problem -- My Android "Hello World" App Won't Say 'Hello"

    - by keith
    Hello, I hope that I have come to the right post for a beginner’s question abut Android programming. If not, please feel free to direct me to a better forum. I created a hello world application, and the system generated most of the Android language below. When running the app without the system.out statement, there is no “hello” in the emulator. Then, using the Eclipse tutorial, I read that I can add the system.out.println statement to main. Again the app runs, but there is no output. What am I not understanding here? android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" System.out.println =" Hello world!" / Thank you, Keith

    Read the article

  • Google Search api for Android systems

    - by jrharshath
    Hi, I'm trying to build an android app that would do a local search on google. I know there is a Google Search API for Java, and I am able to use it for a desktop application. However, when I use the same jar file (gsearch.jar) in my android project, Some problems arise. When I call the .localSearch() method of my gsearch.Client object, a runtime error is occurring. The error message is: "java.lang.VerifyError: gsearch.Client". This message is occurring in the Dalvik Debug Monitor log. So what is the problem here? Can I not use the search API on the android? More importantly, how do I do a local search from an android app? Does the android sdk have search APIs inbuilt? I could only find the Maps api, and Map search is not what I'm looking for.. Thanks for the help, jrh

    Read the article

  • Parse error when trying to install app on Asus eee PC 701 running Android 2.0

    - by Don
    A beta tester of mine has a Asus eee pc 701 running Android 2.0 and he is trying to install an app on it from my web site. He is able to download the app but is getting a "Parse Error: There is a problem parsing the package" error. I don't really know if this problem is with the eee pc or with the apk since he is the first person to try to install it. I built it for 2.0, the manifest has 5 as the minimum API level and I used Eclipse to export and sign it. But this is my first Android app and he is the first to try to install it, so I am not sure what the problem might be? Could just be the Android implementation too. Here is a site about putting Android on the Asus: http://www.liliputing.com/2009/01/how-to-built-google-android-for-the-asus-eee-pc-701.html Any thoughts on what I might try to get this app installed on his machine?

    Read the article

  • Cant find the android keytool

    - by Tim
    Hi all I am trying to follow the Android mapping tutorial and got to this part where I had to get an API key http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint I have found my debug.keystore but there does not appear to be a keytool application in the directory: C:\Documents and Settings\tward\.androidls adb_usb.ini avd debug.keystore repositories.cfg androidtool.cfg ddms.cfg default.keyset There is also no keytool in this directory: C:\Android\android-sdk-windows\toolsls AdbWinApi.dll apkbuilder.bat etc1tool.exe mksdcard.exe AdbWinUsbApi.dll ddms.bat fastboot.exe source.properties Jet dmtracedump.exe hierarchyviewer.bat sqlite3.exe NOTICE.txt draw9patch.bat hprof-conv.exe traceview.bat adb.exe emulator.exe layoutopt.bat zipalign.exe android.bat emulator_NOTICE.txt lib I am using eclipse as my editor and believe that I have downloaded all the latest SDK What am I doing wrong? Thanks for your time Tim

    Read the article

  • HttpPost works in Java project, not in Android

    - by dave.c
    I've written some code for my Android device to login to a web site over https and parse some data out of the resulting pages. An HttpGet happens first to get some info needed for login, then an HttpPost to do the actual login process. The code below works great in a Java project within Eclipse which has the following Jar files on the build path: httpcore-4.1-beta2.jar, httpclient-4.1-alpha2.jar, httpmime-4.1-alpha2.jar, commons-logging-1.1.1.jar. public static MyBean gatherData(String username, String password) { MyBean myBean = new MyBean(); try { HttpResponse response = doHttpGet(URL_PAGE_LOGIN, null, null); System.out.println("Got login page"); String content = EntityUtils.toString(response.getEntity()); String token = ContentParser.getToken(content); String cookie = getCookie(response); System.out.println("Performing login"); System.out.println("token = "+token +" || cookie = "+cookie); response = doLoginPost(username,password,cookie, token); int respCode = response.getStatusLine().getStatusCode(); if (respCode != 302) { System.out.println("ERROR: not a 302 redirect!: code is \""+ respCode+"\""); if (respCode == 200) { System.out.println(getHeaders(response)); System.out.println(EntityUtils.toString(response.getEntity()).substring(0, 500)); } } else { System.out.println("Logged in OK, loading account home"); // redirect handler and rest of parse removed } }catch (Exception e) { System.out.println("ERROR in gatherdata: "+e.toString()); e.printStackTrace(); } return myBean; } private static HttpResponse doHttpGet(String url, String cookie, String referrer) { try { HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); client.getParams().setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET, "UTF-8"); HttpGet httpGet = new HttpGet(url); httpGet.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); httpGet.setHeader(HEADER_USER_AGENT,HEADER_USER_AGENT_VALUE); if (referrer != null && !referrer.equals("")) httpGet.setHeader(HEADER_REFERER,referrer); if (cookie != null && !cookie.equals("")) httpGet.setHeader(HEADER_COOKIE,cookie); return client.execute(httpGet); } catch (Exception e) { e.printStackTrace(); throw new ConnectException("Failed to read content from response"); } } private static HttpResponse doLoginPost(String username, String password, String cookie, String token) throws ClientProtocolException, IOException { try { HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); client.getParams().setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET, "UTF-8"); HttpPost post = new HttpPost(URL_LOGIN_SUBMIT); post.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); post.setHeader(HEADER_USER_AGENT,HEADER_USER_AGENT_VALUE); post.setHeader(HEADER_REFERER, URL_PAGE_LOGIN); post.setHeader(HEADER_COOKIE, cookie); post.setHeader("Content-Type","application/x-www-form-urlencoded"); List<NameValuePair> formParams = new ArrayList<NameValuePair>(); formParams.add(new BasicNameValuePair("org.apache.struts.taglib.html.TOKEN", token)); formParams.add(new BasicNameValuePair("showLogin", "true")); formParams.add(new BasicNameValuePair("upgrade", "")); formParams.add(new BasicNameValuePair("username", username)); formParams.add(new BasicNameValuePair("password", password)); formParams.add(new BasicNameValuePair("submit", "Secure+Log+in")); UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formParams,HTTP.UTF_8); post.setEntity(entity); return client.execute(post); } catch (Exception e) { e.printStackTrace(); throw new ConnectException("ERROR in doLoginPost(): "+e.getMessage()); } } The server (which is not under my control) returns a 302 redirect when the login was successful, and 200 if it fails and re-loads the login page. When run with the above Jar files I get the 302 redirect, however if I run the exact same code from an Android project with the 1.6 Android Jar file on the build path I get the 200 response from the server. I get the same 200 response when running the code on my 2.2 device. My android application has internet permissions, and the HttpGet works fine. I'm assuming that the problem lies in the fact that HttpPost (or some other class) is different in some significant way between the Android Jar version and the newer Apache versions. I've tried adding the Apache libraries to the build path of the Android project, but due to the duplicate classes I get messages like: INFO/dalvikvm(390): DexOpt: not resolving ambiguous class 'Lorg/apache/http/impl/client/DefaultHttpClient;' in the log. I've also tried using a MultipartEntity instead of the UrlEncodedFormEntity but I get the same 200 result. So, I have a few questions: - Can I force the code running under android to use the newer Apache libraries in preference to the Android versions? - If not, does anyone have any ideas how can I alter my code so that it works with the Android Jar? - Are there any other, totally different approaches to doing an HttpPost in Android? - Any other ideas? I've read a lot of posts and code but I'm not getting anywhere. I've been stuck on this for a couple of days and I'm at a loss how to get the thing to work, so I'll try anything at this point. Thanks in advance.

    Read the article

  • Warning: Ignoring library 'com.motorola.android.iextdispservice', missing property value

    - by user1342684
    Hi I am trying to get my eclipse environment setup so I can start playing with programming for android... The Android SDK Manager is installing the following packages (everything else says installed except these two): Android 2.3.3 (API 10) Dual Screen APIs - Not Installed Android 2.2 (API 8) Dual Screen APIs - Not Installed Error Messages: [2012-04-19 13:06:41 - SDK Manager] Warning: Ignoring library 'com.motorola.android.iextdispservice', missing property value [2012-04-19 13:15:27 - SDK Manager] Operation timed out [2012-04-19 13:18:16 - SDK Manager] Operation timed out Any tips? So close to getting the environment ready! I want to start playing around!

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >