Horrrorgoogle | 24 Apr 06:27 2014
Picon

How to set and get soap header in android and how to get soap header in c#

Actually , i spent lots of time for this. but couldnot find proper solution for getting soap header in android.

What i am doing in android look at this, I trying various method :

String NAMESPACE="http://tempuri.org/" ;

String SOAP_ACTION="http://tempuri.org/ISimpleCustomHeaderService/DoWork" ;

envelope.headerOut = new Element[3]; envelope.headerOut[0] = buildAuthHeader(); private Element buildSessionHeader() { Element nodeElement = new Element().createElement(NAMESPACE, "web-node-id"); nodeElement.addChild(Node.TEXT, "node"); return nodeElement; } private Element buildNodeIDHeader() { Element sessionElement = new Element().createElement(NAMESPACE, "web-session-id"); sessionElement.addChild(Node.TEXT, "session"); return sessionElement; } private Element buildUserHeader() { Element userElement = new Element().createElement(NAMESPACE, "web-user"); userElement.addChild(Node.TEXT, "user"); return userElement; }

================================================================

envelope.headerOut[0] = buildAuthHeader(); ------------------ private Element buildAuthHeader() { String test = "ns"; Element h = new Element().createElement(NAMESPACE, "Header"); Element first = new Element().createElement(NAMESPACE, "web-user"); first.addChild(Node.TEXT, "web_user_name"); h.addChild(Node.ELEMENT, first); Element second = new Element().createElement(NAMESPACE, "web-node-id"); second.addChild(Node.TEXT, "web_node_id"); h.addChild(Node.ELEMENT, second); Element third = new Element().createElement(NAMESPACE, "web-session-id"); third.addChild(Node.TEXT, "web_session_id"); h.addChild(Node.ELEMENT, third); return h; }

====================================================

List<HeaderProperty> headerList=getHeaderList(); ------------ androidHttpTransport.call(SOAP_ACTION, envelope,headerList); --------------- private List<HeaderProperty> getHeaderList() { List<HeaderProperty> headerList = null; try { headerList = new ArrayList<HeaderProperty>(); // String security=HeaderUserName+":"+HeaderPassword; // headerList.add(new HeaderProperty("Authorization", "Basic " + org.kobjects.base64.Base64.encode(security.getBytes()))); headerList.add(new HeaderProperty("web-user", "user Id")); headerList.add(new HeaderProperty("web-node-id","node id")); headerList.add(new HeaderProperty("web-session-id","session id")); }catch (Exception e) { e.printStackTrace(); } return headerList; }

androidHttpTransport.call(SOAP_ACTION, envelope,headerlist);

=========================================== and

Element[] header = new Element[1]; header[0] = new Element().createElement("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","Security"); Element ws = new Element().createElement(null, "web-user"); ws.addChild(Node.TEXT, "First"); Element wni = new Element().createElement(null, "web-node-id"); wni.addChild(Node.TEXT,"Second"); Element wsi= new Element().createElement(null, "web-session-id"); wsi.addChild(Node.TEXT,"Third"); header[0].addChild(Node.ELEMENT, ws); header[0].addChild(Node.ELEMENT, wni); header[0].addChild(Node.ELEMENT, wsi); // add header to envelope envelope.headerOut = header;

Please suggest me what is method above correct set soap header

Would you recommend me how to get soap header in c#.

This problem is also publish on stackoverflow.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
genedyne | 23 Apr 20:02 2014
Picon

Email routing via WIFI or cell

Here is the scenario:

A smart phone is used to interface to a piece of equipment via WIFI (i.e. the equipment provides limited access point capability, and the phone connects to this).
An application on the phone wants to send an email.
It appears that (at least DEFAULT) behavior on phones is to route email via WIFI if connected, and the cellular provider if not connected via WIFI.
Since the WIFI link in this case does not provide internet connectivity, the email SHOULD be routed to the cellular provider.

Q1: Is Android smart enough to figure out that the WIFI link is NOT to the internet, and route the email to the cellular provider? If so, is this basic to android, or is it a feature that may or may not exist depending on the version and/or brand? This is the preferred solution, and I've noted Windows can determine if a network has internet access or not (but might know by doing something dumb, like pinging microsoft servers, etc.)

Q2: Assuming Android is not 'smart enough' or cannot determine the WIFI link is not internet capable, is there a way for the application attempting to send an email to SPECIFY the email is to be routed via the cellular provider? I'm guessing this is unlikely, as a poorly written (or intentionally badly-behaved) application could rack up $$$ using cell data transfer when a perfectly good WIFI link was available.

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danny S. | 23 Apr 15:55 2014

Calendar API and local events only

Hi,

I have a (read-only) database with appointments. I need to store these appouintments into the Android calendar using the CalendarProvider.
There is no sync needed. I don't know how to identify an event (by it's ID) to prevent duplicate entries of the same appointment. Additionally I don't know which appointments to remove if they no longer exists on DB.
Can I save an event with a custom ID or does it come from the API?

What I want:
1. Add events to the Android calendar.
1.1. If the appointment already exists it should not stored twice (no duplicates).
2. Remove events that no longer exists on server side.

Thank you very much in advance, hope someone can give an advice.

-Danny Schimke

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Russell Cecala | 23 Apr 04:21 2014
Picon

google expansion pack library not using correct version on main obb file


In the Google Play Store my app has this APK info: version code 4, version name 4.0 and main.4.com.redcricket.MyBigFatApp.obb 

You can see the screen shot here where I asked this question of SO:


... that proves (right?) that I used ...

      android:versionCode="4"
      android:versionName="4.0">

... in my `AndroidManifest.xml` file. I checked that when I install the app it downloads main.4.com.redcricket.MyBigFatApp.obb to the correct location
but according to logcat the app is looking for ...

04-22 18:13:03.513: I/MyBigFatApp(8455): expFilesDelivered() path_and_fileName = [/mnt/sdcard/Android/obb/com.redcricket.MyBigFatApp/main.1.com.redcricket.MyBigFatApp.obb] DOES NOT EXISTS RETURNING FALSE 

I use almost identical code for other app and they work just fine and not all of them are version 1.  What could possibly be causing this? Is there a bug in Google Play?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Casvah | 22 Apr 08:14 2014
Picon

Nexus 4 windows 8.1 can't install google adb driver.

When trying to install the driver for my n4 in MTP mode, windows reports "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems."

The problem happens with revision 9 of the driver. I used to be able to install in MTP mode without problem, but now windows won't let me. Is there something accidentally missing from the driver file that I have to wait for google to fix, or is there something I can do to make this work?

I also tried Koush's universal adb driver. It installs fine, but I do not see my device in the output of adb devices with this driver.

It seems to work just fine and dandy if I put the device in PTP mode, but that limits my ability to transfer files onto most parts of my device.

What happened and how can I fix it?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Leung | 22 Apr 06:19 2014
Picon

In-app payment system

I know if I process the in-app payment to activate some extra features in my app.
I have to use google checkout. But If I process some payment in the real world, for example, I build an app for flower shop, they want to pay their order. Can I add other payment options?

--
Regards,
Michael Leung
http://www.itblogs.info - My IT Blog

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan Barraille | 22 Apr 00:54 2014
Picon

Understand and reduce Application Resources memory usage

Hello,
I am working on reducing the memory usage of my application, and it looks like one of the part that consumes a lot of it is the application Resources class that gives access to all my drawable pngs. I didn't find a lot of documentation on how it deals with memory, but it looks like it loads the png that are in my res/drawable/* folders when they are needed, and they are actually never released from memory.
I have a couple questions about this:
 - Is this really what happens?
 - Are all screen density images loaded, or just the one adapted for my device?
 - Where kind I find more info about this?

I have a bunch of pngs that are only being used once (Splash screen background, onboarding screens, etc...), but running the Eclipse MAT, it looks like they're never released from the Resources.
 - Is there a way to unload them from the memory once they're not needed anymore?
 - It looks like there is a method for flushing the Resources (http://developer.android.com/reference/android/content/res/Resources.html#flushLayoutCache()), but according to the doc it should only be used for tracking performances. Is it unsafe to use in my context?
 - Should I just not put large images in my res/drawable folder and decode them manually from the disk so that they don't get stored in Resources at all? If yes, where is a good place to store this kind of files?

Thanks!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mahmoud Mortada | 21 Apr 20:12 2014
Picon

FFT algorithm

Hi all
I want an algorithm to analyze sounds working on android.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
sourabh sahu | 21 Apr 11:24 2014
Picon

Quality of a building through its image

Dear All,


   I am looking for any algorithm or program through which we can detect the quality of a building through its image.Lets say I have a photograph of some building, i want to know the condition of building.Is there anything that can be done to do this.


Any help will be highly appreciated.

Regards,
Sourabh

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
chaozh | 21 Apr 08:41 2014
Picon

What's problem with PopupWindow?

I'm using PopupWindow to develop a Menu style UI. The content view of PopupWindow is created programmatically. The outer view is a scrollview and it has a new LinearLayout, the fragment codes is like:
public class ContainerView extends ScrollView {
...
  public ContainerView(Context context) {
super(context);
init();
}
public ContainerView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}

        private void init() {
...
mContentView = new LinearLayout(getContext());
mContentView.setOrientation(LinearLayout.VERTICAL);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
layoutParams.bottomMargin = mArrowHeight;
addView(mContentView, layoutParams); 
}
I just want to dynamically create Menu item before showing PopupWindow, so my codes can accept a user customized Menu item layout and inflate it when user call addMenu function.
But I also want to reuse Menu item view if user dismiss PopupWindow and reshow again! So I setVisibility with GONE when PopupWindow is dismissed and visible it when addMenu is called, the codes just like:
public void addMenu(int id, String title, Drawable d) {
View v = mContainerView.getMenuView(mMenus.size());
mMenus.add(new MenuItem(id, title, d));
if (null != v) {
v.setVisibility(View.VISIBLE);
} else {
v = ((Activity)mContext).getLayoutInflater().inflate(mMenuResId, null);
mContainerView.addMenuView(v);
}
TextView text = (TextView)v.findViewById(mTextResId);
text.setText(title);
text.setId(id);
text.setOnClickListener(mViewOnClickListener);
if (mImageResId > 0) {
ImageView img = (ImageView)v.findViewById(mImageResId);
img.setImageDrawable(d);
img.setId(id);
img.setOnClickListener(mViewOnClickListener);
}
}
The Menu window can display without any error at the first time, but if dismiss it(touch screen out of PopupWindow) and click button to show it again, the exception is raised. The TextView object in the bold line is null. I debugged and the Menu item view is valid and also contains a valid TextView, but the id of TextView is 0, Why? I don't know who reset the id the TextView. I added breakpoint in onDismiss listener and found the ids of all Menu item view are cleared. I have no idea about it. Could you please help me take a look? How could I fix it?
Thanks a lot!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
lselwd | 19 Apr 18:50 2014

reading (with voice by pressing a button) of help-section-page text conflicts with incoming ring & talk... well?

I did a Java/Android app (game). problem
reading (with voice by pressing a button) of help-section-page text conflicts with incoming ring & talk... well?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane