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

Comments: (0)

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

    "G. Blake Meike" <blake.meike@gmail.com> Jul 23 09:11AM -0700  

    I glanced through them and it all looks pretty good to me. If you are sure
    that you are never calling notifyChanged with the third arg = true, the
    only thing I can suggest is that, somehow, you have setSyncAutomatically =
    Pretty mysterious.
    On Tuesday, July 22, 2014 2:19:02 PM UTC-7, Deepak wrote:


    Deepak Soni <deepakvsoni@gmail.com> Jul 23 11:41AM -0500  

    I do have this method call (below) but if I don't set set this the periodic
    sync does not execute, should I not be setting this to true?
    ContentResolver.setSyncAutomatically(account, Table.AUTHORITY, true);
    On Wed, Jul 23, 2014 at 11:11 AM, G. Blake Meike <blake.meike@gmail.com>


    Deepa M <deepam8900@gmail.com> Jul 24 09:53AM +0530  

    Hi all,
    Is it possible to live stream the video frm videoplayer (which plays
    recorded video ) in android?
    Thanks and Regards
    Deepa M


    Nathan <nathan.d.mellor@gmail.com> Jul 23 11:06AM -0700  

    I have collected more data on the topic that you might be interested in.
    Trying to give back.
    In five days of Analytics data, I have found
    85 devices returning no orientation sensor.
    Of these, most do not have a magnetic sensor either, such as the Samsung
    SCH-S738C Galaxy Centura. So some people complaining about the compass
    won't get a solution.
    However ten or so do not return the orientation, but do have the magnetic
    sensor, such as a few of the gazillion iterations of the Samsung S III or
    Samsung S IV, such as Samsung GT-I9300 Galaxy S III. So some of those
    saying the compass doesn't work in one app but does work in some others,
    are part of a group that is rare but real. Of course, this doesn't tell us
    how many devices return the orientation_sensor, but have erroneous or low
    res data.
    What I have done may be a bit rash, but I released the product preferring
    the magnetic/accelerometer whenever API>=9. So far I have a few complaints
    that it is jittery (smoothing hasn't been released yet), two people that
    were healed, and relatively quiet otherwise.
    Do most of you agree with Adam that the rotation sensor is to be preferred
    and needs no smoothing when it exists? I haven't tried that one yet.
    I've noticed that about 15 devices, including the Amazon KFTHWI Kindle Fire
    HDX 7 3rd Gen return a rotation sensor (and sometimes an orientation
    sensor) even when they don't return a magnetic sensor. Does this mean their
    rotation data is suspect, or just that they might not expose the magnetic
    I could post my full findings in another week if people are interested.
    One thing I can definitely conclude is that if a customer has a complaint
    about a sensor, and gives you the device name simply as "Galaxy S III",
    that isn't nearly specific enough.


    Adam Ratana <adam.ratana@gmail.com> Jul 23 05:58PM -0400  

    Hi Nathan, I had posted this earlier in the thread --
    This is my project where I attempt to get the canonical bearing with
    respect to where the user is pointing, which many of the above can get
    wrong. It has a few implementations of filters / smoothers and sensors
    (mag + accel, rotation vector), device orientations (portrait, landscape)
    etc.. the apps I develop have a need for this to be correct, so I've
    worked hard on this problem, and of course the project could use some more
    love and introspection.
    Feel free to PM me off list as well, if this helps or if you have any
    questions about it.
    Adam Ratana


    dashman <erjdriver@gmail.com> Jul 23 11:32AM -0700  

    I've got an activity and would like to set the background to the current
    theme background color.
    I set the activity's layout android:background="?android:windowBackground"
    and that seems to work
    Inside the activity I would like to draw some boxes/panels and set the
    background to a slightly
    different color - based on light or dark theme.
    How can I do that.
    I tried "?android:panelBackground" and that's not quite what I want.
    Any special value out there that'll display a light gray - if the current
    window background is white.


    saex <elpablosaez@gmail.com> Jul 23 08:32AM -0700  

    Welcome all
    i need to add a onScreen Joystick to my game.
    I found some code examples of joysticks but none of them moves a view on
    the screen, and i dont know how to move a view in the screen with the exact
    movement and acceleration of the joystick movement.
    This is one of the examples i found:
    Source code: http://goo.gl/m0bTse
    I have no idea of how to move a view (my game spaceship) in the screen with
    the joystick movement.
    Thanks a lot


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

Comments: (0)

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

    Deepak Soni <deepakvsoni@gmail.com> Jul 22 04:09PM -0500  

    Hello Blake,
    Did you get a chance to look through the code snippets I shared? I still
    haven't been able to figure out the cause of the account sync in every ~10
    Thank you for your time.


    Nobu Games <dev.nobu.games@gmail.com> Jul 22 07:52AM -0700  

    Here is a follow-up since I am still getting emails from people around the
    world: the *titlebar-webview hack does not work* anymore and* it cannot be
    fixed.* That's why I deleted the project from Google Code. It was a nasty
    hack that exposed a hidden interface and was actually doomed to fail over
    If you want to have a title bar view then please consider a fixed layout
    (title bar view permanently on top of web view) or try to create something
    along the lines of the NavigationDrawer component.


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

Comments: (0)

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

    DoubleCheese <dennis.angelo@gmail.com> Jul 21 10:29PM -0700  

    I'm recording a video using a media recorder object and I'm setting the
    previewsize the same as the video size.
    I'm using the following
    profile: CamcorderProfile.get(Camera.CameraInfo.CAMERA_FACING_BACK,
    But I noticed on samsung galaxy note 2, the videos are stretched. I
    compared the video with the standard camera app on the galaxy note 2 but
    the videos here are not stretched.
    Can anyone provide me a clue why this is and what can i do to fix it?


    Vincent <vincent.vbel@gmail.com> Jul 21 03:22PM -0700  

    In my app the user can select files and open them in the appropriate app (using an ACTION_VIEW intent). I need to do some work on the data before giving it to the other app. So I'm using a streaming solution : I've implemented a ContentProvider that implements openTypedAssetFile and writeDataToPipe (this method fills the output ParcelFileDescriptor created by openPipeHelper).
    This works : I can open .pdf files, .txt files etc. The streaming seems correct. I can open images usings 3-party apps. However when I open an image using the Gallery, it doesn't work (Gallery shows a black screen), and I get the following exception :
    fail to open myfile.jpg
    UriImage(21890): java.io.FileNotFoundException: Not a whole file
    I had a look at the Gallery source (here) and I could see that the exception is thrown here :
    try {
    if (MIME_TYPE_JPEG.equalsIgnoreCase(mContentType)) {
    InputStream is = mApplication.getContentResolver()
    mRotation = Exif.getOrientation(is);
    **mFileDescriptor = mApplication.getContentResolver()
    .openFileDescriptor(mUri, "r");**
    if (jc.isCancelled()) return STATE_INIT;
    } catch (FileNotFoundException e) {
    Log.w(TAG, "fail to open: " + mUri, e);
    return STATE_ERROR;
    However, once in the Gallery app, if I select "Set as wallpaper", then I can see my image, it is then well streamed. So the problem appears when Gallery opens.
    After a deeper look (in the ContentResolver code etc.) I couldn't understand why it behaves this way. It seems that Gallery does not support streaming files. Is that right ? Do you have any idea ? I really lost with that right now.


    saex <elpablosaez@gmail.com> Jul 21 02:37PM -0700  

    I have a game that shows some animations onscreen and one MediaPlayer
    playing with infinite loop the background music, and i am seeing frame rate
    jumps when the song ends and start a loop.
    Why is this happening? MediaPlayer is not efficient in the loop?
    Can the frame rate jump be avoided?
    My mediaplayer:
    mPlayer = MediaPlayer.create(GameActivity.this, R.raw.pieceofwood);
    My animations:
    fall = ObjectAnimator.ofFloat(view, "y",-height, sh);