[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 19 Topics

Comments: (0)

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

    vani reddy <vani.reddy.blore@gmail.com> Mar 01 12:25PM +0530  

    Hi friends,,
    In my tabactiviy i am doing a startActivityForResult from ActivityA which
    is under activity group to a new class ActivityB which is not under
    Tabactivity,
    From ActivityB when i do setResult(RESULT_OK,intent); finish();
    onActivityResult is never invoked in ActivityA.
    It is not working.
     
    I referred this link but did not understand much .
    http://stackoverflow.com/questions/2497205/how-to-return-a-result-startactivityforresult-from-a-tabhost-activity
     
    --
    Regards,
    Vani Reddy

     

    moktarul anam <moktarul@gmail.com> Feb 29 10:51PM -0800  

    Reddy,
    hmm... do this way..
    in textview setbackground .. one xml file .. that file will be in drawable
    file
     
    and there u set background. Basically u add set background drawable xml
     
    Moktarul
     
     
     
     
    On Wednesday, 29 February 2012 17:21:40 UTC+5:30, Reddy wrote:

     

    TreKing <trekingapp@gmail.com> Feb 29 10:00PM -0600  


    > i don't know why this happen,,,
     
    Step 1, read your stack track "Cause by" line.
     
     
    > android.media.MediaPlayer._stop(Native Method)
    > 02-29 21:19:31.765: E/AndroidRuntime(5374): at android.media.*
    > MediaPlayer.**stop*(MediaPlayer.java:964)
     
    Step 2, read the documentation to see why that method would throw that
    exception.
    http://developer.android.com/reference/android/media/MediaPlayer.html#stop%28%29
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    vivek elangovan <elangovan.vivek@gmail.com> Feb 29 08:38PM -0800  

    Hi members,
    Using DOMParser i m able to retrieve XML data from my
    database.Now i need to pass the "name" which i retrieved to other class
    using intenet,but i m not able to read it here is my code :
     
    void parseByDOM(String response) throws ParserConfigurationException,
    SAXException, IOException {//response is ur xml as string
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(new InputSource(new
    StringReader(response)));
    // normalize the document
    doc.getDocumentElement().normalize();
    // get the root node
    NodeList nodeList = doc.getElementsByTagName("user");
    Node node=nodeList.item(0);
    // the node has three child nodes
    for (int i = 0; i < node.getChildNodes().getLength(); i++) {
    Node temp=node.getChildNodes().item(i);
    if(temp.getNodeName().equalsIgnoreCase("name")){
    String name = temp.getTextContent();
    System.out.println("name :"+name);
     
    }
    else if(temp.getNodeName().equalsIgnoreCase("mail")){
    String mail=temp.getTextContent();
    }
    else if(temp.getNodeName().equalsIgnoreCase("phno")){
    String phno=temp.getTextContent();
    }
     
    }

    Intent i = new Intent(getApplicationContext(), test.class);
    i.putExtra(name,name);
    startActivity(i);
    }
     
     
    and in my test.java i m using like this :
     
    name.setText(getIntent().getStringExtra("name"));

     

    moktarul anam <moktarul@gmail.com> Feb 29 09:46PM -0800  

    Hi
     
    i.putExtra(name,name);
    this will me
    i.putExtra("name",name);
     
    Enjoy
    Moktarul anam
     

     
     
    On Thursday, 1 March 2012 10:08:17 UTC+5:30, vivek elangovan wrote:

     

    TreKing <trekingapp@gmail.com> Feb 29 09:57PM -0600  


    > Could you please explain how do correct my idea?
     
     
    Your idea is not very clear. You should try to clarify.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    moktarul anam <moktarul@gmail.com> Feb 29 09:41PM -0800  

    hi Stan,
    its not clear... can u send me ur sample template ir images ? or can u
    clearly explain
     
    Moktarul
     
     
    On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
     
    > Could you please explain how do correct my idea?
    > (Or may be key words to search in google...)
     
    > Thanks.
     
    On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
     
    > Could you please explain how do correct my idea?
    > (Or may be key words to search in google...)
     
    > Thanks.
     
    On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:
     
    > Could you please explain how do correct my idea?
    > (Or may be key words to search in google...)
     
    > Thanks.
     
    On Wednesday, 29 February 2012 18:10:03 UTC+5:30, Stan Prihodko wrote:

     

    Jagruti Sangani <jagruti.sangani@inextrix.com> Feb 29 09:24PM -0800  

    Hello,
     
    I am using the SIP demo example from the link "developer.android.com/
    resources/samples/SipDemo/index.html".It is work perfectly on emulator
    but when i plugin the samsung galaxy Y 2.3.6 with pc and try to run on
    mobile then user not registered in that and also the manager is come
    as null.Internet in mobile is on but still registration of user not
    occure in that.whle in emulator run then all things work perfectly.So
    can anybody know what is the problem ?Why it is not run in mobile?Is
    there any require to run on phone.

     

    Jagruti Sangani <jagruti.sangani@inextrix.com> Mar 01 10:42AM +0530  

    Thanks but it is now working, no need to use this class.just i need to dtmf
    coed like for * 10 and for # 11.
     

     

    Jagruti Sangani <jagruti.sangani@inextrix.com> Mar 01 10:40AM +0530  

    Ok, now you had mute the call and whenever you want to comeback from mute
    that means not mute at that time you do just reverse process of this.That
    means first check is it mute if yes then make mAudioManager.
     
    > setMicrophoneMute(false);
     
    I have not tried but it might be working.
     
     
    On Wed, Feb 29, 2012 at 9:51 PM, brian lee <brian@brianlee.org> wrote:
     

     

    mQdg <quieldeguzman@gmail.com> Feb 29 09:04PM -0800  

    I am trying to automatically scroll the browser by "flicking". So far,
    I can do scrolling by using "drag" event.
    I appreciate if you can give me hints to accomplish this.

     

    Prince Kumar <princekumar.arora@gmail.com> Mar 01 10:25AM +0530  

    Where i have to change in the Server Managed Policy class so that it
    works only for 7 days trial and after that user have to buy the app
    from android market place?
     
    Thanks & Regards,
    Prince

     

    TreKing <trekingapp@gmail.com> Feb 29 08:03PM -0600  


    > sorry, my bad. it is uses the 2.3.3 avd even though the 4.0.3 target is
    > checked in eclipse. so it seems to be stuck using the 2.3.3 target.
     
     
    Your build target and AVDs are two separate things.
    The build target specifies which version of the platform you are building
    against. This is usually the latest.
    The AVD defines a configurable runtime environment to test your app
    against. You need to create a 4.0.3 AVD and choose it when launching your
    app.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Ray Tayek <rtayek@ca.rr.com> Feb 29 06:56PM -0800  

    At 06:03 PM 2/29/2012, you wrote:
    >sorry, my bad. it is uses the 2.3.3 avd even though the 4.0.3 target
    >is checked in eclipse. so it seems to be stuck using the 2.3.3 target.
     
    >Your build target and AVDs are two separate things.
     
    ok.
     
    >building against. This is usually the latest.
    >The AVD defines a configurable runtime environment to test your app
    >against. You need to create a 4.0.3 AVD and choose it when launching your app.
     
    i have both. i created the 4.0.3 first.
     
    how do i tell eclipse to use the 4.0.3 one?
     
    thanks
     
    ---
    co-chair http://ocjug.org/

     

    TreKing <trekingapp@gmail.com> Feb 29 10:03PM -0600  


    > how do i tell eclipse to use the 4.0.3 one?
     
     
    The Debug tool bar icon has a dropdown, at the bottom is an entry for
    "Debug Configurations". Open that, select your application, the select the
    Target tab, and change "Automatic" to "Manual".
     
    Or, launch the AVD first, then launch the app to debug - it should choose
    the open AVD.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    tsukishiro yamazaki <tsukishiro88@gmail.com> Feb 29 06:08PM -0800  

    Hi,
     
    I am working on a customized IME. Basically, I want to create a
    transparent keyboard (similar to Tranparent Keyboard app on the
    market). I want my IME to be on top of the UI or application behind
    it. So I really don't want the window or screen to resize when the
    keyboard is displayed. Does anyone know how to disable window or
    screen resizing for IMEs?
     
    Please offer suggestions,
    Thanks and best regards,
    tsukishiro

     

    JJ B <jjbjmanagement@gmail.com> Feb 29 08:12PM -0500  

    Great, Thanks (and please clarify if this also works with the full paid
    versions if you know)
     
    2012/2/29 Kostya Vasilyev <kmansoft@gmail.com>
     

     

    TreKing <trekingapp@gmail.com> Feb 29 08:04PM -0600  

    2012/2/29 JJ B <jjbjmanagement@gmail.com>
     
    > please clarify if this also works with the full paid versions if you know)
     
     
    Paid apps will show that an update is available, but the user will not be
    able to update it if they have not paid for it via the Android Market.
     
    This is easily evidenced by getting an app on the Amazon Appstore that is
    then abandoned there and updated on the Android Market instead.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    flumby <jay.mojnidar@gmail.com> Feb 29 05:55PM -0800  

    In my project, I need to access an IP Address through mobile connection
    --irrespective of whether it is connected to mobile or WIFI network. My
    code is similar to below:
     
     
    connMan = (ConnectivityManager)
    getSystemService(Context.CONNECTIVITY_SERVICE);
    int res =
    connMan.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
    "enableHIPRI");
     
    Then when I get the notification that HIPRI is available, I call:
    boolean reqRes =
    connMan.requestRouteToHost(ConnectivityManager.TYPE_MOBILE_HIPRI,
    ipAddress);
     
    This is working fine. My app can connect to the URL specified in the
    ipAddress. My app can send requests, and receive responses. However, the
    connection gets disconnected after about a minute. Is there a way to have
    HIPRI connection for longer time?
     
    To make a short story long, I see the following in the log:
    D/ConnectivityService( 1640): ignoring as dup is found
    stopUsingNetworkFeature for net 5: enableHIPRI by 9683/10033(expire -
    created 60026 mSec ago)
     
    I took a look at the source and I see that in ConnectivityService.java, in
    the implementation of requestRouteToHost method, it calls:
     
    mHandler.sendMessageDelayed (mHandler.obtainMessage
    (NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK, f),
    getRestoreDefaultNetworkDelay());
     
    And I see that getRestoreDefaultNetworkDelay is returning 60000. So, I know
    why my app is getting disconnected after about a minute.
    My question is, how can I have HIPRI connection for a longer period -at
    least 30 minutes?

     

    tsukishiro yamazaki <tsukishiro88@gmail.com> Feb 29 05:44PM -0800  

    Sorry if this sounds annoyingly persistent but what is the use of
    TOUCHABLE_INSETS_REGION constant in the first place? I thought it's
    supposed to limit the touchable regions in the input view of the soft
    keyboard. Is this wrong?
     

     

    tsukishiro yamazaki <tsukishiro88@gmail.com> Feb 29 05:41PM -0800  

    Hello all,
     
    I came upon an IME called Transparent Keyboard.apk
    It's an onscreen keyboard that keeps everything behind it in tack.
    In other words, it doesn't resize or pan the contents behind to make
    room for the keyboard.
    Does anyone know how this was done?
    I want my own IME to do this as well and I found "adjustNothing" value
    for windowSoftInputMode.
    But if I think this is only applicable to activity and not to service.
    Can someone help me with this one?
     
    Thanks and best regards,
    tsukishiro

     

    John Lussmyer <johnlussmyer@gmail.com> Feb 29 05:35PM -0800  

    On another thread, someone pointed me to the Pantech PC Suite, which also
    installs the USB drivers.
    That worked for me.
     
     
    --
    --
    CasaDelGato Sensible Email package:
    https://sourceforge.net/projects/sensibleemail/

     

    moktarul anam <moktarul@gmail.com> Feb 29 02:51AM -0800  

    Hi Sugan ,
    there s something C2DM. Funda is u hav to connect ur device to some server
    . and there will be one background service will be running. whenever new
    message will come to server ... service will through notification.
     
    in android there c2dm already there. u can use decona and metero also(
    http://deacon.daverea.com/)
     
     
    Enjoy
    Moktarul anam
     
     
    On Monday, 27 February 2012 17:33:38 UTC+5:30, Sugan wrote:

     

    Yuvi <testandroidos51@gmail.com> Feb 28 05:04AM -0800  

    Is there no one who have faced this problem.. Even I have posted on
    StackOverflow, But No Answer
     
    On Tuesday, February 28, 2012 12:16:04 PM UTC+5:30, Yuvi wrote:

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
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

[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 21 Topics

Comments: (0)

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

    Ray Tayek <rtayek@ca.rr.com> Feb 29 05:05PM -0800  

    At 04:36 PM 2/29/2012, you wrote:
    >i wanted to switch back to 4.0.3, but eclipse seems to be stuck on
    >the 4.0.3 target.
     
    >That's not very clear. Like, what is "seems to be stuck"?
     
    sorry, my bad. it is uses the 2.3.3 avd even though the 4.0.3 target
    is checked in eclipse. so it seems to be stuck using the 2.3.3 target.
     
    thanks
     
    ---
    co-chair http://ocjug.org/

     

    Ahmed Mahmoud <ahmed.yousef991@gmail.com> Feb 28 01:13PM -0800  

    Hi guys
    i'm CS student and on my way to start the graduation project
     
    but i dont hava an idea yet
    so i hope to find anyone here to help me to choise a good idea

     

    TreKing <trekingapp@gmail.com> Feb 29 07:05PM -0600  


    > so i hope to find anyone here to help me to choise a good idea
     
     
    Anyone here with a "good" idea is probably already working on it and
    keeping it to themselves.
     
    Ask yourself:
    "What do I need?"
    "What would I pay for?"
    "What is not already available?"
    "What is lacking in some app I already use?"
     
    Answer one or more of those and you should get some ideas, pimp.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Chris Stratton <cs07024@gmail.com> Feb 29 05:00PM -0800  

    On Wednesday, February 22, 2012 7:28:59 AM UTC-5, Michael wrote:
    > to be happening on other threads [that we can observe using
    > traceview]. But they account for a large difference between the
    > measured 'excl real msec' and 'incl real msec' on the ICS device.
     
    I think the most interesting question would be to figure out what is
    happening during that time - something in another process, something in the
    kernel, or something in a somehow invisible (?) thread in your process?
    One contrasting tool your might throw at the problem would be top - ie
     
    adb shell 'top -t -m 5'
     
    Should show the top 5 five cpu-hogging threads system wide regardless of
    the process they belong to.
     
    An interesting question would be what happens if you do the same
    processing, but on data not derived from the camera, ie without activating
    the camera.
     
    Perhaps something else is looking at the camera - is the platform trying to
    do something fancy like software focusing, face recognition, scaling? Is
    the new implementation broken?

     

    Mark Winchester <mwinchester@gmail.com> Feb 29 07:07AM -0800  

    I'm having trouble with the ActionBar and tabs, trying to get the look and
    feel that I've got in mind. I want an action bar, at the top, with a
    couple of Spinners, TextViews, and a button. Underneath that, I'd like a
    row of Tabs, and below that the actual content. The top portion of my
    ActionBar is coded up, working, and looking how I want it. I'm struggling
    with the tab portion, though. I started out trying to add a TabHost,
    TabWidget, etc. to the layout, which would appear under the ActionBar. It
    seems that all of that functionality is deprecated, and we're supposed to
    be using the ActionBar for the tabs. If I can achieve the look that I'm
    going for, I haven't found a way to do it. Anybody got any examples of
    what I'm looking for? I appreciate any help.
     
    -Mark

     

    emil10001 <e.john.feig@gmail.com> Feb 29 12:54PM -0800  

    I just posted a sample project on my github that demos how to do
    this: https://github.com/emil10001/SimpleActionBarTabs
     
    -John
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:
    > going for, I haven't found a way to do it. Anybody got any examples of
    > what I'm looking for? I appreciate any help.
     
    > -Mark
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:

     

    emil10001 <e.john.feig@gmail.com> Feb 29 07:58AM -0800  

    Take a look at the demos available for ActionBarSherlock<http://actionbarsherlock.com/samples.html>.
    It may not be exactly the same if you aren't using that lib, but he tries
    to get very close to the normal experience. Anyway, from what I've seen
    (I'm using a Nav List in my ActionBar), you get one main type of navigation
    that is assigned to the ActionBar, whether it's tabs or a navigation list.
    Other buttons assigned to the ActionBar can be used for navigation, but
    will need to be implemented separately. I haven't used tabs myself (not
    attached to the ActionBar anyway), but from what it looks like, if you set
    it up correctly, the tabs will show up either in-line or stacked depending
    on whether or not there's space. I would download the demo's that I linked
    and follow along with the app that implements<https://market.android.com/details?id=com.actionbarsherlock.sample.demos>all of those demos.
     
    The alternative would be to do what you did and build the tabs separately.
    I did this for my Reddit Mail<https://market.android.com/details?id=com.feigdev>app without issue. If I were to re-do that app, I would probably use the
    ActionBar to handle it, mainly because I now have a pretty good idea of how
    those work.
     
    -John
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:
    > going for, I haven't found a way to do it. Anybody got any examples of
    > what I'm looking for? I appreciate any help.
     
    > -Mark
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:
    > going for, I haven't found a way to do it. Anybody got any examples of
    > what I'm looking for? I appreciate any help.
     
    > -Mark
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:
    > going for, I haven't found a way to do it. Anybody got any examples of
    > what I'm looking for? I appreciate any help.
     
    > -Mark
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:
    > going for, I haven't found a way to do it. Anybody got any examples of
    > what I'm looking for? I appreciate any help.
     
    > -Mark
     
    On Wednesday, February 29, 2012 10:07:42 AM UTC-5, Mark Winchester wrote:

     

    Craig Smith <craigsm78@gmail.com> Feb 29 08:43AM -0800  

    Just put the modes in drop down beside the category in the Action Bar.
     
    It still looks good that way, even with another set of clicks.
     
    -Craig
     

     

    Prince Kumar <princekumar.arora@gmail.com> Feb 28 11:57PM -0800  

    Where i have to change in the Server Managed Policy class so that it
    works only for 7 days trial and after that user have to buy the app
    from android market place?

     

    "Анастасия Сергеевна" <babicheva.ps07a@gmail.com> Feb 29 12:56AM -0800  

    Hello.
     
    I want creates shapes(rectangle, oval, square, etc) in runtime. Also I want
    drag and drop shapes that I create.
    My question is: may I for my goals create one class named, for example,
    Shape extended View and simply provide different constructors for each kind
    of shape or I must create many classes for different shapes?
    And how I can implement drag and drop? in extended View class or in
    Activity class?

     

    lazer <rosslazer@gmail.com> Feb 28 07:54PM -0800  

    I am trying to use a button on an arduino board to reload a
    webview. Unfortunately I am having a very hard time understanding how
    Android parses the data from the arduino board. Can anyone clarify how I
    would go about using a button on an arduino board to reload a webview?
     
    Thanks

     

    emil10001 <e.john.feig@gmail.com> Feb 29 07:26AM -0800  

    For prettier formatting of this message, this question has been posted
    on StackOverflow - http://stackoverflow.com/q/9490558/974800 . I am
    posting here due to a lack of response there.
     
    I am writing an app that has a couple of fragment views managed by an
    activity. The fragments are basically a GridView with a bunch of
    images and a details view that is triggered when the user clicks on an
    image in the GridView.
     
    This all works fine, except that since there is a lot of other stuff
    going from the activity to the grid fragment (I am continuously adding
    things to the grid view and displaying them immediately), it takes
    several seconds for the click to be recognized. I had assumed that
    building the image would be the time-consuming bit, and that when I
    click the item, that that event should be sent to the activity
    immediately, since there isn't any heavy lifting involved. Once the
    message gets to the activity, the activity will stop updating the grid
    view, and work on building the details view.
     
    The issue here is that clicking an element in the grid view is taking
    several seconds (5 to 10 on a slower phone) to register. What do I
    need to do to speed this action up?
     
    Relevant GridFragment code:
     
    public class GridFragment extends Fragment{
    ...
    public class ImageAdapter extends BaseAdapter {
    private GridContent gridContent;
    private Context mContext;
     
    ...
    public View getView(final int position, View convertView,
    ViewGroup parent) {
    // ImageView is my private holder class
    ImageView imageView;
    imageView = new ImageView(mContext);

    imageView.setImageBitmap(gridContent.get(position).getThumb());
     
    imageView.setOnClickListener(new View.OnClickListener() {
     
    @Override
    public void onClick(View view) {
    // This is what I expect to see immediately upon
    clicking something,
    // but takes several seconds to show up in logcat
    if (Constants.DEBUG){ Log.d(TAG, "an item was clicked
    - "
    + gridContent.get(position).getId());}
    //mListener is a listener implemented by my
    activity
    // gridContent.get(position) just returns a small
    object,
    // it shouldn't be doing much work

    mListener.onItemSelected(gridContent.get(position));
    }
     
    });
     
    return imageView;
    }
    }
    }
     
    Relevant Activity code:
     
    @Override
    public void onItemSelected(Item item) {
    // Displays a loading dialog
    showLoadDialog();
    Item pi = item;
    // This builds an image from the web, it might be slow depending
    on the
    // phone's connection
    pi.genImage();
    FragmentTransaction ft =
    getSupportFragmentManager().beginTransaction();
    hideLoadDialog();
    ft.addToBackStack(Constants.DETAILS_STACK)
    .add(android.R.id.content, DetailsFragment.newInstance(0,pi))
    .commit();
    }

     

    emil10001 <e.john.feig@gmail.com> Feb 29 07:43AM -0800  

    It may be easier to do this programmatically. You can build your bitmap
    image first, figure out the dimensions of that and resize it if needed.
    Then, change the dimensions of the TextView, if necessary, to match the
    size of the image, probably using LayoutParams. Finally, you can set it as
    the background of the resized TextView as the resized image.
     
    -John
     
    On Wednesday, February 29, 2012 6:51:40 AM UTC-5, Reddy wrote:

     

    Pierre Souchay <pierre.souchay@vizionr.fr> Feb 29 04:13AM -0800  

    Hi Cliffus,
     
    I have exactly the same issue here. A service handing the MediaPlayer,
    and I would like to disconnect/reconnect the video when activities are
    launched/stopped. I tried several strategies :
    - creatig a "false" Surface Holder that would hide the surface
    destroyed and delegating to the real SurfaceHolder when set.
    - Using setDisplay(null), not setting it to null when surface is
    destroyed...
     
    None of these strategies seems to work, at least on the two devices I
    am testing. IMHO, when using setDisplay(null) or when the Surface
    becomes invalid, the MediaPlayer is not working for Video anymore... I
    see two possibilities to solve this :
    - use two separate streams, one for video, the other for audio, and
    enable only video when creating the activities
    - when creating an activity if setDisplay() has already been called
    once, create a new MediaPlayer, prepare it and when it is ready,
    replace the old MediaPlayer... but unfortunatly, it will create an
    Audio artifact :(
     
    Do you have other ideas ?
     
    Cheers
     
    Pierre Souchay
     

     

    sangam <pulagura@gmail.com> Feb 29 04:47AM -0800  

    Hi,
     
    I just wrote a instrumentation test case for the Contacts app,
    my test app is just to make a phone call,
     
    i used the ITelephony API,s to make a call ,
     
    code :
    private void doITelephonyCall() {
    log("doITelephonyCall()...");
     
    // Get a phone number from the EditText widget
    String number = "6505551234";
     
    try {
    ITelephony phone =
    ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
    log("- phone: " + phone);
    log("- calling call()...");
    phone.call(number);
    log(" Done.");
    } catch (RemoteException ex) {
    Log.w(LOG_TAG, "RemoteException!", ex);
    }
    }
     
     
    while running the test app on mobile i am getting error as :
    com.android.contacts.activities.DialtactsActivityTest:INSTRUMENTATION_RESULT:
    shortMsg=java.lang.SecurityException
    INSTRUMENTATION_RESULT: longMsg=java.lang.SecurityException: Neither
    user 10002 nor current process has android.permission.CALL_PHONE.
    INSTRUMENTATION_CODE: 0
     
    even though i given all permissions
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" /
     
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission
    android:name="android.permission.CALL_PHONE.INSTRUMENTATION_CODE" />
    <uses-permission android:name="android.permission.CALL_PRIVILEGED" /
     
    <uses-permission android:name="android.permission.READ_PHONE_STATE" /
     
    <uses-permission
    android:name="android.permission.MODIFY_PHONE_STATE" />
    <uses-permission
    android:name="android.permission.PERFORM_CDMA_PROVISIONING" />
    <uses-permission
    android:name="android.permission.PERFORM_CDMA_PROVISIONING" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /
     
    Can anybody pls help me how to solve this

     

    Chris Stratton <cs07024@gmail.com> Feb 29 03:46PM -0800  

    If you don't figure out anything at the java level, you could probably
    build a proxy into your app and configure the webview to work through it
     
    On Thursday, February 23, 2012 3:58:21 AM UTC-5, xu xuzhuo wrote:

     

    Miguel del Amor <forlayo@gmail.com> Feb 28 02:12PM -0800  

    Only occurs in Android 4.x.
     
    We raise one notification with app in background when some time has
    elapsed, notification disappear; when this ocurrs the logcat looks
    this:
     
    02-28 18:12:27.711: I/RegisteredComponentCache(464): ComponentInfo:
    ResolveInfo{41884668 com.android.apps.tag.TagViewer p=0 o=0
    m=0x108000}, techs: android.nfc.tech.Ndef,
    02-28 18:12:27.711: D/PackageManager(206):
    generateServicesMap(android.accounts.AccountAuthenticator): 7 services
    unchanged
    02-28 18:12:27.719: D/AccountTypeManager(5786): Registering
    external account type=com.lopez, packageName=com.lopez
    02-28 18:12:27.719: D/AccountTypeManager(5786): Registering
    external account type=com.whatsapp, packageName=com.whatsapp
    02-28 18:12:27.726: W/ResourceType(5786): getEntry failing because
    entryIndex 598 is beyond type entryCount 195
    02-28 18:12:27.726: W/ResourceType(5786): Failure getting entry
    for 0x7f020256 (t=1 e=598) in package 0 (error -2147483647)
    02-28 18:12:27.726: D/AccountTypeManager(5786): Registering
    external account type=com.twitter.android.auth.login,
    packageName=com.twitter.android
    02-28 18:12:27.758: D/PackageManager(206):
    generateServicesMap(android.content.SyncAdapter): 18 services
    unchanged
    02-28 18:12:27.765: I/AudioService(206): AudioFocus
    abandonAudioFocus() from android.media.AudioManager@41a65ca8
    02-28 18:12:27.851: W/ResourceType(5786): getEntry failing because
    entryIndex 206 is beyond type entryCount 195
    02-28 18:12:27.859: W/ResourceType(5786): Failure getting entry
    for 0x7f0200ce (t=1 e=206) in package 0 (error -2147483647)
    02-28 18:12:27.859: D/AccountTypeManager(5786): Registering
    external account type=com.facebook.auth.login,
    packageName=com.facebook.katana
    02-28 18:12:27.867: W/ResourceType(5786): getEntry failing because
    entryIndex 280 is beyond type entryCount 195
    02-28 18:12:27.867: W/ResourceType(5786): Failure getting entry
    for 0x7f020118 (t=1 e=280) in package 0 (error -2147483647)
    02-28 18:12:27.867: D/AccountTypeManager(5786): Registering 1
    extension packages
    02-28 18:12:27.875: E/ExternalAccountType(5786): Unsupported
    attribute readOnly
    02-28 18:12:27.875: W/ResourceType(5786): getEntry failing because
    entryIndex 207 is beyond type entryCount 195
    02-28 18:12:27.875: W/ResourceType(5786): Failure getting entry
    for 0x7f0200cf (t=1 e=207) in package 0 (error -2147483647)
    02-28 18:12:27.883: D/AccountTypeManager(5786): Registering
    extension package account type=com.google, dataSet=plus,
    packageName=com.google.android.apps.plus
    02-28 18:12:27.883: I/AccountTypeManager(5786): Loaded meta-data
    for 7 account types, 7 accounts in 167ms(wall) 14ms(cpu)
    02-28 18:12:28.047: D/dalvikvm(22579): GC_FOR_ALLOC freed 2150K,
    39% free 20337K/32967K, paused 24ms
    02-28 18:12:28.492: D/dalvikvm(22579): GC_CONCURRENT freed 2628K,
    41% free 19699K/32967K, paused 2ms+4ms
    02-28 18:12:28.804: D/dalvikvm(22579): GC_CONCURRENT freed 1060K,
    38% free 20513K/32967K, paused 2ms+5ms
     
    The app have one service in background that will close by hisself when
    finish the tasks.Code for showing notification is:
     
    int icon = R.drawable.notification;
    long when = System.currentTimeMillis();
    Notification notification = new Notification(icon, title, when);
    notification.flags |= Notification.FLAG_ONGOING_EVENT;
    notification.flags &= ~Notification.FLAG_NO_CLEAR; notification.flags
    &= ~Notification.FLAG_AUTO_CANCEL;
    NotificationManager nm = (NotificationManager)
    context.getSystemService(Context.NOTIFICATION_SERVICE);
    nm.notify("Lopez",notificationId, notification);

     

    Flavien Aubelle <flavien.aubelle@gmail.com> Feb 28 11:38AM -0800  

    This is a question I myself have !! I'd like to get an answer on that
    as well.
     

     

    BiPoLar <bridgettecowden@gmail.com> Feb 28 11:55AM -0800  

    Hi I'm completely new to Android game development and tried to search
    within the group to find an answer to my question without any luck.
     
    My problem is I bought the book "Beginning Android Games" and I'm
    trying to use the source code they provide here http://www.apress.com/9781430230427
    in their download page called 'ch06-mrnom'.
     
    I import the folder into Eclipse by going to File>New>Android
    Project>Create project from existing source and then I choose the path
    directly to the folder 'ch06-mrnom'. It loads the project but it has
    61 errors.
     
    The code is all correct because I've Googled and Googled and that's
    the way it is wrote in the book as well. So I know I'm just missing
    something. The problem is I don't know what I'm missing that will make
    this source code work.
     
    Any help is very appreciated. Thank you.

     

    Kostya Vasilyev <kmansoft@gmail.com> Mar 01 03:40AM +0400  

    Just email them the apk files (or links), then bump the version code in the
    manifest before publishing so Market picks up the update (I know this works
    for free apps).

     

    brian lee <brian@brianlee.org> Feb 29 08:21AM -0800  

    Here is the code that I am using mute within a broadcast receiver to
    capture the button:
    if(inCall==true){
    mAudioManager =
    (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
    if(mAudioManager.isMicrophoneMute()==true){
    Log.v(LOG_TAG, "Unmuting Mic");
    Toast.makeText(context, "Mic Unmuted", Toast.LENGTH_LONG).show();
     
    mAudioManager.setMicrophoneMute(false);
     
     
    }
    else{
     
    Log.v(LOG_TAG, "Muting Mic");
    mAudioManager.setMicrophoneMute(true);
    Toast.makeText(context, "Mic Muted", Toast.LENGTH_LONG).show();
     
    }
     
    Let me know if you need any more code to understand what I am doing,
    but the above code is muting the call, just not updating the mute
    button in the phone app.
     
    -Brian
     
     
    On Feb 28, 11:24 pm, Jagruti Sangani <jagruti.sang...@inextrix.com>
    wrote:

     

    jamesc <jamescu@gmail.com> Feb 29 07:05AM -0800  

    AbsoluteLayout is deprecated. If you're using this ViewGroup, then
    you're probably 'doing it wrong'. Android UI programming avoids
    absolute placement values for components because there are so may
    different screen types (resolutions, densities etc).
     
    On Feb 29, 5:27 am, android developer

     

    moktarul anam <moktarul@gmail.com> Feb 29 02:53AM -0800  

    do u want to server side database or client side db?
    for client side db u can use default sqlite db
     
    moktarul
     
    On Sunday, 26 February 2012 21:29:10 UTC+5:30, d1343 wrote:

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
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

[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 19 Topics

Comments: (0)

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

    Chris Stratton <cs07024@gmail.com> Feb 29 04:06PM -0800  

    On Thursday, February 23, 2012 8:23:38 AM UTC-5, Mark Murphy (a Commons
    Guy) wrote:
    > would prompt the user for the permission then, you wind up with a
    > Vista-style "The CPU would like to execute an instruction: allow?
    > deny?" UX, which is not pleasant.
     
    Yes, but the downside is that a fixed, install-time request requires that
    all users of the app grant blanket permission for something which the app
    may want to do rarely, only if optional feature are enabled, etc. Consider
    an app which is quite useful for interacting with files on the sdcard, but
    which a minority of users would like to use with external network content
    as well, or which could optionally integrate with contacts from the address
    book, but doesn't have to.
     
    As for the various static analysis comments in the thread, in the denial
    role its quite weak as self-modifying code will hide possibilities from it.
    As a granting mechanism in the context of the present "everything not
    explicitly granted is denied" model, it could work in the sense of being
    secure in that anything too obscure in its construct would not be granted
    and would simply result in failure (errors or exceptions which would be
    caught or cause crashes). But I fail to see how this is superior to
    declaring what you want. Someone who does think it is superior is welcome
    to package their static analysis algorithm as a tool which will scan your
    code base and automatically generate a manifest file...
     

     

    Mark Murphy <mmurphy@commonsware.com> Feb 29 07:14PM -0500  

    > which a minority of users would like to use with external network content as
    > well, or which could optionally integrate with contacts from the address
    > book, but doesn't have to.
     
    Oh, well, you're preaching to the choir on that point, which is why I
    am busily documenting various approaches for implementing plugins, to
    help isolate excess permissions in separate APKs. Google seems
    dead-set on not supporting optional permissions or revocable
    permissions, which means a plugin model is our only real option for
    providing that kind of flexibility to users.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    _Android Programming Tutorials_ Version 4.1 Available!

     

    Kristopher Micinski <krismicinski@gmail.com> Feb 29 07:39PM -0500  

    > declaring what you want.  Someone who does think it is superior is welcome
    > to package their static analysis algorithm as a tool which will scan your
    > code base and automatically generate a manifest file...
     
    The stowaway tool previous mentioned does tell you (in an approximate
    sense) what you need. Sure, it doesn't handle all reflection well,
    and maybe not get all instances of content providers, etc... But I
    believe that the majority of apps won't do lots of reflection or
    obscure string manipulations to content providers. (Obviously there
    will be some, as you point out, which is why permissions weren't
    inferred in the first place..)
     
    kris

     

    TreKing <trekingapp@gmail.com> Feb 29 06:36PM -0600  


    > i wanted to switch back to 4.0.3, but eclipse seems to be stuck on the
    > 4.0.3 target.
     
     
    That's not very clear. Like, what is "seems to be stuck"?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    chalavadi sagar <sagarchalavadi@gmail.com> Feb 29 05:10AM -0800  

    Can anybody please explain me is there any procedure for adding few
    more buttons to the android default keyboard and changing the button
    position from one place to another place

     

    Mark Murphy <mmurphy@commonsware.com> Feb 29 06:57PM -0500  

    You can create your own input method editor (IME) that implements your
    own keyboard. You can use the open source implementation of Android's
    "default keyboard" as a starting point, if you wish. Users can then
    elect to install your IME and elect to use it if they so choose. You
    cannot, however, actually change the behavior of any other installed
    IME.
     
    On Wed, Feb 29, 2012 at 8:10 AM, chalavadi sagar
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    _Android Programming Tutorials_ Version 4.1 Available!

     

    Pankaj <pankaj9@gmail.com> Feb 28 10:15PM -0800  

    I want to consume WCF web-service which uses X.509 certificate for
    mutual authentication. I had imported certificates using keytools in
    BKS keystore & able to use in android code. Now for mutual
    authentication i need to create web-request which have message digest
    & signature in it
     
    I am using KSOAP 2. MY android Application working fine till my client
    is using https using srever side certificate.
    But now my client want X.509 certificate based mutual authentication.
    For which I need to form my request as per below mention format which
    i had extracted using wireshark (client is developed in Visual studio
    8 which is working fine).
     
    As per the blogs & articles i need to create message digest then
    create signature but before creating message digest i need to create
    XML canonicalization
     
    Referenced Urls :
    http://java.sun.com/developer/technicalArticles/xml/dig_signatures/
    http://docs.oracle.com/javase/6/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html
    http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
    http://svn.apache.org/repos/asf/santuario/xml-security-java/trunk/samples/javax/xml/crypto/dsig/samples/GenEnveloped.java
    http://www.xml.com/pub/a/ws/2002/09/18/c14n.html?page=1
    http://www.w3.org/TR/2000/CR-xmldsig-core-20001031/
     
    <s:Header>
    <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/
    oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
    <u:Timestamp u:Id="_0">
    <u:Created>2012-02-21T04:45:06.429Z</u:Created>
    <u:Expires>2012-02-21T04:50:06.429Z</u:Expires>
    </u:Timestamp>
    <o:BinarySecurityToken u:Id="uuid-e35f5271-3c4e-47c7-
    ba34-8d995e414ba3-1" ValueType="http://docs.oasis-open.org/wss/
    2004/01/
    oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://
    docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-
    security-1.0#Base64Binary">
    MIICbzCCAdygAwIBAgIQfjyZ229iN4tAbV0fiYiVyTAJBgUrDgMCHQUAMD8xPTA7BgNVBAMTNGNsaWVudC5iNTRiYTFkN2U2NzY0ZDdkOWRiMDA3YTgyNmM5ZGE5Ny5jbG91ZGFwcC5uZXQwHhcNMTIwMjE2MTY0MjI1WhcNMzkxMjMxMjM1OTU5WjA/
    MT0wOwYDVQQDEzRjbGllbnQuYjU0YmExZDdlNjc2NGQ3ZDlkYjAwN2E4MjZjOWRhOTcuY2xvdWRhcHAubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRW
    +Di90XDGulLybdBboUlOilxvbcnfow+NhoNW80uNjmGQiQpxP0oNnYT7RKJ
    +nP3+sZxUfRfazLgvOTFn0F9SIFQ9T4I5LNFMHhDfExoT0k/
    aeF870Euy07BiwF7eXw6toSv1dKwKavq20szbIr/NeabIEDS/GzKY6P0/
    TOQfwIDAQABo3QwcjBwBgNVHQEEaTBngBCNb6YOYI3RBR64WvVUjQtPoUEwPzE9MDsGA1UEAxM0Y2xpZW50LmI1NGJhMWQ3ZTY3NjRkN2Q5ZGIwMDdhODI2YzlkYTk3LmNsb3VkYXBwLm5ldIIQfjyZ229iN4tAbV0fiYiVyTAJBgUrDgMCHQUAA4GBAG5v1DZmXQKcaxNzz2VYDZ8aYYrYRQwU4lrBKlI0CnrkcZwQGPmRxdkiET9D91kcN/
    fmq90nj1F5FZoqhzeT1moqGKXKT9HRX8j6Ln1QDhsr+0JfgJW9/
    IFaQI14xKwr8bw4+DxIyp0IMpSw9biULmIQ1QuTzfKDEowlcQhsik+E
    </o:BinarySecurityToken>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-
    c14n#"/>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-
    sha1"/>
    <Reference URI="#_0">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>Soj1m/E157CempDHHC6c6gZBd1E=</DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>
    kqsIYUc3uYoQpuWVWYOio4KcGpon+3wDDhsAzVgZVljQxEhF7z1JS/
    qzw9ELYCn2JbYIkWMtEeYfXRtPvjrPM1fjJiqbXSKq7jHEeVtMQnOytAHRL1ZFA
    +dLq4spJQR7uYnmJ1lmgQnu1kYcteSmD29Xm5e5dPUnz4yap3p7zC4=
    </SignatureValue>
    <KeyInfo>
    <o:SecurityTokenReference>
    <o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/
    oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-
    e35f5271-3c4e-47c7-ba34-8d995e414ba3-1"/>
    </o:SecurityTokenReference>
    </KeyInfo>
    </Signature>
    </o:Security>
    </s:Header>
     
    But to create message digest we need perform XML canonicalization with
    "http://www.w3.org/2001/10/xml-exc-c14n#" transform algorithm. I am
    not able to found any API or library which perform above task.
     
    I had used xmlsec jar but I guess it is not supported by android and
    also used all the option which I found after googling.
     
    I had find out that android don't have support of following JAVA
    packages:
    • javax.xml.crypto.dom
    • javax.xml.crypto.dsig
    • javax.xml.crypto.dsig.dom
    • javax.xml.crypto.dsig.keyinfo
    • javax.xml.crypto.dsig.spec
     
     
    Please guide me how to call WCF web-service which involve X.509
    certificate based mutual authentication. ASAP

     

    Jae-young Yun <sinsunby@gmail.com> Feb 29 04:38AM -0800  

    Logcat
     
     
    02-29 21:19:31.765: E/AndroidRuntime(5374):
    java.lang.RuntimeException: Unable to stop activity
    {com.android.sinsunby/com.android.sinsunby.SevenActivity}:
    java.lang.IllegalStateException
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread.performDestroyActivity(ActivityThread.java:
    3607)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:
    3673)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread.access$2900(ActivityThread.java:125)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.os.Handler.dispatchMessage(Handler.java:99)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.os.Looper.loop(Looper.java:123)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread.main(ActivityThread.java:4627)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    java.lang.reflect.Method.invokeNative(Native Method)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    java.lang.reflect.Method.invoke(Method.java:521)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    com.android.internal.os.ZygoteInit
    $MethodAndArgsCaller.run(ZygoteInit.java:858)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    dalvik.system.NativeStart.main(Native Method)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): Caused by:
    java.lang.IllegalStateException
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.media.MediaPlayer._stop(Native Method)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.media.MediaPlayer.stop(MediaPlayer.java:964)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    com.android.sinsunby.SevenActivity.onStop(SevenActivity.java:236)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.Instrumentation.callActivityOnStop(Instrumentation.java:
    1171)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.Activity.performStop(Activity.java:3857)
     
    02-29 21:19:31.765: E/AndroidRuntime(5374): at
    android.app.ActivityThread.performDestroyActivity(ActivityThread.java:
    3602)
     
    i don't know why this happen,,,

     

    John <john.ormonde5@gmail.com> Feb 28 01:22PM -0800  

    trying to learn how to write monkeyrunner scripts in python:
     

    device.startActivity( component='com.android.calculator2/.Calculator' )
    time.sleep(1)
    device.type( '2*3=' )
     
    starts the calculator, accepts the input and displays the proper
    result. However
     

    device.startActivity( component='com.android.browser/.BrowserActivity',
    uri='http://www.amazon.com' )
    time.sleep(5)
    device.type('www.yahoo.com')
    device.press('KEYCODE_ENTER', 'DOWN_AND_UP')
     
    starts the browser with www.amazon.com just fine, but then the first
    two 'w' from www.yahoo.com get dropped. I've tried varying the sleep
    time and also sending each individual character one device.press() at
    a time, but trying to send keystrokes to the browser always results in
    leading characters getting dropped.
     
    What am I missing?

     

    John <john.ormonde5@gmail.com> Feb 29 09:17AM -0800  

    trying to write a simple demo monkeyrunner python script
     

    device.startActivity( component='com.android.calculator2/.Calculator' )
    time.sleep(1)
    device.type( '2*3=' )
     
    this works as I expect, starts the calculator and it displays the
    correct result, having some difficulty with the browser. I can start
    it with a given url
     

    device.startActivity( component='com.android.browser/.BrowserActivity',
    uri='http://www.amazon.com' )
     
    but if I try to send a url after the browser starts with
    device.type() leading characters are getting dropped:
     

    device.startActivity( component='com.android.browser/.BrowserActivity' )
    time.sleep(5)
    device.press('KEYCODE_ENTER', 'DOWN_AND_UP')
    device.type('www.yahoo.com')
    device.press('KEYCODE_ENTER', 'DOWN_AND_UP')
     
    logcat shows the correct string, but the first two 'w' are dropped
    when the string is reported by the SearchDialog. Any idea what is
    causing the dropped characters?
     
    logcat ( minus dalvik msgs)
    ====================
    I/ActivityManager( 61): Start proc com.android.browser for activity
    com.android.browser/.BrowserActivity: pid=1421 uid=10033 gids={3003,
    1015}
    I/ActivityThread( 1421): Pub browser:
    com.android.browser.BrowserProvider
    I/BrowserSettings( 1421): Selected search engine:
    ActivitySearchEngine{android.app.SearchableInfo@405998b0}
    I/ActivityManager( 61): Displayed
    com.android.browser/.BrowserActivity: +1s524ms
    D/MonkeyStub( 1404): translateCommand: press KEYCODE_ENTER
    W/KeyCharacterMap( 1421): No keyboard for id 0
    W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
    qwerty.kcm.bin
    D/MonkeyStub( 1404): translateCommand: type www.yahoo.com
    W/KeyCharacterMap( 1404): No keyboard for id 0
    W/KeyCharacterMap( 1404): Using default keymap: /system/usr/keychars/
    qwerty.kcm.bin
    W/KeyCharacterMap( 1421): No keyboard for id 0
    W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
    qwerty.kcm.bin
    W/KeyCharacterMap( 1421): No keyboard for id 0
    W/KeyCharacterMap( 1421): Using default keymap: /system/usr/keychars/
    qwerty.kcm.bin
    D/MonkeyStub( 1404): translateCommand: press KEYCODE_ENTER
    D/MonkeyStub( 1404): Quit requested
    D/SearchDialog( 1421): launching Intent
    { act=android.intent.action.SEARCH flg=0x10000000
    cmp=com.android.browser/.BrowserActivity (has extras) }
    I/SearchDialog( 1421): Starting (as ourselves)
    #Intent;action=android.intent.action.SEARCH;launchFlags=0x10000000;component=com.android.browser/.BrowserActivity;S.query=w.yahoo.com;S.user_query=w.yahoo.com;end
    I/ActivityManager( 61): Starting: Intent
    { act=android.intent.action.SEARCH flg=0x10000000
    cmp=com.android.browser/.BrowserActivity (has extras) } from pid 1421
    V/webkit ( 1421): guessURL before queueRequest: w.yahoo.com
    W/SuggestionsAdapter( 1421): Tried to change cursor after adapter was
    closed.

     

    Chalavadi Sagar <sagarchalavadi@gmail.com> Feb 29 07:36PM +0530  

    right click on project and then select the JavaBuildPath in that select the
    libraries tab and check whether there are two android jar files .If yes
    delete one of them and then save the project and clean it after that your
    error may get disappeared.
     
    Kind Regards.
     
    Ch.B.Sagar
     

     

    Riley Porter <rileyporter@gmail.com> Feb 29 05:08PM -0500  

    File re-named to wmv? Perhaps it is a mp4 really?
     
    Riley
     

     

    Bhasker Raj <bhasker.raj48@gmail.com> Feb 29 11:46AM +0530  

    Perumal
     
    I am interested in buying Novo 7 Advanced or ELF Tablet.
     
    Did you buy from any Indian selling company or from abroad?
     
    Please send the source and the contacts.
     
    Where are you staying?
     
    Waiting for your reply
     
    Best Wishes
     
    A. S. Bhasker Raj
    Secunderabad
    Mobile: +919247332574
     

     

    federico federico <sunombra@hotmail.com> Feb 28 07:59PM -0800  

    diculpe mi telefono no me quiere aceptar la cuenta google en es el u20a

     

    Catherine Darrow <catherine.e.darrow@gmail.com> Feb 28 11:37AM -0800  

    Last time I looked, I found I needed different sources to cover the
    Android/Java/ES specific things and to cover OpenGL itself. Putting
    Android and OpenGL into Google should turn up the sort of tutorial
    that will let you successfully draw a triangle to the screen. For
    going farther with OpenGL itself, here is the most valuable thing I've
    found:
     
    http://www.arcsynthesis.org/gltut/

     

    Markus Lindner <android16041980@googlemail.com> Feb 28 11:44PM -0800  

    Hello,
     
    In my small application I have 2 EditTexts and a Button. If something
    is entered in EditText1 and confirmed by "Enter", the focus should be
    set to EditText-Field2. Therefore I use an OnKeyListener on the first
    EditText. The method requestFocus is called in onKey on the second
    EditText.
     
    But there is problem. After something is entered in EditText1, the
    focus changes to the Button.
     
    Why does that happen?
     
    Here is the layout and the actitivity:
     
    <?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"
    android:orientation="vertical" >
     
    <LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:orientation="vertical" >
     
    <EditText
    android:id="@+id/editText1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="number" >
     
    <requestFocus />
    </EditText>
     
    <EditText
    android:id="@+id/editText2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="number" />
    </LinearLayout>
     
    <Button
    android:id="@+id/button1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Button" />
     
    </LinearLayout>
     
    package de.mih.myandroidtest;
     
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.KeyEvent;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.view.View.OnKeyListener;
    import android.widget.Button;
    import android.widget.EditText;
     
    public class MyAndroidTestActivity extends Activity {
     
    EditText _t1;
    EditText _t2;
     
    Button _b1;
     
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
     
    _t1 = (EditText) findViewById(R.id.editText1);
    _t1.setOnKeyListener(new OnKeyListener() {
     
    public boolean onKey(View v, int keyCode, KeyEvent event) {
    switch (keyCode) {
    case KeyEvent.KEYCODE_ENTER:
    _t1.setEnabled(false);
    _t2.requestFocus();
    }
    return false;
    }
    });
     
    _t2 = (EditText) findViewById(R.id.editText2);
     
    _b1 = (Button) findViewById(R.id.button1);
    _b1.setOnClickListener(new OnClickListener() {
     
    public void onClick(View v) {
    _t1.setEnabled(true);
    _t1.setText("");
    _t2.setEnabled(true);
    _t2.setText("");
     
    _t1.requestFocus();
    }
    });
    }
    }
     
    Thanks a lot

     

    Stan Prihodko <stas.prihodko@gmail.com> Feb 29 04:40AM -0800  

    HI,
     
    I'm now develop my first widget (not application) and I want to generate
    dynamically strings, there each string should be as:
    "image(left)+text(left)+text(right)".
    I has been prepared this string in layout, and I want to use my
    template-string as "template" to generate all strings a few times, as list.
    But I can't understood how it do.
     
    Could you please explain how do correct my idea?
    (Or may be key words to search in google...)
     
    Thanks.

     

    Streets Of Boston <flyingdutchie@gmail.com> Feb 29 06:19AM -0800  

    It is much like regular java:
    1. It really depends on the hardware, but you have to assume that your
    app's process can get killed. And if you have background tasks/threads
    running, they'll be killed automatically with the process (just like in
    Java).
     
    2. Yes, just like Java. If java object become non-reachable, the objects
    will be eligible for garbage collection.
     
    3./4. If you haven't set your android:process attribute in you app's
    components, all your app's components will run in one process. I haven't
    seen anything to the contrary with activities/services/etc. that are
    private to your own app.
    However, just like java, memory is not shared between processes. Your
    static variable will hang around, but just for their own process. Each
    process instantiates its own JVM (DalvikVM) and static variables are not
    shared between processes.
     
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:
    > static-instance singletons to members of a service class.
     
    > I'm coding to 2.2 APIs.
     
    > Thanks a lot in advance for any help
     
    On Monday, February 27, 2012 9:32:04 PM UTC-5, John Sheehy wrote:

     

    Streets Of Boston <flyingdutchie@gmail.com> Feb 29 06:20AM -0800  

    It is much like regular java:
    1. It really depends on the hardware, but you have to assume that your
    app's process can get killed. And if you have background tasks/threads
    running, they'll be killed automatically with the process (just like in
    Java).
     
    2. Yes, just like Java. If java object become non-reachable, the objects
    will be eligible for garbage collection.
     
    3./4. If you haven't set your android:process attribute in you app's
    components, all your app's components will run in one process. I haven't
    seen anything to the contrary with activities/services/etc. that are
    private to your own app.
    However, just like java, memory is not shared between processes. Your
    static variable will hang around, but just for their own process. Each
    process instantiates its own JVM (DalvikVM) and static variables are not
    shared between processes.

     

    John Sheehy <john.sheehy@voxer.com> Feb 29 10:35AM -0800  

    Thanks for the reply.
     
    For my 4th question I had read somewhere (perhaps stackoverflow) that
    after android (ActivityManager?) unloads Application, Activities,
    Services etc., it doesn't kill the actual kernel process but instead
    somehow keeps it around in a pool to avoid the overhead of new linux
    process creation. Given that static heap variables are "outside" the
    android components, I was worried my static instances would persist
    and dirty a new process! I haven't been able to find much on this
    however..

     

    Patrick Gregorio <patrickvgregorio@gmail.com> Feb 29 03:42PM -0800  

    There are 2 types of videos that I want to be able to play on a
    project I've been working on. One is live streams and the other one is
    video on demand.
     
    I was able to make the video on demand fully functional using WebView.
     
    My problem now is with the live streams. I couldn't make the WebView
    and even VideoView to work. Also I've been researching about this for
    some time now, and found out that HTTP Live Stream is only available
    to Android 3.0 and above.
     
    Is what I'm trying to accomplish even possible. If so, how do I go
    about doing this? If you need more information, feel free to ask and I
    could provide them.

     

    NAVI NEW <navi44445@gmail.com> Feb 28 09:17PM -0800  

    Hello Android Developers,
     
    I having pictures .JPEG file, I want to convert it in video
    format .mp4.
     
    There is ffmpeg command for .mp4 typecast
     
    ffmpeg -r 30 -i foo-%03d.jpeg -r 30 -b 8973kb -minrate 8973kb -maxrate
    8973kb -bufsize 10000kb foo2.mp4
     
     
    Please help me how to convert images in form of video mp4.
     
    Thanking of you.
     
    Navi

     

    cnisme <cnisme.cn@gmail.com> Feb 28 07:11PM -0800  

    hi,all
    I have got android 4.0 has face lock, when I search the android
    code, I just have found the code of face lock in application layer,
    but I did not get any code in "frameworks" or others paths, and it
    needs "com.android.facelock". Then I ask engineer in QCOM, They said
    it't part of GMS which should contact Google, so I want to know, how
    should I do if I want to implement Face Lock?
    Any of your reply will be appreciated.

     

    RedBullet <scottedchapman@gmail.com> Feb 29 06:14AM -0800  

    I am trying to get my android app to use the TTS engine to send the
    audio to my old BT headset.
     
    I have tried starting SCO, then setting it to on. Nothing. Audio still
    comes out the speakers...
     
    Anyone ever done this? I am sure there is just something I am
    missing...

     

    Atif Farrukh <atiffarrukh@gmail.com> Feb 28 07:51PM -0800  

    I am making a menu for my menu... i am using the following code..
     
     
    switch(item.getItemId()){
    case R.id.aboutUs
     
    break;
     
    case R.id.feedback:
     
    break;
     
     
    }
     
    gave an error, "Migrate Android Code" , eclipse converted it into if
    else statment as below, from the android site,
    still getting the same error
     
     
     
    int id = item.getItemId();
     
    if (id == R.id.abooutUs) {}
    else if (id == R.id.feedback) {
    }
    else if (id == R.id.exit) {}
     
     
    }
     
     
    on the android site it says that the "R" file is now like "public
    static int menu=0x7f050000;"
    but mine is still "public static final int menu=0x7f050000;". i mean
    the "final" type.
     
    plz help me out.. i m new to android...

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
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