Search Results

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

Page 167/1032 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • Phonegap Android application exiting - but not really - when home button is pressed

    - by Lucas T
    I have created an Phonegap 1.5/Android application. My client reports that, when he leaves the app using the Home button, and then relaunches it using the app icon, the app relaunches from the start instead of resuming. However, when he holds the home button, the app appears in the running apps, and when he accesses the app through this menu, the app resumes in the expected way. I thought this could be linked to the app being automatically closed by the OS due to a lack of memory, but if that was the case the app shouldn't appear in the running apps. I could not reproduce the bug on my Sony Ericsson XPERIA with Android 2.3.4, the client has experienced this behaviour on a Motorola Defy and on another phone (i'll add the reference of the other phone and the OS versions as soon as I get them). The initialization process of the app is declared this way : window.addEventListener('load', function(){ document.addEventListener('deviceready', _onDeviceReady, false); }, false); Could this be fixed by attaching the processes to other events (although I doubt it, the app really seems to be relaunched from the start) ? Is there a declaration to make in the Android Manifest to prevent this behavior ? Is that a known bug in some Android phones/versions ?

    Read the article

  • How to Implement Backbone Java Logic Code into Android

    - by lord_sneed
    I wrote a program to work from the console in Eclipse and the terminal window in Linux. I am now transforming it into an Android app and I have the basic functionality of the Android UI done up until the point where it needs to use the logic from the Java file of the program I wrote. All of my inputs from the Java file are currently from the keyboard (from Scanners). My question is: how do I transform this to get it work with the user interaction of the app? The only input would be from the built in NumberPicker. Should I copy and paste the code from the Java program to the activity file in the onCreate method and change all of the input methods (Scanners) to work with the Android input? Or do I create variables in the activity file and pass them to the Java program (in the separate class)? (If so, how would I do that? the Java file starts from the main method: public static void main(String[] args) {) Also, will the print statements I have, System.out.println(...);, translate directly into the Android UI and print on the screen or do I have to modify those?

    Read the article

  • What is your prefered way to return XML from an ActionMethod in Asp.net MVC?

    - by serbrech
    I am displaying charts that load the data asynchronously because the searches are the work to fetch the data is quite heavy. The data has to be return as XML to make the chart library happy. My ActionMethods return a ContentResult with the type set as text/xml. I build my Xml using Linq to XML and call ToString. This works fine but it's not ideal to test. I have another idea to achieve this which would be to return a view that builds my XML using the XSLT View engine. I am curious and I always try to do the things "the right way". So how are you guys handling such scenarios? Do you implement a different ViewEngine (like xslt) to build your XML or do you Build your XML inside your controller (Or the service that serves your controller)?

    Read the article

  • Is there a way to use a dictionary or xml in the Application Settings?

    - by Shimmy
    I have to store a complex type in the application settings. I thought that storing it as XML would work best. The problem is I don't know how store XML. I prefer to store it as a managed XML rather than using just a string of raw XML having to parse it on each access. I managed to set the Type column of the setting to XDocument, but I was unable to set its value. Is there a way to use XDocument or XML in application settings? Update I found a way, simply by editing the .settings file with the xml editor. I changed it to a custom serializable dictionary, but I get the following error when I try to access the setting-property (I set it to a serialized representation of the default value). The property 'Setting' could not be created from it's default value. Error message: There is an error in XML document (1, 41). Any ideas will be appreciated.

    Read the article

  • Can't display image with Imageview on Android

    - by user1029167
    In my \drawable-mdpi folder, I have an image named: test.jpg In my main.xml file, in my LinearLayout section, I have: <ImageView android:id="@+id/test_image" android:src="@drawable/test" android:layout_width="wrap_content" android:layout_height="wrap_content" /> In my src folder, I have only 1 file, HelloAndroidActivity.java with only the following method: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ImageView image = new ImageView(this); image = (ImageView) findViewById(R.id.test_image); setContentView(image); } This seems to be correct, yet whenever I try to run it, I get The application HelloAndroid (process xxxxx) has stopped unexpectedly. Please try again. The strange part is it previously did display the image, but now it won't and I don't know why. Also, when I comment out the ImageDisplay code, and replace it with TextDisplay code. i.e. TextView tv = new TextView(this); tv.setText("Does this work?"); setContentView(tv); It does display the text. Edit: was asked to post logcat. Link to pastebin.

    Read the article

  • Android Plugin for Eclipse problem

    - by tbneff
    I am using a laptop with Windows 7 Home Prem x64. I have installed Java JDK1.6.0_18 and Eclipse Gallileo. I have downloaded and installed the latest version of Android SDK with several Platforms loaded and a AVD defined. I can install the Android Eclipse plugin from the remote site stated in the instructions. The plugin installation performs without any errors and I can verify that the plugins are indeed installed. My problem begins when I go to Windows - Preferences, there is no Android section to configure. And when I go to File - New - Project, there is no Android Project to choose. I have uninstalled the plugin and reinstalled at least 10 times, trying different things and still no luck. I originally had the 64 bit version of the JDK installed, but removed it and installed the 32 bit version. Has anyone heard of this type of problem? Is it because I am using Windows 7? Thanks for any help. tbneff

    Read the article

  • Port Java Application to Android

    - by mihirk
    I am not so sure about the question or what I should call what I am trying to achieve. I use a dialer called super sify. Here is the download - http://thegoan.com/supersify/supersify.zip The when extracted it has two files for linux, one is a .jar file which consists of some classes. The application was written in java. The other is a .sh file, which is a shell executable and takes some parameters like username and password and machine id and stuff. I want to port this app to android. What exactly would I have to do. Some more information is the .jar file is named supersify.jar and the .sh file is named ss.sh so here is the code for ss.sh java -jar supersify.jar $* if [ $? -eq 1 ] then read fi Please help me out. This is an open source software.So I am not doing any illegal modifications. I need to port this app to android, so would I have to write the whole thing again or just something else. I know some basic hello world android app development, and I have made an app to add two numbers, I am still on my way to become an android app developer, but I need this app and will learn a lot to make this possible unless it involves rewriting all the java classes. Thank you in advance If you have anymore question I will be glad to answer to them :D.

    Read the article

  • Xoom Giveaway Courtesy of the Complete Android Guide [Giveaway]

    - by Jason Fitzpatrick
    If you’re an Android fan and looking to score an Android 3.0 tablet, you can enter to win a Xoom tablet courtesy of the Complete Android Guide. What do you need to do? Per their official rules: Contribute content to the site. To do so: Sign up (via the Register link in the top-right corner). Email android ‘at’ completeguides ‘dot’ net and request contributor access to this site. Write a killer tutorial, reference or chapter for the book.  Buy the book, in paperback or ebook form.  The deadline is March 31, the winner will be drawn in in April. Note: The link to the officials rules appears defunct, we’ll update shortly when the URL is fixed. Xoom Drawing @ Complete Android Guide [Complete Guides] How To Make a Youtube Video Into an Animated GIFHTG Explains: What Are Character Encodings and How Do They Differ?How To Make Disposable Sleeves for Your In-Ear Monitors

    Read the article

  • Google I/O 2010 - Android UI design patterns

    Google I/O 2010 - Android UI design patterns Google I/O 2010 - Android UI design patterns Android 201 Chris Nesladek, German Bauer, Richard Fulcher, Christian Robertson, Jim Palmer In this session, the Android User Experience team will show the types of patterns you can use to build a great Android application. We'll cover things like how to use Interactive Titlebars, Quick Contacts, and Bottom bars as well some new patterns which will get an I/O-only preview. The team will be also available for a no holds barred Q&A session. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 6 0 ratings Time: 58:42 More in Science & Technology

    Read the article

  • Creating SharePoint sites from xml using Powershell

    - by Norgean
    It is frequently useful to create / delete web applications in a development environment. If you need to create a structure, this can quickly become tedious. Enter Powershell, xml and recursive functions. Create the structure in xml. Something like: <Sites>     <Site Name="Test 1" Url="Test1" />     <Site Name="Test 2" Url="Test2" >         <Site Name="Test 2 1" Url="Test21" >             <Site Name="Test 2 1 1" Url="Test211" />             <Site Name="Test 2 1 2" Url="Test212" />         </Site>     </Site>     <Site Name="Test 3" Url="Test3" >         <Site Name="Test 3 1" Url="Test31" />         <Site Name="Test 3 2" Url="Test32" />         <Site Name="Test 3 3" Url="Test33" >             <Site Name="Test 3 3 1" Url="Test331" />             <Site Name="Test 3 3 2" Url="Test332" />         </Site>         <Site Name="Test 3 4" Url="Test34" />     </Site> </Sites> Read this structure in Powershell, and recursively create the sites. Oh, and have cool progress dialogs, too. $snap = Get-PSSnapin | Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" } if ($snap -eq $null) {     Add-PSSnapin "Microsoft.SharePoint.Powershell" } function CreateSites($baseUrl, $sites, [int]$progressid) {     $sitecount = $sites.ChildNodes.Count     $counter = 0     foreach ($site in $sites.Site)     {         Write-Progress -ID $progressid -Activity "Creating sites" -status "Creating $($site.Name)" -percentComplete ($counter / $sitecount*100)         $counter = $counter + 1         Write-Host "Creating $($site.Name) $($baseUrl)/$($site.Url)"         New-SPWeb -Url "$($baseUrl)/$($site.Url)" -AddToQuickLaunch:$false -AddToTopNav:$false -Confirm:$false -Name "$($site.Name)" -Template "STS#0" -UseParentTopNav:$true         if ($site.ChildNodes.Count -gt 0)         {             CreateSites "$($baseUrl)/$($site.Url)" $site ($progressid +1)         }         Write-Progress -ID $progressid -Activity "Creating sites" -status "Creating $($site.Name)" -Completed     } } # read an xml file $xml = [xml](Get-Content "C:\Projects\Powershell\sites.xml") $xml.PreserveWhitespace = $false CreateSites "http://$($env:computername)" $xml.Sites 1 Easy! Sensible real life implementations will also include templateid in the xml, will check for existence of a site before creating it, etc.

    Read the article

  • Xml Serialization and the [Obsolete] Attribute

    - by PSteele
    I learned something new today: Starting with .NET 3.5, the XmlSerializer no longer serializes properties that are marked with the Obsolete attribute.  I can’t say that I really agree with this.  Marking something Obsolete is supposed to be something for a developer to deal with in source code.  Once an object is serialized to XML, it becomes data.  I think using the Obsolete attribute as both a compiler flag as well as controlling XML serialization is a bad idea. In this post, I’ll show you how I ran into this and how I got around it. The Setup Let’s start with some make-believe code to demonstrate the issue.  We have a simple data class for storing some information.  We use XML serialization to read and write the data: public class MyData { public int Age { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public List<String> Hobbies { get; set; }   public MyData() { this.Hobbies = new List<string>(); } } Now a few simple lines of code to serialize it to XML: static void Main(string[] args) { var data = new MyData {    FirstName = "Zachary", LastName = "Smith", Age = 50, Hobbies = {"Mischief", "Sabotage"}, }; var serializer = new XmlSerializer(typeof (MyData)); serializer.Serialize(Console.Out, data); Console.ReadKey(); } And this is what we see on the console: <?xml version="1.0" encoding="IBM437"?> <MyData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Age>50</Age> <FirstName>Zachary</FirstName> <LastName>Smith</LastName> <Hobbies> <string>Mischief</string> <string>Sabotage</string> </Hobbies> </MyData>   The Change So we decided to track the hobbies as a list of strings.  As always, things change and we have more information we need to store per-hobby.  We create a custom “Hobby” object, add a List<Hobby> to our MyData class and we obsolete the old “Hobbies” list to let developers know they shouldn’t use it going forward: public class Hobby { public string Name { get; set; } public int Frequency { get; set; } public int TimesCaught { get; set; }   public override string ToString() { return this.Name; } } public class MyData { public int Age { get; set; } public string FirstName { get; set; } public string LastName { get; set; } [Obsolete("Use HobbyData collection instead.")] public List<String> Hobbies { get; set; } public List<Hobby> HobbyData { get; set; }   public MyData() { this.Hobbies = new List<string>(); this.HobbyData = new List<Hobby>(); } } Here’s the kicker: This serialization is done in another application.  The consumers of the XML will be older clients (clients that expect only a “Hobbies” collection) as well as newer clients (that support the new “HobbyData” collection).  This really shouldn’t be a problem – the obsolete attribute is metadata for .NET compilers.  Unfortunately, the XmlSerializer also looks at the compiler attribute to determine what items to serialize/deserialize.  Here’s an example of our problem: static void Main(string[] args) { var xml = @"<?xml version=""1.0"" encoding=""IBM437""?> <MyData xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> <Age>50</Age> <FirstName>Zachary</FirstName> <LastName>Smith</LastName> <Hobbies> <string>Mischief</string> <string>Sabotage</string> </Hobbies> </MyData>"; var serializer = new XmlSerializer(typeof(MyData)); var stream = new StringReader(xml); var data = (MyData) serializer.Deserialize(stream);   if( data.Hobbies.Count != 2) { throw new ApplicationException("Hobbies did not deserialize properly"); } } If you run the code above, you’ll hit the exception.  Even though the XML contains a “<Hobbies>” node, the obsolete attribute prevents the node from being processed.  This will break old clients that use the new library, but don’t yet access the HobbyData collection. The Fix This fix (in this case), isn’t too painful.  The XmlSerializer exposes events for times when it runs into items (Elements, Attributes, Nodes, etc…) it doesn’t know what to do with.  We can hook in to those events and check and see if we’re getting something that we want to support (like our “Hobbies” node). Here’s a way to read in the old XML data with full support of the new data structure (and keeping the Hobbies collection marked as obsolete): static void Main(string[] args) { var xml = @"<?xml version=""1.0"" encoding=""IBM437""?> <MyData xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> <Age>50</Age> <FirstName>Zachary</FirstName> <LastName>Smith</LastName> <Hobbies> <string>Mischief</string> <string>Sabotage</string> </Hobbies> </MyData>"; var serializer = new XmlSerializer(typeof(MyData)); serializer.UnknownElement += serializer_UnknownElement; var stream = new StringReader(xml); var data = (MyData)serializer.Deserialize(stream);   if (data.Hobbies.Count != 2) { throw new ApplicationException("Hobbies did not deserialize properly"); } }   static void serializer_UnknownElement(object sender, XmlElementEventArgs e) { if( e.Element.Name != "Hobbies") { return; }   var target = (MyData) e.ObjectBeingDeserialized; foreach(XmlElement hobby in e.Element.ChildNodes) { target.Hobbies.Add(hobby.InnerText); target.HobbyData.Add(new Hobby{Name = hobby.InnerText}); } } As you can see, we hook in to the “UnknownElement” event.  Once we determine it’s our “Hobbies” node, we deserialize it ourselves – as well as populating the new HobbyData collection.  In this case, we have a fairly simple solution to a small change in XML layout.  If you make more extensive changes, it would probably be easier to do some custom serialization to support older data. A sample project with all of this code is available from my repository on bitbucket. Technorati Tags: XmlSerializer,Obsolete,.NET

    Read the article

  • Curiosity on any Smartphones that Run on Android 2.3.3 with Different Screen Reoslution

    - by David Dimalanta
    I have a question regarding about any smartphones that run only in Android 2.3.3. Is the size of screen or the screen resolution is always HVGA or does it have capable of running this OS (Android 2.3.3) on big screen size (4" to 5") at about 720x1280? I'm thinking of the game's compatibility depending on the version of the Android OS and the screen resolution, which affects the change of coordinates especially for assigning touch buttons and drag-n-drop at exact location, before I'm gonna decide to make one. My program works on the Android 4 ICS and Jellybean, however, will that work on Android 2.3.3 in spite of precise touch coordinate or just dependent on the screen resolution (regardless how large it is) as the X and Y coordinate? And take note, I'm using Eclipse IDE for Java developers.

    Read the article

  • Google I/O 2010 - Writing real-time games for Android redux

    Google I/O 2010 - Writing real-time games for Android redux Google I/O 2010 - Writing real-time games for Android redux Android 201 Chris Pruett This session is a crash course in Android game development: everything you need to know to get started writing 2D and 3D games, as well as tips, tricks, and benchmarks to help your code reach optimal performance. In addition, we'll discuss hot topics related to game development, including hardware differences across devices, using C++ to write Android games, and the traits of the most popular games on Market. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 10 0 ratings Time: 58:57 More in Science & Technology

    Read the article

  • SQL Server and the XML Data Type : Data Manipulation

    The introduction of the xml data type, with its own set of methods for processing xml data, made it possible for SQL Server developers to create columns and variables of the type xml. Deanna Dicken examines the modify() method, which provides for data manipulation of the XML data stored in the xml data type via XML DML statements. Too many SQL Servers to keep up with?Download a free trial of SQL Response to monitor your SQL Servers in just one intuitive interface."The monitoringin SQL Response is excellent." Mike Towery.

    Read the article

  • Création du forum XQUERY et base de données XML, dédié aux utilisations de XML comme base de données ou avec des SGBD relationnels

    Création d'un forum XQUERY et base de donnée XML dédié aux utilisation de XML en tant que base de donnée ou avec des SGBD relationnels Le développement du format XML, en particulier dans un contexte d'utilisation documentaire (Ooo, word...) mais aussi d'échange de donnée, dut à la complexification de ces mêmes données, a amené à une interaction accrue entre les fichiers XML et les SGBD. Différentes types de solutions ont vues le jour :ensemble de fichier XML intégration dans des SGBD relationnels SGBD XML natif ... Et différents langages d'extraction/constitution pour utiliser ces même données , en fonction de l'environnement...

    Read the article

  • Automate XML : Xproc devient une recommandation du W3C

    Automate XML : Xproc devient une recommandation du W3C Depuis le 11 mai, les technologies XML peuvent enfin compter dans leur rang un standard consacrer à la production de XML. Xproc est un langage permettant de décrire les différentes étapes d'une chaîne de production de XML. On savait inclure des XML avec Xinclude, faire des liens avec Xlink,poser des conditions en Xpath,valider en XML Schema,requêter en Xquery, transformer en XSLT, ce nouveau langage vous permettra enfin d'organiser et d'automatiser ces différentes opérations (et bien d'autres...) en les séquençant et les conditionnant . Il a toujours été possible de programmer ces différentes opérations,de les combiner, mais aujourd'hui vous dipos...

    Read the article

  • SDK Android : améliorations de performances pour l'émulateur avec le support du GPU

    SDK Android : améliorations de performances pour l'émulateur avec le support du GPU Google vient de publier une mise à jour du kit de développement (SDK) pour Android. Au coeur de cette nouvelle version, des améliorations de performances et de nouvelles fonctionnalités pour l'émulateur Android qui viennent résoudre le problème de lenteur de l'environnement qui ne cadrait plus avec les nouvelles versions de l'OS. L'outil permettant aux développeurs de tester leurs applications Android sur un ordinateur de bureau prend désormais en charge le GPU pour Android 4.X. Cette nouveauté va permettre de profiter de l'accélération matérielle pour avoir une simulation plus réaliste de...

    Read the article

  • Google déploie Android 4.2 et publie son code source ainsi que son SDK

    Fuite des fonctionnalités d'Android 4.2 : nouveau Google Play, gestion du multi-utilisateur et contrôle parental Google a récemment envoyé des invitations à la presse pour un évènement Android le 29 octobre prochain à New York. Au cours de cet évènement, l'éditeur pourrait dévoiler Android 4.2, une mise à jour mineure de la version 4.1, Jelly Bean. Cette nouvelle a laissé place à des rumeurs qui viennent dévoiler quelques-unes des nouvelles fonctionnalités et améliorations qu'apportera cette version d'Android. Selon le site spécialisé Android Police, la prochaine mise à jour de l'OS mobile de Google apportera une nouvelle version de la galerie d'applications...

    Read the article

  • Fuite des fonctionnalités d'Android 4.2 : nouveau Google Play, gestion du multi-utilisateur et contrôle parental

    Fuite des fonctionnalités d'Android 4.2 : nouveau Google Play, gestion du multi-utilisateur et contrôle parental Google a récemment envoyé des invitations à la presse pour un évènement Android le 29 octobre prochain à New York. Au cours de cet évènement, l'éditeur pourrait dévoiler Android 4.2, une mise à jour mineure de la version 4.1, Jelly Bean. Cette nouvelle a laissé place à des rumeurs qui viennent dévoiler quelques-unes des nouvelles fonctionnalités et améliorations qu'apportera cette version d'Android. Selon le site spécialisé Android Police, la prochaine mise à jour de l'OS mobile de Google apportera une nouvelle version de la galerie d'applications...

    Read the article

  • help with xml parsing using php

    - by fayer
    i've got following example xml: <entity id="1"> <name>computer</name> <type>category</type> <entities> <entity id="2"> <name>mac</name> <type>category</type> </entity> <entity id="3"> <name>linux</name> <type>category</type> <entities> <entity id="4"> <name>ubuntu</name> <type>category</type> </entity> <entity id="5"> <name>redhat</name> <type>category</type> <entities> <entity id="6"> <name>server</name> <type>category</type> </entity> <entity id="7"> <name>desktop</name> <type>category</type> </entity> </entities> </entity> </entities> </entity> </entities> </entity> if i've got an id, lets say 5. is it possible to retrieve the following: the name of the entity with the id=5 (redhat) ALL the child entities and their name and id (server/6 and desktop/7) all the parent entities and their name and id (computer/1, mac/2 and linux/3) im a noob on parsing xml. is this accomplished by xpath only or xquery/xpath? i would appreciate if someone could give me some example code to do this with simplexml. thanks!

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >