|
Your question is unclear at best. Please elaborate.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi,
I have ASP.NET webservice which return the ksoap response like this
anyType{schema=anyType{element=anyType{complexType=anyType{choice=anyType{element=anyType{complexType=anyType{sequence=anyType{element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; element=anyType{}; }; }; }; }; }; }; }; diffgram=anyType{}; }
Browser output of my Asmx webservice like this
<DataSet>
<xs:schema id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:int" minOccurs="0"/>
<xs:element name="CategoryName" type="xs:string" minOccurs="0"/>
<xs:element name="Active" type="xs:boolean" minOccurs="0"/>
<xs:element name="CategoryCode" type="xs:string" minOccurs="0"/>
<xs:element name="CreateDate" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram>
<NewDataSet>
<Table diffgr:id="Table1" msdata:rowOrder="0">
<Id>55</Id><CategoryName>Filippo Berio Olive Oil</CategoryName>
<Active>true</Active>
<CategoryCode>FB</CategoryCode>
<CreateDate>2014-07-26T18:42:41.85+08:00</CreateDate>
</Table>
<Table diffgr:id="Table2" msdata:rowOrder="1">
<Id>8</Id>
<CategoryName>Ideal Sunflower Oil</CategoryName>
<Active>true</Active>
<CategoryCode>IO</CategoryCode>
<CreateDate>2014-07-26T18:42:41.85+08:00</CreateDate>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
I was stuck past 7 days how can i parse this. Could any body help to me.
Thanks and regards
kumar
|
|
|
|
|
kk555 wrote: Could any body help to me. With what EXACTLY? You've shown nothing but some markup, presumably XML. What Android code do you need help with? Hint: show the exact code that is giving you trouble.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Dear Readers,
I have a problem parsing the result returned from shell command in Android
Using `ls -l`
Quote: u0_a192@Infinix_X507:/ $ ls -l /storage/sdcard0
drwxrwx--- root sdcard_r 2015-08-14 22:23 2go
drwxrwx--- root sdcard_r 2015-08-15 11:26 360
drwxrwx--x root sdcard_r 2015-08-13 10:25 Android
drwxrwx--- root sdcard_r 2015-08-29 21:09 AppProjects
drwxrwx--- root sdcard_r 2014-01-01 00:00 Assistant
drwxrwx--- root sdcard_r 2015-08-18 10:44 Camera360
drwxrwx--- root sdcard_r 2015-08-11 21:29 DCIM
-rw-rw---- root sdcard_r 808 2015-08-19 05:36 Document.txt
drwxrwx--- root sdcard_r 2015-08-30 07:19 Download
drwxrwx--- root sdcard_r 2015-08-17 19:25 FM Recording
drwxrwx--- root sdcard_r 2015-08-24 17:18 Flash Share
drwxrwx--- root sdcard_r 2015-08-24 10:03 KingMaster
drwxrwx--- root sdcard_r 2015-08-14 04:39 Kingroot
drwxrwx--- root sdcard_r 2015-08-21 06:49 ManifestViewer
drwxrwx--- root sdcard_r 2015-08-30 19:25 Movies
drwxrwx--- root sdcard_r 2015-08-30 19:25 Music
drwxrwx--- root sdcard_r 2015-08-13 06:55 OGWhatsApp
drwxrwx--- root sdcard_r 2015-08-23 14:00 OGWhatsApp Old
drwxrwx--- root sdcard_r 2015-08-11 17:00 Pictures
drwxrwx--- root sdcard_r 2015-08-23 10:59 Rec
drwxrwx--- root sdcard_r 2014-01-01 00:00 Ringtones
drwxrwx--- root sdcard_r 2015-08-24 17:18 ShareSDK
drwxrwx--- root sdcard_r 2015-08-21 14:41 Simple Android Server
drwxrwx--- root sdcard_r 2015-08-23 11:19 VidMate
drwxrwx--- root sdcard_r 2015-08-14 04:00 WhatsApp
drwxrwx--- root sdcard_r 2015-08-30 14:55 Wps
drwxrwx--- root sdcard_r 2015-08-30 17:19 bluetooth
drwxrwx--- root sdcard_r 2015-08-24 15:11 com.facebook.orca
-rw-rw---- root sdcard_r 2999645 2015-08-30 14:55 demo.mp4
drwxrwx--- root sdcard_r 2015-08-29 17:11 dianxin
drwxrwx--- root sdcard_r 2015-08-29 21:29 documents
-rw-rw---- root sdcard_r 112 2015-08-15 07:41 e_config
drwxrwx--- root sdcard_r 2015-08-18 07:00 iQuran
drwxrwx--- root sdcard_r 2015-08-23 14:00 icloudzone
drwxrwx--- root sdcard_r 2015-08-14 11:53 jamb_cbt_science
-rw-rw---- root sdcard_r 112 2015-08-13 20:24 kr-stock-conf
drwxrwx--- root sdcard_r 2015-08-11 17:45 media
drwxrwx--- root sdcard_r 2015-08-23 14:00 mtklog
drwxrwx--- root sdcard_r 2014-01-01 01:00 obb
-rw-rw---- root sdcard_r 1132508 2015-08-14 11:54 pq_commercial.pdf
-rw-rw---- root sdcard_r 6 2015-08-23 13:44 qs.pid
drwxrwx--- root sdcard_r 2015-08-16 07:33 romtoolbox
drwxrwx--- root sdcard_r 2015-08-24 10:03 tbslog
drwxrwx--- root sdcard_r 2015-08-17 04:25 tencent
-rw-rw---- root sdcard_r 69565980 2015-08-23 17:01 update.zip
drwxrwx--- root sdcard_r 2015-08-14 22:26 viber
-rw-rw---- root sdcard_r 8514230 2015-08-30 10:43 vlc.apk
u0_a192@Infinix_X507:/ $
Pls I need help to parse the above result to a list view in a file manager app, such as just to be :
Name : file.zip
Type : dir/file
Permission : -rw-rw--
Date : 2015-09-01 14:49
Etc...
I really need this in Java/Android
|
|
|
|
|
Mukhtar Oyelayo wrote: I have a problem parsing the result returned from shell command in Android And that problem would be what EXACTLY? We're not mind readers! Show us your code if you want help with it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
Hello Dear Readers, I really need ur help (Android support ) in the application am currently developing..
I need help on the android http injection, I.e, App that modifies all the http request in an Android device and inject their headers with an injection host(free), injection URL, proxy address and port etc.
E.g
Proxy host : 10.199.212.2
Port port : 8080
Enable injection: yes | no
Injection method: GET | POST
Injection host : www.Google.com
Injection query/ URL: http://www.google.com/search.php
Injection line: 4
Etc.....
Pls I really need ur (positive) response
|
|
|
|
|
Mukhtar Oyelayo wrote: I really need ur your (positive) response Then you need to tell us exactly what help you want. All you have provided is a general description of some application that you are working on. So tell us what you have done so far (show the code), and exactly where you are stuck.
|
|
|
|
|
Thanks, am really into designing an app performs the following function;-
→Set a custom proxy host and port for the whole device
→modifies all outgoing http requests by injecting with a custom host and URL...
I know you should understand what I mean, features like Auto Proxy app and Simple Android Server which can be found on play store
com.simpleandroidserver.simpleandroidserver
|
|
|
|
|
But you still have not told us which part of this you are having a problem with.
|
|
|
|
|
I am trying to create my first asynctask. In asynctask, after calling PublishProgress in DoInBackground , OnProgressUpdate must execute. But unfortunately it is not working in my code...
Can anybody please tell me what is wrong with my code?
Thanks in advance.
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace AndroidApplication1
{
[Activity(Label = "AndroidApplication1", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
Button btn = FindViewById(Resource.Id.MyButton);
btn.Click += new EventHandler(btn_click);
}
void btn_click(object sender, EventArgs e)
{
new AsyncTest().Execute();
}
}
public class AsyncTest : AsyncTask
{
int Progress;
protected override void OnPreExecute()
{
Console.WriteLine("Pre Execute");
}
protected void OnProgressUpdate()
{
Console.WriteLine("Progress Update");
}
protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
{
while (Progress <10)
{
Console.WriteLine("Do in background");
Progress++;
PublishProgress(Progress);
System.Threading.Thread.Sleep(10);
}
return null;
}
protected override void OnPostExecute(Java.Lang.Object result)
{
Console.WriteLine("Post Execute");
}
}
}
|
|
|
|
|
Member 11131688 wrote: But unfortunately it is not working in my code... What exactly does that mean?
I would question the calls to WriteLine() and Sleep() in the DoInBackground() method.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello all,
I have made a dictionary app that communicates with a database in a server using a webservice. Now my boss wants me to embed the database inside the app so that offline users can also use the dictionary.
Can you give me some advices on how to do that?
How can I add whole database inside an app?
Should I create an XML for each database table?
Is SQLite an option?
I'm open to any advices and suggestions.
Thanks in advance.
|
|
|
|
|
Psst, ditch your idiot boss! Why in the very first place did he need to create an entire server for web services to allow such functionality that in the end he had to download the entire server (in my mind it would be of 900+ MB) to the application.
Ok, lets for a second consider that the application is downloaded and the content is also available. What makes you so sure that the client would have 1GB extra just for your application, most Android devices do not have more than 500 MB of HDD space. In such cases you must use web services. Offline? Which Android device is offline now adays. My (3) Android devices are connected to Internet and when WiFi is not present one of them provides tethering services to the two of the devices.
In the end, if your boss really does want to do this, here is the thing. In Android databases are SQLite. You can read this official Android documentation about Saving Data in SQL Databases[^]. You will be able to find other resources, such as extracting and updating the data along with that document.
Finally, remove the HttpClients from your application and consider using functions to extract the data from the database and show the data on screen.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
when we create custom adapter so inside this class we use a class
like
static class ViewHolder
{
TextView textview;
ImageView imageview;
}
my question is why it static because we create the object of viewholde so if we create it nonstatic then we effect on the code
|
|
|
|
|
|
when i am using toolbar the windows title show bydefult how to hide and use image inside it
|
|
|
|
|
I am writing a command-line application (to be run via adb) that among other things monitors the temperature of an Android platform (by reading the internal temperature sensor).
When the test device overheats, it displays a popup window informing me of this. I need to trap this "high temperature" indication (from a program running at the command line), and log it to the output file.
Does anyone know if there a signal in the Android Linux Kernel for a "high temperature" condition? If there is, how do I trap it?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
|
Am a beginner in android development. I have created one project its running only on lollipop device but not in lower versions of android while am trying to run in lower versions the app get stopped don't know what is the reason ?
It need my app to be run on all devices.What should i do to solve this issue ? Give me your suggestions.
Thank you in advance.
my logcat show this while running in lower android device
<pre>08-13 10:40:47.770 26187-26187/com.sentientit.theiWedplanner E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sentientit.theiWedplanner/com.sentientit.theiWedplanner.Frontpage}: android.view.InflateException: Binary XML file line #10: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:710)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:1930)
at com.sentientit.theiWedplanner.Frontpage.onCreate(Frontpage.java:50)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.sentientit.theiWedplanner.Fragadmob: make sure class name exists, is public, and has an empty constructor that is public
at android.app.Fragment.instantiate(Fragment.java:592)
at android.app.Fragment.instantiate(Fragment.java:560)
at android.app.Activity.onCreateView(Activity.java:4864)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:686)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:1930)
at com.sentientit.theiWedplanner.Frontpage.onCreate(Frontpage.java:50)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sentientit.theiWedplanner.Fragadmob" on path: /system/framework/com.google.android.maps.jar:/data/app/com.sentientit.theiWedplanner-2.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Fragment.instantiate(Fragment.java:582)
at android.app.Fragment.instantiate(Fragment.java:560)
at android.app.Activity.onCreateView(Activity.java:4864)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:686)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:1930)
at com.sentientit.theiWedplanner.Frontpage.onCreate(Frontpage.java:50)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)</pre>
|
|
|
|
|
I am not sure why this is not thrown on other frameworks, but
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sentientit.theiWedplanner.Fragadmob" on path:
tells that the class was not found. I would suggest that you try to look into the API of that library. They would hold the answer for your problem as why is this causing a problem.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
You should look more closely at the error messages:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.sentientit.theiWedplanner.Fragadmob" on path: /system/framework/com.google.android.maps.jar:/data/app/com.sentientit.theiWedplanner-2.apk
|
|
|
|
|
|
All you have given us is an error message, but no context. So it is not possible to tell where in your application the problem arises.
|
|
|
|
|
Use the debugger (to step through each line of code).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|