[android-developers] Digest for android-developers@googlegroups.com - 8 updates in 4 topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    Horrrorgoogle <dharma.kshetri@gmail.com> Apr 23 09:27PM -0700  

    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<http://stackoverflow.com/questions/23244189/soap-header-not-getting-in-android-and-how-to-get-soap-header-in-wcf>
    .

     

    genedyne <genedyne@gmail.com> Apr 23 11:02AM -0700  

    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.

     

    Robert Greenwalt <rgreenwalt@google.com> Apr 23 11:28AM -0700  

    Q1 - not today. We're working on this.
     
    Q2 - not easily.
     
    Is this a common scenario for you?
     
    Regards,
    Robert
     
     

     

    genedyne <genedyne@gmail.com> Apr 23 06:33PM -0700  

    Thanks. Working on it today means it can't be relied upon, even when
    finally released, as there are allot of old phones out there...
     
    We are just bringing an industrial tool to market that operates as
    described. I don't believe there is an easier way to configure the system
    (using bluetooth instead of WIFI might work, as it would not divert email
    routing into a black hole, but we need the range of WIFI).
     
    The current work around is having the user drop the WIFI link, send the
    email, then turn the WIFI link back on (if required).
     
    Cheers,
    Robb.
     
    On Wednesday, April 23, 2014 2:28:14 PM UTC-4, Robert Greenwalt wrote:

     

    genedyne <genedyne@gmail.com> Apr 23 06:37PM -0700  

    For that matter, as the IoT grows, I'd expect there will be plenty of other
    situations where the same issue will arise. I really doubt we're the only
    ones to be so 'creative' ;-)
     
    On Wednesday, April 23, 2014 2:28:14 PM UTC-4, Robert Greenwalt wrote:

     

    Robert Greenwalt <rgreenwalt@google.com> Apr 23 07:37PM -0700  

    How about trying wifi first?
     
     

     

    Raymond Rodgers <raymond@badlucksoft.com> Apr 23 01:27PM -0400  

    Is the alarm working while the screen is on, but it's failing when the
    screen is off? If so, you may need to implement a wakelock or partial
    wakelock for it to work properly.
     
    On 04/19/2014 09:11 AM, Sunil.K wrote:
     
    --
    Raymond Rodgers
    http://www.badlucksoft.com/
    http://anevilgeni.us/

     

    "Danny S." <danny.schimke@googlemail.com> Apr 23 06:55AM -0700  

    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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[android-developers] Digest for android-developers@googlegroups.com - 7 updates in 6 topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    Russell Cecala <red.cricket.blog@gmail.com> Apr 22 07:21PM -0700  

    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:
     
    http://stackoverflow.com/questions/23233215/google-expansion-pack-library-not-using-correct-version-on-main-obb-file
     
    ... 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?

     

    MathieuB <blanchmh@gmail.com> Apr 22 01:35PM -0700  

    If I understand your situation correctly, you shouldn't be using in-app
    billing if it's to buy flowers.
     
    Refer to this section
    : http://developer.android.com/google/play/billing/billing_overview.html#products
     
    "You can use In-app Billing to sell only digital content. You cannot use
    In-app Billing to sell physical goods, personal services, or anything that
    requires physical delivery."
     
    So you should be looking at something like paypal? stripe? etc.
     
    Le mardi 22 avril 2014 00:19:18 UTC-4, Michael Leung a écrit :

     

    Casvah <damccull@gmail.com> Apr 22 04:09PM -0700  

    They're non-moveable for a reason. You would need to have a rooted phone
    with special functionality to move them to an sdcard. Even then, you can't
    move apps with widgets or apps that have services you want to keep running
    because if the card gets unmounted it'll crash them.
     
    On Saturday, April 19, 2014 7:11:15 AM UTC-7, Josphat Muchiri wrote:

     

    Piren <gpiren@gmail.com> Apr 22 03:44AM -0700  

    Haven't checked this group for a while, good to see you're still here :)
     
    On Tuesday, April 22, 2014 1:59:03 AM UTC+3, TreKing wrote:

     

    Casvah <damccull@gmail.com> Apr 21 11:14PM -0700  

    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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[android-developers] Digest for android-developers@googlegroups.com - 19 updates in 6 topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    Michael Leung <michaelchikit@gmail.com> Apr 22 02:19PM +1000  

    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
    http://diary.skynovel.info - My Blog
    http://www.michaelleung.info - My Homepage

     

    Mahmoud Mortada <mody.mortada@gmail.com> Apr 21 08:12PM +0200  

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

     

    TreKing <trekingapp@gmail.com> Apr 21 05:59PM -0500  


    > I want an algorithm to analyze sounds working on android.
     
    Cool. I want a unicorn that shits gold and farts rainbows.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Alvin Schurman <alvin.schurman@gmail.com> Apr 21 07:33PM -0400  

    I would also like that unicorn...
     
    In the meantime, here is a link to a paper benchmarking several FFT
    implementations on Android (PDF):
    http://compmus.ime.usp.br/sbcm/2013/pt/docs/pos_tec_4.pdf
     
    You could also ask Google about "fastest FFT for Android" for some
    nice posts from stackoverflow.
     

     

    Mahmoud Mortada <mody.mortada@gmail.com> Apr 22 01:54AM +0200  

    Thanks Alvin, so I need to implement FFT with c++ .

     

    Mahmoud Mortada <mody.mortada@gmail.com> Apr 22 01:55AM +0200  

    Lol What a machine! If you got it share it with us .

     

    Nathan Barraille <nathan.barraille@gmail.com> Apr 21 03:54PM -0700  

    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!

     

    sourabh sahu <souruitian@gmail.com> Apr 21 02:54PM +0530  

    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

     

    TreKing <trekingapp@gmail.com> Apr 21 06:43AM -0500  


    > 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.
     
     
    What is "the quality" or "the condition" of a building?
    What does this have to do with Android?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    sourabh sahu <souruitian@gmail.com> Apr 21 05:48PM +0530  

    Look at these two images of the same building, one is in bad condition and
    another is good one.I want to develop a program differentiate that.
     
    Regards,
    Sourabh
     
     

     

    TreKing <trekingapp@gmail.com> Apr 21 08:26AM -0500  


    > Look at these two images of the same building, one is in bad condition and
    > another is good one.I want to develop a program differentiate that.
     
     
    What if the image of the "bad condition" is intentional? Like an artistic
    aesthetic? What about the interior? What about the 2 or 3 sides of the
    building you can't see from a 2D image?
    This doesn't really seem possible.
     
    Also, again, what does general, high-level question have to do with Android?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    sourabh sahu <souruitian@gmail.com> Apr 21 11:22PM +0530  

    Because I want to do that in android, thats y I have posted this here..
     
     
    > On Mon, Apr 21, 2014 at 7:18 AM, sourabh sahu <souruitian@gmail.com>
    wrote:
     
    >> Look at these two images of the same building, one is in bad condition
    and another is good one.I want to develop a program differentiate that.
     
    > What if the image of the "bad condition" is intentional? Like an artistic
    aesthetic? What about the interior? What about the 2 or 3 sides of the
    building you can't see from a 2D image?
    > This doesn't really seem possible.
     
    > Also, again, what does general, high-level question have to do with
    Android?
     
    -------------------------------------------------------------------------------------------------
    > 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@googlegroups.com.

     

    TreKing <trekingapp@gmail.com> Apr 21 05:58PM -0500  


    > Because I want to do that in android, thats y I have posted this here..
     
     
    You are asking for a solution to a high-level, conceptual problem. You're
    looking for a generic algorithm. Nothing you've asked is specific to
    Android.
     
    Regardless, I doubt your problem is solvable, given the issues I mentioned
    already.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Sanchiski <sanchiski@gmail.com> Apr 21 11:35AM -0700  

    Did you get any solution on that?
     
    On Saturday, April 9, 2011 9:22:42 AM UTC+2, chen ji wrote:

     

    chaozh <chaozhn@gmail.com> Apr 20 11:41PM -0700  

    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!

     

    chaozh <chaozhn@gmail.com> Apr 20 11:49PM -0700  

    Additional:
    The LinearLayout contains the Menu Item view, if there is a Menu Item view
    in LinearLayou, it will be reused in next show, If there is no enough menu
    item view in LinearLayout, the new one will be created. The problem as I
    described, the GONE menu item view has correct View Id which is provided in
    XML layout. they are cleared with 0 or -1 after PopupWindow is dismissed. I
    don't know what's happened, what's the mechanism of Android View design.
    Your any help are appreciated!

     

    chaozh <chaozhn@gmail.com> Apr 20 11:50PM -0700  

    Additional:
    The LinearLayout contains the Menu Item view, if there is a Menu Item view
    in LinearLayou, it will be reused in next show, If there is no enough menu
    item view in LinearLayout, the new one will be created. The problem as I
    described, the GONE menu item view has incorrect View Id which is provided
    in XML layout. they are cleared with 0 or -1 after PopupWindow is
    dismissed. I don't know what's happened, what's the mechanism of Android
    View design.
    Your any help are appreciated!

     

    chaozh <chaozhn@gmail.com> Apr 21 02:04AM -0700  

    Did some testing, Removing all Menu item views from LinearLayout after
    PopupWindow dismiss and creating new items again if showing, no problem
    found, But why? ScrollerView, LinearLayout and menu item views are all
    created dynamically, why can't we reuse menu item views? why their ids are
    0 after dismiss popupwindow? who did it? Did I miss something in my codes?

     

    chaozh <chaozhn@gmail.com> Apr 21 02:03AM -0700  

    Did some testing, Removing all Menu item views from LinearLayout after
    PopupWindow dismiss and creating new items again if showing, no problem
    found, But why? ScrollerView, LinearLayout and menu item views are all
    created dynamically, why can't we reuse menu item views? why their ids are
    0 after dismiss popupwindow? who did it? Did I miss something in my codes?
     
    Thanks & Regards,
    Chao
     
    On Monday, April 21, 2014 2:41:07 PM UTC+8, chaozh wrote:

     

--
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@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.