Search Results

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

Page 134/1032 | < Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >

  • data is not getting ordered by date

    - by raging_boner
    Can't get list sorted by date. How to show data ordered by date? XDocument doc = XDocument.Load(Server.MapPath("file.xml")); IEnumerable<XElement> items = from item in doc.Descendants("item") orderby Convert.ToDateTime(item.Attribute("lastChanges").Value) descending where item.Attribute("x").Value == 1 select item; Repeater1.DataSource = items; Repeater1.DataBind(); Xml file looks like this: <root> <items> <item id="1" lastChanges="15-05-2010" x="0" /> <item id="2" lastChanges="16-05-2010" x="1" /> <item id="3" lastChanges="17-05-2010" x="1" /> </items> </root>

    Read the article

  • How to read from an XmlReader without moving it forwards

    - by andy
    hey guys, I've got this scenario: while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element && reader.Name == itemElementName) { XElement item = null; try { item = XElement.ReadFrom(reader) as XElement; } catch (XmlException ex) { //log line number and stuff from XmlException class } } } In the above loop I'm transforming a certain node (itemElementName) into an XElement. Some nodes will be good XML and will go into an XElement, however, some will not. In the CATCH, I'd like to now only catch the standard XmlException stuff... I'd also like to catch an extract of the current Xml and a string. However, if I do any kind of READ operation on the node before I pass it to the XElement, it moves the reader forward. How can get a "snapshot" of the contents of the OuterXml of the reader without interfering with it's position?

    Read the article

  • xmlns='' was not expected when deserializing nested classes

    - by Mavrik
    I have a problem when attempting to serialize class on a server, send it to the client and deserialize is on the destination. On the server I have the following two classes: [XmlRoot("StatusUpdate")] public class GameStatusUpdate { public GameStatusUpdate() {} public GameStatusUpdate(Player[] players, Command command) { this.Players = players; this.Update = command; } [XmlArray("Players")] public Player[] Players { get; set; } [XmlElement("Command")] public Command Update { get; set; } } and [XmlRoot("Player")] public class Player { public Player() {} public Player(PlayerColors color) { Color = color; ... } [XmlAttribute("Color")] public PlayerColors Color { get; set; } [XmlAttribute("X")] public int X { get; set; } [XmlAttribute("Y")] public int Y { get; set; } } (The missing types are all enums). This generates the following XML on serialization: <?xml version="1.0" encoding="utf-16"?> <StatusUpdate> <Players> <Player Color="Cyan" X="67" Y="32" /> </Players> <Command>StartGame</Command> </StatusUpdate> On the client side, I'm attempting to deserialize that into following classes: [XmlRoot("StatusUpdate")] public class StatusUpdate { public StatusUpdate() { } [XmlArray("Players")] [XmlArrayItem("Player")] public PlayerInfo[] Players { get; set; } [XmlElement("Command")] public Command Update { get; set; } } and [XmlRoot("Player")] public class PlayerInfo { public PlayerInfo() { } [XmlAttribute("X")] public int X { get; set; } [XmlAttribute("Y")] public int Y { get; set; } [XmlAttribute("Color")] public PlayerColor Color { get; set; } } However, the deserializer throws an exception: There is an error in XML document (2, 2). <StatusUpdate xmlns=''> was not expected. What am I missing or doing wrong?

    Read the article

  • Is it possible to start an activity in a different apk using startActivity on Android using the acti

    - by icecream
    I have tried to write an Android application with an activity that should be launched from a different application. It is not a content provider, just an app with a gui that should not be listed among the installed applications. I have tried the code examples here and it seems to be quite easy to launch existing providers and so on, but I fail to figure out how to just write a "hidden" app and launch it from a different one. The basic use case is: App A is a normal apk launchable from the application list. App B is a different apk with known package and activity names, but is is not visible or launchable from the application list. App A launches app B using the package and class names (or perhaps a URI constructed from these?). I fail in the third step. Is it possible to do this?

    Read the article

  • how to call 2 webmethods from a single webservice in a single activity in android?

    - by Jassi
    hello, I am new in android. i am able to called single webmethod from a .net webservice. i am usuing ksoap2 to implement soap. But in my .net webservice there are many web methods. I want to call more than one web methods. So please give some idea on this matter. Even i have tried by taking 2 soap_action and 2 method_name with single namespace then it works in first request but in 2nd request it gives xmlpullparserException error. thanx in advance,

    Read the article

  • Ways to optimize Android App code based on function call stack?

    - by K-RAN
    I've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct? So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such as refraining from excessively/needlessly creating objects, performing static calls to functions that don't access fields, etc... Is there another way though? Or can this only be done through careful code writing on the programmers' part? Does the JVM/JIT automatically optimize the bytecode during compile time to account for this?? Thanks a lot for your responses!!

    Read the article

  • How to know all id's that i have in the file main.xml in android?

    - by sgiro
    Hello guy's, i'm new at Android world, and i have a doubt, is there any method that give me the name of the id's i create in main.xml? For example i have this: main.xml <TextView android:id="@+id/text1" android:layout_width="70px" android:layout_height="70px" android:text="Google" /> <TextView android:id="@+id/text2" android:layout_width="70px" android:layout_height="70px" android:text="As" /> And what i want is the id name from the two TextView, is there any method that i can use in my class .java that give me for this example the id? In this case i want the (text1 and text2). Thanks and forgive mi English.

    Read the article

  • Openning an App on click of link in email in android?

    - by Amit
    I have a strange requirement for my project.. Suppose I have an app say XYZ installed in an android phone and than I receive an email from the mail server which contains a link like http://XYZ.com/?params(i.e. X=1&Y=2&Z=3) now on click of this link I want to open the XYZ app if it is installed in the phone and in the Activity I would like to get these parameters X,Y and Z and if the app is not installed user should be redirected to play store for downloading XYZ app and after installation app takes charge and behaves as if it was already installed (Opening the first activity with those parameters). How can I achieve that ? I have no idea where to start so even the smallest pointer in right direction will be of great help.

    Read the article

  • Stop node containing subnodes and text in schema

    - by AndyC
    If I have some xml like this: <mynode> <mysubnode> <mysubsubnode>hello world</mysubsubnode> some more text </mysubnode> </mynode> As you can see, mysubnode contains both a subnode and some text data. What I want to know is, is it possible to prevent this happening in a schema? I don't want nodes to contain subnodes and text, just subnodes or text. Is there an option in my xsd I can specify to force this? My program to that uses this xml is written in .NET, so I'll tag it as well incase there's anything of use in .net that I can utilise for this, though I'd much rather that the issue was fixed in the schema itself. Cheers

    Read the article

  • How Android 2.2 interacting with Flash 10.1 (how to use flash from my app)?

    - by zxcat
    Hi! I'm searched adobe and android developers sites, but can't find any details on this. Is it possible to use Flash as a part of my app? E.g. like a widget/GUI element? Or it's integrated in browser only and can't be simple accessible? I know, Adobe AIR apps are supported as standalone .apk. So it must be some API/SDK (from Google) to connect with Flash player. Is there any details, how to program it (more clear: launch swf from my app and interact with it)? Thank you!

    Read the article

  • android localization: Is it a good practice to have only needed resource to put in localized folder?

    - by MobileDev123
    Hi, My application has 4 languages in it. However only one module needs to be localized out of 5, This module has 4 layout files and some images, remaining files can be there in default layout folder and drawable folders. My question is : is it good practice to put only needed files in localization folders, if I leave other files in its respective folders and don't copy them in translation folders, does my application throw NullPointerException when my application runs in other language? and Does android market have any size limit? (Also being a BB developer,AFAIK they do not allow OTA, if the application size grows more than 3 mb) [In case i need to copy the layout and image files]. Note about NullPointerException : it throws in string if you omit some string in localization and application runs in that particular locale. Thanks

    Read the article

  • untrusted (self-sign) certificate on android browser

    - by Basiclife
    Hi all, Apologies for the brevity of this question but due to an unfortunate series of events, I've managed to brick my PC so am posting from my phone... We've just set up Windows Small Business Server 2008 at work which has an external web portal accessible via HTTPS. We haven't yet bought?installed any certificates. The portal provides access to email, sharepoint, remote desktop, etc.... (I'm aware some of these are never going to work on the phone) From firefox / other desktop browsers, this displays an "untrusted cert' warning which I can choose to ignore. When browsing from my mobile I get a popup notification which says. "A secure connection could not be established" when I OK this (my only option) I see the standard android-generated "unable to load page - has it moved?" Page. Does anyone know of a way to either accept the certificate temporarily or allow untrusted certificates generally? I'm aware that the latter option is non-ideal in the mid to long term but at the moment, I need to access the portal and am willing to either toggle settings as/when required or forego using the mobile for banking, etc... to mitigate my risk. Thanks in advance for any help you can provide and apologies again for brevity In case it helps I'm on the G1 running android 1.6 using the default browser

    Read the article

  • Install a web certificate on an Android device

    - by martani_net
    To gain access to WIFI at university I have to login with my user/pass credentials. The certificate of their website (the local home page that asks for the credentials) is not recognized as a trusted certificate, so we install it separately on our computers. The problem is that I don't take my laptop with me often to university, so I usually want to connect using my HTC Magic, but I have no clue on how to install the certificate separately on Android, it is always rejected. [Edit2] : this is what is stated in their website Need for installation of official certificates CyberTrust validated by the CRU (http://www.cru.fr/wiki/scs/) The certificates contain information certified to generate encryption keys for data exchange, called "sensitive" as the password of a user. By connecting to CanalIP-UPMC, for example, the user must validate the identity of the server accepting the certificate appears on the screen in a "popup window". In reality, the user is unable to validate a certificate knowing, because a simple visual check of the license is impossible. Therefore, the certificates of the certification authority (CRU-Cybertrust Educationnal-ca.ca Cybertrust and-global-root-ca.ca) must be installed prior to the browser for the validity of the certificate server can be controlled automatically. Before you connect to the network-UPMC CanalIP you must register in your browser through the certification authority Cybertrust-Educationnal-ca.ca Download the Cybertrust-Educationnal-ca.ca, depending on your browser and select the link below : With Internet Explorer, click on the link following. With Firefox, click on the link following. With Safari, click the link following. If this procedure is not respected, a real risk is incurred by the user: that of being robbed password LDAP directory UPMC. A malicious server may in fact try very easily attack type "man-in-the-middle" by posing as the legitimate server at UPMC. The theft of a password allows the attacker to steal an identity for transactions over the Internet can engage the responsibility of the user trapped ... This is their website : http://www.canalip.upmc.fr/doc/Default.htm (in French, Google-translate it :)) Anyone knows how to install a web certificate on Android?

    Read the article

  • Android failure to boot on LG [migrated]

    - by Ukavi
    I need to recover data from my AT&T LG Thrill Android Phone Background: My AT&T LG Thrill phone's battery died a couple of days ago because I forgot to charge it. When I charged the phone and tried to turn it on, it showed the LG logo followed by the dropping balls and the AT&T "Rethink Possible" screen. I then get a mesage that the Application Google Services Framework has crashed and the phone goes into a loop with the dropping balls showing again followed by "Rethink Possible" screen. This sequence repeats itself over and over and the phone does not get out of this loop. I have been able to go into the recovery screen (both Safe Mode and the Android Recovery Service) and have cleared cache, etc. However, I DO NOT want to wipe user data and restore to factory settings as this will wipe all of my data (pictures, application data, etc). Solution Needed: I need a suggestion to a way of accessing my data so that I can back it up onto an SD card/computer. I DO NOT want to root the phone as this may void the warranty. What I'm looking for is a way of perhaps putting the original flash image on the micro SD card and then have the phone read that image. Or some other similar solution that will get the phone out of this loop and allow me to get to the data.

    Read the article

  • Android webbrowser returns code 500 for webpage on Nginx webserver

    - by Paxxil
    Hey! I've come to a very weird behavior of a web browser on android mobile phone (I've tried HTC Wildfire and HTC Desire phones). I have a web server with Nginx v0.8.54. When i try to open a web page on the phone it shows me error: The requested item could not be loaded! (Status code: 500) BUT it only happens when I am requesting page through Mobile network. On Wifi it works just fine .... but there is more .... if I stop Nginx and start Apache web server it works just fine on both Mobile network and wifi. I've also tried other mobile network and it is the same behavior. Some server stats: Firewall is OFF Selinux is OFF the web page (using Nginx web server) opens normally on any other browser (IE, FF, Opera, Chrome, Safari) on the laptop or PC Nothing in nginx error.log This is the only entry in access.log when the page is requested: xxx.xxx.xxx.xxx - - [17/Mar/2011:11:19:49 -0500] 200 "GET / HTTP/1.1" 27405 "-" "Mozilla/5.0 (Linux; U; Android 2.2; en-gb; Desire_A8181 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" "-" index.html has only "Hello World" string in it. There is no fishy javascript or anything else. .... but there is even more.... if i open the same page on another server, with the same Nginx build, with the same server and web server configuration.... it opens just fine. if anyone has any idea on what may be going on, i would really appreciate it if you let me know. Thanks! EDIT: i forgot to mention that page opens OK on Iphone and Nokia

    Read the article

  • Exchange 2007 with Android activesync

    - by lbanz
    A few of our users noticed that it will stop working intermittently for them. I didn't believe it at first until I changed my android phone and it started occuring for me. It will just stop syncing completely, it looks like the server is blocking the device completely. This mainly occurs when they are using the wifi. I've done some testing. If I switch off the wifi and use the phone data plan it will work fine. When it's on the wifi network, I try and browse to the webmail/owa page and it says page not found! I did a dns lookup and they resolve correctly. If I use another device on the same wifi network, it can access the exchange servers fine. Sometimes the wifi network will just work without any issues. But when it fails, it looks like the phone constantly checks the server every second to see if it is online even though I've got it on manual sync. I was wondering whether it tries to sync too many times and exchange thinks its a denial service attack. My old android phone that works is Froyo and the new one is Icecream. People who have reported issues seems to be newer phones. They also tested their own wifi network at home and experience the same problem. We haven't patch our exchange recently before seeing this problem. Anyone has seen this issue?

    Read the article

  • Correct use of setEmtpyView in AdapterView

    - by Sebi
    I'm really having trouble using the setEmptyView method. I tried it to implement it in GridView and ListView, but both of them didnt work. Here a sample codeblock: networkGames = (GridView) baseLayer.findViewById(R.id.all_game_grid_network); networkGames.setBackgroundResource(R.drawable.game_border); networkGames.setSelector(R.drawable.game_active_border); networkGames.setOnItemClickListener(new NetworkGameListener()); networkGames.setEmptyView(View.inflate(baseLayer, R.drawable.no_network_games, null)); networkGames.setAdapter(new NetworkAdapter()); The network adapter contains no items: private class NetworkAdapter extends BaseAdapter { /* (non-Javadoc) * @see android.widget.Adapter#getCount() */ @Override public int getCount() { return 0; } /* (non-Javadoc) * @see android.widget.Adapter#getItem(int) */ @Override public Object getItem(int position) { return null; } /* (non-Javadoc) * @see android.widget.Adapter#getItemId(int) */ @Override public long getItemId(int position) { return 0; } /* (non-Javadoc) * @see android.widget.Adapter#getView(int, android.view.View, android.view.ViewGroup) */ @Override public View getView(int position, View convertView, ViewGroup parent) { return null; } } I also tried to call networkGames.setAdapter(null), but this doesnt work either. My emtpyView looks like this: <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:text="There are currently no network games available. Start a new one." android:id="@+id/TextView01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"> </TextView> </LinearLayout> I really don't know what I'm doing wrong. I also read various tutorials, but none of them metnioned any problems.

    Read the article

  • Errors when deleting SQlite row

    - by SagiLow
    When i call my func for deleting a row from my DB : public void deleteRow(int rowId) { getWritableDatabase().delete(DatabaseHelper.orderTable, "id="+rowId,null); i get a lot of error messages in the logcat : 06-02 16:32:14.356: E/WindowManager(2770): Activity com.Sagi.MyOrders.FindOrder has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44f50540 that was originally added here 06-02 16:32:14.356: E/WindowManager(2770): android.view.WindowLeaked: Activity com.Sagi.MyOrders.FindOrder has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44f50540 that was originally added here 06-02 16:32:14.356: E/WindowManager(2770): at android.view.ViewRoot.<init>(ViewRoot.java:247) 06-02 16:32:14.356: E/WindowManager(2770): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) 06-02 16:32:14.356: E/WindowManager(2770): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 06-02 16:32:14.356: E/WindowManager(2770): at android.view.Window$LocalWindowManager.addView(Window.java:424) 06-02 16:32:14.356: E/WindowManager(2770): at android.app.Dialog.show(Dialog.java:241) 06-02 16:32:14.356: E/WindowManager(2770): at com.Sagi.MyOrders.FindOrder.alert_editlist(FindOrder.java:56) 06-02 16:32:14.356: E/WindowManager(2770): at com.Sagi.MyOrders.FindOrder.onItemLongClick(FindOrder.java:138) 06-02 16:32:14.356: E/WindowManager(2770): at android.widget.AbsListView.performLongPress(AbsListView.java:1753) 06-02 16:32:14.356: E/WindowManager(2770): at android.widget.AbsListView.access$600(AbsListView.java:72) 06-02 16:32:14.356: E/WindowManager(2770): at android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:1711) 06-02 16:32:14.356: E/WindowManager(2770): at android.os.Handler.handleCallback(Handler.java:587) 06-02 16:32:14.356: E/WindowManager(2770): at android.os.Handler.dispatchMessage(Handler.java:92) 06-02 16:32:14.356: E/WindowManager(2770): at android.os.Looper.loop(Looper.java:123) 06-02 16:32:14.356: E/WindowManager(2770): at android.app.ActivityThread.main(ActivityThread.java:4627) 06-02 16:32:14.356: E/WindowManager(2770): at java.lang.reflect.Method.invokeNative(Native Method) 06-02 16:32:14.356: E/WindowManager(2770): at java.lang.reflect.Method.invoke(Method.java:521) 06-02 16:32:14.356: E/WindowManager(2770): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 06-02 16:32:14.356: E/WindowManager(2770): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 06-02 16:32:14.356: E/WindowManager(2770): at dalvik.system.NativeStart.main(Native Method) I looked for a cursor left open or a DB but there is nothing i could find. right after the function returns, there is : finish(); Thanks you !!!

    Read the article

  • How to make the TextView invisible when there are items in listView?

    - by Raphael Thomas Liewl
    I like to display textView when there are no items in the listView whereas the textView will not display when there are items in the listView. My problem is even there are items in the listView, the textView still will be displayed in a short time and then load the items into listView. So, how to make the TextView invisible when there are items in listView? Here is the codes: public void onCreate(Bundle savedInstancesState){ super.onCreate(savedInstancesState); setContentView(R.layout.list_screen); user = getIntent().getExtras().getString("user"); Log.d("dg",user); getList(); lv = (ListView) findViewById(android.R.id.list); emptyText = (TextView)findViewById(android.R.id.empty); lv.setEmptyView(emptyText); } list_screen.xml <?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" > <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/no_friend" android:gravity="center_vertical|center_horizontal"/> </LinearLayout>

    Read the article

  • xml schema building

    - by amanrahahla
    in xml can any concept inhert the attribute of the main concept as an example: can textbook take the same attribute of book and how? another question if the attribute is a compound noun (i mean two or more words) such as family line it gave me an error when i save it as xml how can i deal with this situation?

    Read the article

  • C# WPF fill datagrid or listview from XML file

    - by Dave
    I have a well formed XML file I would like to fill a datagrid with. I would prefer using the AutoGenerate feature of WFPToolKit datagrid, but could hard code the columns in. The trouble I am having is getting the xml file contents into a datagrid. I had it partially working in a listview, but think a datagrid would be more suited for my needs. Can anyone provide a quick example of how to accomplish this? Thanks!

    Read the article

  • Using returned XML from an authorised HTTP request in vb.NET

    - by Nathan
    Hi, How can I use the returned XML from the reader in a xmltextreader? ' Create the web request request = DirectCast(WebRequest.Create("https://mobilevikings.com/api/1.0/rest/mobilevikings/sim_balance.xml"), HttpWebRequest) ' Add authentication to request request.Credentials = New NetworkCredential("username", "password") ' Get response response = DirectCast(request.GetResponse(), HttpWebResponse) ' Get the response stream into a reader reader = New StreamReader(response.GetResponseStream()) Thanks in advance, Nathan.

    Read the article

  • avoid the use of 'mixed=true' in xml schema

    - by Ralph Kretzler
    I am using xjc to convert a schema to java classes. When I am using mixed=true in the schema I am losing the access method for child nodes instead there is a single general content access method. Is there a way to rewrite the schema without using mixed=true. There is no way that I can change the xml so I have to customize the schema. Schema XML camera or camera Thanks, Ralph

    Read the article

  • asp.net xml editor control

    - by Peter Goras
    All, I am looking for an asp.net xml editor control. Not a WYSIWYG editor like freetextbox or a javascript syntax highlighter but something that would make editing xml in the browser a bit easier than just as text in a textarea. maybe some non-editable areas, collapsable nodes, xsd validation etc. any ideas?

    Read the article

< Previous Page | 130 131 132 133 134 135 136 137 138 139 140 141  | Next Page >