Search Results

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

Page 212/1032 | < Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >

  • GDD-BR 2010 [1E] Android: Effective UI Best Practices

    GDD-BR 2010 [1E] Android: Effective UI Best Practices Speaker: Tim Bray Track: Android Time slot: E [14:40 - 15:25] Room: 1 Level: 201 Download Slides (PDF) Good user interfaces and optimized user experiences are important on any device, but are even more important on mobile devices that have limited screen real estate and are being used by people in a hurry. We'll talk about UI and UX design patterns on Android and how to use them to greatest effect. From: GoogleDevelopers Views: 1 0 ratings Time: 38:16 More in Science & Technology

    Read the article

  • Can I get vim to correctly indent this Ruby code (Nokogiri)?

    - by Nathan Long
    The first XML Builder Example for Nokogiri looks like this: builder = Nokogiri::XML::Builder.new do |xml| xml.root { xml.products { xml.widget { xml.id_ "10" xml.name "Awesome widget" } } } end puts builder.to_xml Even though I have the Ruby Vim files installed, Vim's autoindent flattens the above example like this: builder = Nokogiri::XML::Builder.new do |xml| xml.root { xml.products { xml.widget { xml.id_ "10" xml.name "Awesome widget" } } } end puts builder.to_xml Does anybody know how to get Vim to autoindent this correctly?

    Read the article

  • Android 2.2 supportera Flash annonce le responsable de l'OS chez Google, qui répond également aux pr

    Mise à jour du 28/04/10 Android 2.2 supportera Flash C'est ce qu'annonce le responsable de l'OS chez Google, qui répond également à Steve Jobs et à ses propos sur Android L'ingénieur en charge du projet Android chez Google, Andy Rubin, vient d'accorder une interview au New York Times dans laquelle il annonce que Froyo (pour « Frozen Yourt » - nom de code de la prochaine version de l'OS mobile) assurera le « support total » ("full support") de Flash. Reste à savoir ce que ce « full support » recouvre : support d'une version Flash entière (différente de la version Lite généralement présente dans l'univers du développemen...

    Read the article

  • Android sera désormais mis à jour annuellement, pour éviter sa fragmentation face à la profusion de

    Android sera désormais mis à jour annuellement, pour éviter sa fragmentation face à la profusion de versions existantes Le responsable d'Android chez Google, Andy Rubin, vient de faire une annonce importante : les mises à jour d'Android deviendront très bientôt annuelles. Cette décision a été prise dans l'intérêt de la plateforme, afin d'en réduire la fragmentation provoquée par l'arrivée continuelle de nouvelles versions. D'autant plus que la majorité des téléphones embarquent une version d'Android modifiée par son constructeur. Chaque mise à jour du logiciel demande donc en plus une actualisation du skin du fabriquant. Des updates planifiées sur une base annuelle apporteront en confort et en simplicité, autant pour...

    Read the article

  • Testing HTML5 and javascript code for iPhone and Android devices

    - by Pankaj Upadhyay
    I have developed a simple HTML5 webpage that uses a javascript file. This is a fun learning page so I wanted to know as to how will they show up on mobile devices like iPhone and Android smartphones. The pages are hosted on a server and i have tested the thing on my desktop. But, how can i test the same for these mobile devices. i.e. how the page will look on mobile and stuff. I don't have an iPhone or Android. There is no serious development going in here so i was thinking if there is some free website or tool that acts as a iPhone or android browser. The main aim is just to see how the webpage will show up on an android phone.

    Read the article

  • What Windows app can sort a huge XML file?

    - by Torben Gundtofte-Bruun
    I have some enormous XML-based configuration files, with 125000 lines in them. The problem is that they are auto-generated by the system I use, and "child" tags are in a random order within their respective parent tag. This means that a diff comparison is impossible. I want to recursively sort all tags within a parent tag by the value in name="". Some parent tags only appear once and don't have a name="" parameter; these should be sorted by the tag name itself. Once the files are sorted like this, they can be compared quite easily using normal tools. We are currently using ExamXML which can match unsorted XML files, but it fails because the files are too big. Is there an application that can do this? (Windows much preferred; Linux only as a last resort) I do not want to dive into development or XSLT jobs. I am thinking that someone must have made a simple sorting tool like this already - I just can't find it using Google. Update: With help from this site, I created a small package that I want to share: XML-Sorter_v0.3.zip Update: Follow-up question here.

    Read the article

  • Google Site Search (commercial) not indexing files in sitemap

    - by melat0nin
    I have a client for whom we have purchased Google Site Search. It works well for HTML pages served by the CMS, but files aren't being reliably indexed. I wrote a script to generate an XML feed (sitemap) of all the files in the CMS which I've plugged in to Google Webmaster Tools for the site. It says that for that sitemap 923 URLs have been submitted, but only 26 have been indexed. The client relies heavily on searching within files, which is why we decided to use Google search, so this is a bit of a problem. Many of the files aren't linked to from any page on the site, as they are old and therefore don't merit having a page of their own. But they still need to be accessible through search for archiving purposes. The file archive xml can be found at www.sniffer.org.uk/file-archive and the standard xml sitemap (of pages) can be found at www.sniffer.org.uk/sitemap.xml. Any thought would be much appreciated!

    Read the article

  • Is this an effective monetization method for an Android game? [on hold]

    - by Matthew Page
    The short version: I plan to make an Android puzzle game where the user tries to get 3-6 numbers to their predetermined goal numbers. The free version of the app will have three predetermined levels (easy, medium, hard). The full version ($0.99, probably) will have a level generator where there will be unlimited easy, medium, or hard levels, as well as a custom difficulty option where users can set specific vales to the number of numbers to equate to their goal, the number of buttons to use, etc. Users will also have the option to get a one-time "hint" for a fee of $0.49, or unlimited hints for a one-time fee of $2.99. The long version: Mechanics of Game and Victory The application is a number puzzle. When the user begins a new game, depending on the input by the user, between 3 and 6 numbers show up on the top of the screen, and between 3 and 6 buttons show up on the bottom of the screen. The buttons all have two options: to increase every number the same way, or decrease every number the same way. The buttons either use addition / subtraction, multiplication / division, or exponents / roots, all depending on the number displayed on the button. Addition buttons are green, multiplication buttons are blue, and exponential buttons are red. The user wins when all of the numbers displayed on the screen equate to their goal number, displayed below each number. Monetization If the user is playing the full (priced) version of the app, upon the start of the game, the user will be confronted with a dialogue asking for the number of buttons and the number of numbers to equate in the game. Then, based on the user input, a random puzzle will be generated. If the user is playing the free version of the app, the user will be asked to either play an “easy”, “hard”, or “expert” puzzle. A pre-determined puzzle from each category will be used in the game. If the user has played that puzzle before, a dialogue will show saying this to the user and advertising the full version of the app. The full version of the app will also be advertised upon the successful or in successful completion of a puzzle. Upon exiting this advertisement, another full screen advertisement will appear from a third party. Also, the solution to the puzzle should be stored by the program, and if the user pays a small fee, he/she can see a hint to the solution to the program. In the free version of the app, the user may use their first hint for free. Also, the user can use unlimited hints for a slightly larger fee. Is this an effective monetization method?

    Read the article

  • Android 2.3 (Gingerbread) officially released

    - by Bill Osuch
    Google today officially released their latest version of the Android OS - 2.3, Gingerbread. It won't hit a phone (the Nexus S) until 12/16, but developers can start working with it today. Some of the new features include: Enhancements for game development Rich multimedia New forms of communication Simplified debug builds Integrated ProGuard support HierarchyViewer improvements Preview of new UI Builder See the complete details at http://developer.android.com/sdk/android-2.3.html

    Read the article

  • Android : 600.000 applications, le nombre d'activations de terminaux en France explose

    Android : 600.000 applications Le nombre d'activations de terminaux en France explose La présentation d'Android 4.1, alias Jelly Bean, lors de la conférence du Google I/O qui se tient jusqu'à la fin de la semaine à San Francisco a été l'occasion pour Google de mettre à jour officiellement quelques chiffres concernant l'écosystème de son OS mobile. L'éditeur a par exemple confirmé que la galerie Google Play (ex-Android Market) a dépassé la barre des 600.000 applications (contre 450.000 en février). Pour Hugo Barra (Direc...

    Read the article

  • XML Rules Engine and Validation Tutorial with NIEM

    - by drrwebber
    Our new XML Validation Framework tutorial video is now available. See how to easily integrate code-free adaptive XML validation services into your web services using the Java CAMV validation engine. CAMV allows you to build fault tolerant content checking with XPath that optionally use SQL data lookups. This can provide warnings as well as error conditions to tailor your validation layer to exactly meet your business application needs. Also available is developing test suites using Apache ANT scripting of validations.  This allows a community to share sets of conformance checking test and tools . On the technical XML side the video introduces XPath validation rules and illustrates and the concepts of XML content and structure validation. CAM validation templates allow contextual parameter driven dynamic validation services to be implemented compared to using a static and brittle XSD schema approach.The SQL table lookup and code list validation are discussed and examples presented.Features are highlighted along with a demonstration of the interactive generation of actual live XML data from a SQL data store and then validation processing complete with errors and warnings detection.The presentation provides a primer for developing web service XML validation and integration into a SOA approach along with examples and resources. Also alignment with the NIEM IEPD process for interoperable information exchanges is discussed along with NIEM rules services.The CAMV engine is a high performance scalable Java component for rapidly implementing code-free validation services and methods. CAMV is a next generation WYSIWYG approach that builds from older Schematron coding based interpretative runtime tools and provides a simpler declarative metaphor for rules definition. See: http://www.youtube.com/user/TheCAMeditor

    Read the article

  • Google interdit l'accès aux applications Android aux tablettes et livres électroniques, seuls les sm

    Google interdit l'accès aux applications Android aux tablettes et livres électroniques, seuls les smartphones y sont bienvenus Après des discussions enflammées autour de l'AppStore et des politiques parfois douteuses d'approbation des applications d'Apple, c'est au tour de l'Android Market de faire la polémique. Malgré que l'OS Android soit open-source et adaptable sur de multiples appareils (téléphone, tablette, cadre photo, etc.) ; Google excerce un contrôle musclé de son marché d'applications sur lequel il n'accepte que les smartphones. Pour pouvoir accèder à l'Android Market, le mobile doit répondre à plusieurs critères : il doit possèder un écran tactile, le wi-fi, une cméra, etc... La liste est longue.

    Read the article

  • Technically, How does uploading Apps to an Android Phone Work?

    - by unixman83
    Amazon.com has an Android Marketplace. How do the apps go from Amazon.com to my phone? I am looking for a protocol level analysis. Do they use a basic protocol like FTP and then check with a Google digital signature? I do not own an Android. I wish for an explanation of how the protocol operates because I want to provide an android app for free download for my users off my website, like Amazon does.

    Read the article

  • Google traine à corriger un bug faisant disparaître certaines applications de l'Android Market, son

    Google traine à corriger un bug faisant disparaître certaines applications de l'Android Market, son service technique est-il assez compétent ? Ca gronde dans la communauté des développeurs Android, après que plusieurs cas de soucis avec la publications d'applications sur l'Android Market aient été racontés dans des forums spécialisés. D'après les récits qui y sont faits, il serait difficile de pouvoir entrer en contact avec un être humain du staff de Google, puisque la firme privilégie un suivi via FAQ, forum ou e-mail. Autrement dit, en cas de problème, le service technique serait long à la détente. Or, vendredi dernier, de nombreux développeurs ayant renvoyé leurs applications à l'Android Market après les avoir mis...

    Read the article

  • (Android) How are OpenGL ES 1 framebuffers and textures sized?

    - by jens
    I am trying to draw to a texture using a framebuffer using OpenGL ES 1.1 on Android, Java. Afterwords I want to overlay this texture full-screen over my game. In theory, this works like a charm, but somehow the coordinates are off. For testing I drew something at (0,0) with width and height 200, and it partly is off-screen. This is how I create the framebuffer: fb = new int[1]; depthRb = new int[1]; renderTex = new int[1]; gl11ep.glGenFramebuffersOES(1, fb, 0); gl11ep.glGenRenderbuffersOES(1, depthRb, 0); // the depth buffer gl.glGenTextures(1, renderTex, 0);// generate texture gl.glBindTexture(GL10.GL_TEXTURE_2D, renderTex[0]); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT); texBuffer = ByteBuffer.allocateDirect(buf.length*4).order(ByteOrder.nativeOrder()).asIntBuffer(); gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_LUMINANCE, texW, texH, 0, GL10.GL_LUMINANCE, GL10.GL_UNSIGNED_BYTE, texBuffer); gl11ep.glBindRenderbufferOES(GL11ExtensionPack.GL_RENDERBUFFER_OES, depthRb[0]); gl11ep.glRenderbufferStorageOES(GL11ExtensionPack.GL_RENDERBUFFER_OES, GL11ExtensionPack.GL_DEPTH_COMPONENT16, texW, texH); Before I draw, I do this: gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, fb[0]); gl.glClearColor(0f, 0f, 0f, 0f); // specify texture as color attachment gl11ep.glFramebufferTexture2DOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, GL11ExtensionPack.GL_COLOR_ATTACHMENT0_OES, GL10.GL_TEXTURE_2D, renderTex[0], 0); // attach render buffer as depth buffer gl11ep.glFramebufferRenderbufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, GL11ExtensionPack.GL_DEPTH_ATTACHMENT_OES, GL11ExtensionPack.GL_RENDERBUFFER_OES, depthRb[0]); I set texW = 1024 and texH = 512. When rendering this texture fullscreen, with a lightmask (size 200x200) placed at (0, 0) and (texW/2, texH/2). You can see that it seems like the coordinate system doesnt start at (0,0) as that light overlaps the screen and the images are not drawn as squares (my lightcone-texture is a circle, not an ellipse). So, how is the coordinate system of this offscreen-drawn texture defined? Thanks

    Read the article

  • How can I use Android as a remote control for streaming?

    - by michael
    I would like to know if I can use Android to remote control streaming on my laptop? I would like to use my laptop as my streaming server and use my HDTV to view the stream. And I need some way to remote control my streaming server. I have read about http://maketecheasier.com/install-vlc-shares-in-Ubuntu-and-stream-videos-to-Android/2011/02/25 and http://code.google.com/p/android-vlc-remote/ but those are streaming to Android phone itself. I am just need something to remote control streaming to my TV. Is that possible?

    Read the article

  • Google Drive SDK: Writing your first Drive app on Android

    Google Drive SDK: Writing your first Drive app on Android If you want to write a Drive app on Android and don't know how to get started, this is the sessions for you. We'll start from the very basics and go through all the steps needed to build an Android app that uses the device camera to take pictures and upload them to Google Drive. From: GoogleDevelopers Views: 0 0 ratings Time: 03:30:00 More in Science & Technology

    Read the article

  • Eclipse will not install Android Support Package [migrated]

    - by Michael Mossman
    I am an experienced programmer but new to Android, hence using Eclipse for the first time. Unfortunately I cannot get my first project off the ground. I get as far trying to create the project when the following sequence happens. A screen arrives titled 'Install Dependencies' telling me that the required version is 8 and the installed version is 'Not installed' I click on the Install/Upgrade button and something must happen because Android SDK Manager pops up and I get a whole series of 'Fetching:' messages. The next screen asks me to Choose Package to Install and the only option is Android Support Library, revision 10. This doesn't bother me as I presume 10 is better than 8 so I hit the Install button. This is where it all goes wrong as I get a red message saying: File not found: C:\Program Files (X86)\Android\android-sdk\temp\support_r10.zip (Access is denied). Sure enough, when I check this folder, it is empty. Now, something must have happened as as SDK Manager did a whole lot of fetching and must have put these files somewhere. I am quite happy to find them and put them in the correct folder but the question is what is the name of the files that I am looking for?

    Read the article

  • Serve up syntactic XHTML5 using the text/html MIME type?

    - by cboettig
    I have a site currently written with HTML5 tags. I'd like to be able to parse the site as XML, with support for namespaces, etc, to facilitate programmatic extraction of data. Currently I have <!DOCTYPE html> and <meta charset="utf-8"> Which I gather is equivalent in HTML5 to explicitly setting the content-types as <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> for my current setup. In order to serve XML it sounds like the right thing to do is <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> Should I also change my Content-Type to <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> Or is that not necessary? What is the advantage of having content-type be "application/xhtml+xml"? What is the disadvantage? (Sounds like it may break internet explorer rendering of the site? but maybe that information is out of date now?) Many thanks!

    Read the article

  • Android pourra-t-il surpasser Windows ? En 2016, il y aurait plus de dispositifs sous Android que sous Windows selon Gartner

    Android pourra-t-il surpasser Windows ? En 2016, il y aurait plus de dispositifs sous Android que sous Windows. Le cabinet d'études Gartner prédit des changements massifs dans le secteur de la technologie et plus précisément des systèmes d'exploitation. Selon son rapport publié mercredi dernier, Android, le Système d'exploitation de Google équipera d'ici quatre ans plus d'appareils que Windows. [IMG]http://rdonfack.developpez.com/images/AndroidStand.png[/IMG] Selon les statistiques de Gartner, à la fin de 2016, il y aurait environ 2,3 milliards d'ordinateurs, tablettes et smartphones dotés d'Android, contre 2,28 milliards d'appareils Windows. Les analyste...

    Read the article

  • What methodology to use for planning/developing a Language conversion project?

    - by user 123
    I am trying to help my friend by creating a part of his on-going project. What I'm going to do is create a Java parser to break up the Java code into operators, parameters etc to build XML representation. Next I want to create a code generator to convert the parsed java code to XML conforming to the schema I've created. Finally I want to use an XML style-sheet to transform the XML into another programming language type. Basically I just wanted some advice on which methodology/model I should use for planning and developing this project. Is there some benefit to using Agile etc for instance?

    Read the article

  • Android: get current location from best available provider

    - by AP257
    Hi all, I have some Android code that needs to get the best available location QUICKLY, from GPS, network or whatever is available. Accuracy is less important than speed. Getting the best available location is surely a really standard task. Yet I can't find any code to demonstrate it. The Android location code expects you to specify criteria, register for updates, and wait - which is fine if you have detailed criteria and don't mind waiting around. But my app needs to work a bit more like the Maps app does when it first locates you - work from any available provider, and just check the location isn't wildly out of date or null. I've attempted to roll my own code to do this, but am having problems. (It's inside an IntentService where an upload happens, if that makes any difference. I've included all the code for info.) What's wrong with this code? @Override protected void onHandleIntent(Intent arg0) { testProviders(); doUpload(); } private boolean doUpload() { int j = 0; // check if we have accurate location data yet - wait up to 30 seconds while (j < 30) { if ((latString == "") || (lonString == "")) { Log.d(LOG_TAG, "latlng null"); Thread.sleep(1000); j++; } else { Log.d(LOG_TAG, "found lat " + latString + " and lon " + lonString); break; } //do the upload here anyway, with or without location data //[code removed for brevity] } public boolean testProviders() { Log.e(LOG_TAG, "testProviders"); String location_context = Context.LOCATION_SERVICE; locationmanager = (LocationManager) getSystemService(location_context); List<String> providers = locationmanager.getProviders(true); for (String provider : providers) { Log.e(LOG_TAG, "registering provider " + provider); listener = new LocationListener() { public void onLocationChanged(Location location) { // keep checking the location - until we have // what we need //if (!checkLoc(location)) { Log.e(LOG_TAG, "onLocationChanged"); locationDetermined = checkLoc(location); //} } public void onProviderDisabled(String provider) { } public void onProviderEnabled(String provider) { } public void onStatusChanged(String provider, int status, Bundle extras) { } }; locationmanager.requestLocationUpdates(provider, 0, 0, listener); } Log.e(LOG_TAG, "getting updates"); return true; } private boolean checkLoc(Location location) { float tempAccuracy = location.getAccuracy(); int locAccuracy = (int) tempAccuracy; Log.d(LOG_TAG, "locAccuracy = " + locAccuracy); if ((locAccuracy != 0) && (locAccuracy < LOCATION_ACCURACY)) { latitude = location.getLatitude(); longitude = location.getLongitude(); latString = latitude.toString(); lonString = longitude.toString(); return true; } return false; } public void removeListeners() { // Log.e(LOG_TAG, "removeListeners"); if ((locationmanager != null) && (listener != null)) { locationmanager.removeUpdates(listener); } locationmanager = null; // Log.d(LOG_TAG, "Removed " + listener.toString()); } @Override public void onDestroy() { super.onDestroy(); removeListeners(); } Unfortunately, this finds the network provider, but only ever outputs latlng null 30 times - it never seems to get a location at all. I never even get a log statement of locationChanged. It's funny, because from ddms I can see output like: NetworkLocationProvider: onCellLocationChanged [305,8580] NetworkLocationProvider: getNetworkLocation(): returning cache location with accuracy 75.0 seeming to suggest that the network provider does have some location info after all, I'm just not getting at it. Can anyone help? I think working example code would be a useful resource for the Android/StackOverflow community.

    Read the article

  • Android 1.5 - 2.1 Search Activity affects Parent Lifecycle

    - by pacoder
    Behavior seems consistent in Android 1.5 to 2.1 Short version is this, it appears that when my (android search facility) search activity is fired from the android QSR due to either a suggestion or search, UNLESS my search activity in turn fires off a VISIBLE activity that is not the parent of the search, the search parents life cycle changes. It will NOT fire onDestroy until I launch a visible activity from it. If I do, onDestroy will fire fine. I need a way to get around this behavior... The long version: We have implemented a SearchSuggestion provider and a Search activity in our application. The one thing about it that is very odd is that if the SearchManager passes control to our custom Search activity, AND that activity does not create a visible Activity the Activity which parented the search does not destroy (onDestroy doesn't run) and it will not until we call a visible Activity from the parent activity. As long as our Search Activity fires off another Activity that gets focus the parent activity will fire onDestroy when I back out of it. The trick is that Activity must have a visual component. I tried to fake it out with a 'pass through' Activity so that my Search Activity could fire off another Intent and bail out but that didn't work either. I have tried setting our SearchActivity to launch singleTop and I also tried setting its noHistory attribute to true, tried setResult(RESULT_OK) in SearchACtivity prior to finish, bunch of other things, nothing is working. This is the chunk of code in our Search Activity onCreate. Couple of notes about it: If Intent is Action_Search (user typed in their own search and didn't pick a suggestion), we display a list of results as our Search Activity is a ListActivity. In this case when the item is picked, the Search Activity closes and our parent Activity does fire onDestroy() when we back out. If Intent is Action_View (user picked a suggestion) when type is "action" we fire off an Intent that creates a new visible Activity. In this case same thing, when we leave that new activity and return to the parent activity, the back key does cause the parent activity to fire onDestroy when leaving. If Intent is Action_View (user picked a suggestion) when type is "pitem" is where the problem lies. It works fine (the method call focuses an item on the parent activity), but when the back button is hit on the parent activity onDestroy is NOT called. IF after this executes I pick an option in the parent activity that fires off another activity and return to the parent then back out it will fire onDestroy() in the parent activity. Note that the "action" intent ends up running the exact same method call as "pitem", it just bring up a new visual Activity first. Also I can take out the method call from "pitem" and just finish() and the behavior is the same, the parent activity doesn't fire onDestroy() when backed out of. if (Intent.ACTION_SEARCH.equals(queryAction)) { this.setContentView(_layoutId); String searchKeywords = queryIntent.getStringExtra(SearchManager.QUERY); init(searchKeywords); } else if(Intent.ACTION_VIEW.equals(queryAction)){ Bundle bundle = queryIntent.getExtras(); String key = queryIntent.getDataString(); String userQuery = bundle.getString(SearchManager.USER_QUERY); String[] keyValues = key.split("-"); if(keyValues.length == 2) { String type = keyValues[0]; String value = keyValues[1]; if(type.equals("action")) { Intent intent = new Intent(this, EventInfoActivity.class); Long longKey = Long.parseLong(value); intent.putExtra("vo_id", longKey); startActivity(intent); finish(); } else if(type.equals("pitem")) { Integer id = Integer.parseInt(value); _application._servicesManager._mapHandlerSelector.selectInfoItem(id); finish(); } } } It just seems like something is being held onto and I can't figure out what it is, in all cases the Search Activity fires onDestroy() when finish() is called so it is definitely going away. If anyone has any suggestions I'd be most appreciative. Thanks, Sean Overby

    Read the article

  • Android using ksoap calling PHP SOAP webservice fails: 'procedure 'CheckLogin' not found

    - by AmazingDreams
    I'm trying to call a PHP SOAP webservice. I know my webservice functions correctly because I use it in a WPF project succesfully. I'm also building an app in android, using the same webservice. The WSDL file can be found here: http://www.wegotcha.nl/servicehandler/service.wsdl This is my code in the android app: String SOAP_ACTION = "http://www.wegotcha.nl/servicehandler/CheckLogin"; String NAMESPACE = "http://www.wegotcha.nl/servicehandler"; String METHOD_NAME = "CheckLogin"; String URL = "http://www.wegotcha.nl/servicehandler/servicehandler.php"; String resultData = ""; SoapSerializationEnvelope soapEnv = new SoapSerializationEnvelope(SoapEnvelope.VER11); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapObject UserCredentials = new SoapObject("Types", "UserCredentials6"); UserCredentials.addProperty("mail", params[0]); UserCredentials.addProperty("password", md5(params[1])); request.addSoapObject(UserCredentials); soapEnv.setOutputSoapObject(request); HttpTransportSE http = new HttpTransportSE(URL); http.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); http.debug = true; try { http.call(SOAP_ACTION, soapEnv); } catch (IOException e) { e.printStackTrace(); } catch (XmlPullParserException e) { e.printStackTrace(); } SoapObject results = null; results = (SoapObject)soapEnv.bodyOut; if(results != null) resultData = results.getProperty(0).toString(); return resultData; Using fiddler I got the following: Android request: <?xml version="1.0" encoding="utf-8"?> <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header /> <v:Body> <n0:CheckLogin id="o0" c:root="1" xmlns:n0="http://www.wegotcha.nl/servicehandler"> <n1:UserCredentials6 i:type="n1:UserCredentials6" xmlns:n1="Types"> <mail i:type="d:string">myemail</mail> <password i:type="d:string">myhashedpass</password> </n1:UserCredentials6> </n0:CheckLogin> </v:Body> </v:Envelope> Getting the following response: Procedure 'CheckLogin' not present My request produced by my WPF app looks completely different: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <UserCredentials6 xmlns="Types"> <mail>mymail</mail> <password>mypassword</password> </UserCredentials6> </s:Body> </s:Envelope> After googling my ass off I was not able to solve this problem by myself. It may be possible there are some weird things in my Java code because I changed a lot since. I hope you guys will be able to help me, thanks. EDIT: My webservice is of document/literal encoding style, after doing some research I found I should be able to use SoepEnvelope Instead of SoapSerializationEnvelope Though when I replace this I get an error before the try cache block, causing my app to crash. Error: 11-04 16:23:26.786: E/AndroidRuntime(26447): Caused by: java.lang.ClassCastException: org.ksoap2.serialization.SoapObject cannot be cast to org.kxml2.kdom.Node Which is caused by these lines: request.addSoapObject(UserCredentials); soapEnv.setOutputSoapObject(request); This may be a solution though, how do I go about this? I found nothing about using a SoapEnvelope instead of a SoapSerializationEnvelope except for this awesome tutorial: http://ksoap.objectweb.org/project/mailingLists/ksoap/msg00849.html

    Read the article

  • Android: HttpURLConnection not working properly

    - by giorgiline
    I'm trying to get the cookies from a website after sending user credentials through a POST Request an it seems that it doesn't work in android this way. ¿Am I doing something bad?. Please help. I've searched here in different posts but there's no useful answer. It's curious that this run in a desktop Java implementation it works perfect but it crashes in Android platform. And it is exactly the same code, specifically when calling HttpURLConnection.getHeaderFields(), it also happens with other member methods. It's a simple code and I don't know why the hell isn't working. DESKTOP CODE: This goes just in the main() HttpURLConnection connection = null; OutputStream out = null; try { URL url = new URL("http://www.XXXXXXXX.php"); String charset = "UTF-8"; String postback = "1"; String user = "XXXXXXXXX"; String password = "XXXXXXXX"; String rememberme = "on"; String query = String.format("postback=%s&user=%s&password=%s&rememberme=%s" , URLEncoder.encode(postback, charset) , URLEncoder.encode(user,charset) , URLEncoder.encode(password, charset) , URLEncoder.encode(rememberme, charset)); connection = (HttpURLConnection)url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept-Charset", charset); connection.setDoOutput(true); connection.setFixedLengthStreamingMode(query.length()); out = connection.getOutputStream (); out.write(query.getBytes(charset)); if (connection.getHeaderFields() == null){ System.out.println("Header null"); }else{ for (String cookie: connection.getHeaderFields().get("Set-Cookie")){ System.out.println(cookie.split(";", 2)[0]); } } } catch (IOException e){ e.printStackTrace(); } finally { try { out.close();} catch (IOException e) { e.printStackTrace();} connection.disconnect(); } So the output is: login_key=20ad8177db4eca3f057c14a64bafc2c9 FASID=cabf20cc471fcacacdc7dc7e83768880 track=30c8183e4ebbe8b3a57b583166326c77 client-data=%7B%22ism%22%3Afalse%2C%22showm%22%3Afalse%2C%22ts%22%3A1349189669%7D ANDROID CODE: This goes inside doInBackground AsyncTask body HttpURLConnection connection = null; OutputStream out = null; try { URL url = new URL("http://www.XXXXXXXXXXXXXX.php"); String charset = "UTF-8"; String postback = "1"; String user = "XXXXXXXXX"; String password = "XXXXXXXX"; String rememberme = "on"; String query = String.format("postback=%s&user=%s&password=%s&rememberme=%s" , URLEncoder.encode(postback, charset) , URLEncoder.encode(user,charset) , URLEncoder.encode(password, charset) , URLEncoder.encode(rememberme, charset)); connection = (HttpURLConnection)url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Accept-Charset", charset); connection.setDoOutput(true); connection.setFixedLengthStreamingMode(query.length()); out = connection.getOutputStream (); out.write(query.getBytes(charset)); if (connection.getHeaderFields() == null){ Log.v(TAG, "Header null"); }else{ for (String cookie: connection.getHeaderFields().get("Set-Cookie")){ Log.v(TAG, cookie.split(";", 2)[0]); } } } catch (IOException e){ e.printStackTrace(); } finally { try { out.close();} catch (IOException e) { e.printStackTrace();} connection.disconnect(); } And here there is no output, it seems that connection.getHeaderFields() doesn't return result. It takes al least 30 seconds to show the Log: 10-02 16:56:25.918: V/class com.giorgi.myproject.activities.HomeActivity(2596): Header null

    Read the article

< Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >