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

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

    NimeshChanchani <nimeshchanchani@gmail.com> Jun 26 10:28PM -0700  

    just curious if Android auto will support A2DP sink and HFP HF.
     
    will it be open source if it does?

     

    NimeshChanchani <nimeshchanchani@gmail.com> Jun 26 10:29PM -0700  

    just curious if Android auto will support A2DP sink and HFP HF.
     
    will it be open source if it does?
     

     

    RLScott <fixthatpiano@yahoo.com> Jun 26 05:01AM -0700  

    By "different vertical positions" I mean that the two buttons are side by
    side, but one is positioned slightly higher on the screen, as shown in the
    attached "two-buttons.png".

     

    TreKing <trekingapp@gmail.com> Jun 26 09:43AM -0500  

    I see. Try changing the button heights to match parent and the containing
    layout to whatever height you want it.
     
     
    On Thu, Jun 26, 2014 at 7:01 AM, 'RLScott' via Android Developers <
     
    --
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    RLScott <fixthatpiano@yahoo.com> Jun 26 09:55AM -0700  

    On Thursday, June 26, 2014 9:08:45 AM UTC-6, TreKing wrote:
     
    > I see. Try changing the button heights to match parent and the containing
    > layout to whatever height you want it.
     
    No, that didn't help either. The attached two-buttons.png is what happens
    with this XML:
     
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="60sp" >
     
    <Button
    android:id="@+id/cancelButton"
    android:layout_width="0dp"
    android:layout_height="60sp"
    android:layout_marginLeft="6sp"
    android:layout_marginRight="6sp"
    android:layout_weight="0.5"
    android:background="#ffffaaaa"
    android:onClick="onClickCancel"
    android:text="Cancel the Calibration"
    android:textColor="#ff000000"
    android:textSize="18sp" ></Button>
     
    <Button
    android:id="@+id/beginButton"
    android:layout_width="0dp"
    android:layout_height="60sp"
    android:layout_marginLeft="6sp"
    android:layout_marginRight="6sp"
    android:layout_weight="0.5"
    android:background="#ffaaffaa"
    android:onClick="onClickBegin"
    android:text="Begin"
    android:textColor="#ff000000"
    android:textSize="18sp" ></Button>
    </LinearLayout>
     
     
    But if I just change "Begin" to "Begin the Calibration" so that it takes up
    two lines just like the other button, then everything is OK, as shown by
    the attached two-buttons-OK.png.

     

    RLScott <fixthatpiano@yahoo.com> Jun 26 10:00AM -0700  

    On Thursday, June 26, 2014 9:08:45 AM UTC-6, TreKing wrote:
     
    > I see. Try changing the button heights to match parent and the containing
    > layout to whatever height you want it.
     
    That fixed it! Although I don't know why it didn't work before. Thanks.

     

    Mark Phillips <mark@phillipsmarketing.biz> Jun 26 07:13AM -0700  

    On Wed, Jun 25, 2014 at 11:36 AM, Steve Gabrilowitz <steveg1701@gmail.com>
    wrote:
     
    > usages of the GPS, record the location when you turn it on and then when
    > you turn it off just look up the distance between current point and saved
    > start point!
     
    A more accurate approach would be to sample the GPS location on a
    continuous basis. A button on the app could be used to start/stop the
    sampling to save battery, or, better yet, dynamically change the sample
    rate - decrease when the samples don't change and increase to a set maximum
    when they do. I can envision driving from point A to point B on several
    different routes, all of which are different distances. Just knowing the
    end points would not be a very accurate way to measure the miles driven for
    stuff like oil changes, tire rotation, tire wear, etc.
     
    Mark
     
     
     

     

    Federico Cacco <federico.cacco@gmail.com> Jun 26 03:37AM -0700  

    Hi
     
    I am developing an application for Android, where I need to get the list of
    parents of a file taken from google Drive.
     
    I correctly obtain the DriveId
    using Drive.DriveApi.newOpenFileActivityBuilder(), but when I use
    DriveResource.listParents I obtain an empty list even if the resource have
    a parent.
     
    I use the same GoogleApiClient for
    Drive.DriveApi.newOpenFileActivityBuilder() and
    DriveResource.listParents, so i do not think that is a scope problem.
     
    **************
    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent
    data) {
    if (requestCode == Constants.REQUEST_CODE_GOOGLE_DRIVE_FILE_PICKER) {
    if (resultCode == RESULT_OK) {
    mSelectedFileDriveId = (DriveId)
    data.getParcelableExtra(OpenFileActivityBuilder.EXTRA_RESPONSE_DRIVE_ID);
    } else {
    setResult(Constants.RESULT_CODE_KO);
    finish();
    }
    }
    }
     
    *************
    private ResultCallback<MetadataBufferResult> metadataBufferCallback =
    new ResultCallback<MetadataBufferResult>() {
    @Override
    public void onResult(MetadataBufferResult result) {
    if (!result.getStatus().isSuccess()) {
    SDKUtils.showMessage(thisActivity, "Impossible salvare l'ultima
    posizione aperta in Google Drive");
    return;
    }
    MetadataBuffer metadataBuffer = result.getMetadataBuffer();
    // HERE I OBTAIN AN EMPTY OBJECT
    }
    };
     
    ***************
    mGoogleApiClient = new GoogleApiClient.Builder(this)
    .setAccountName(driveAccontName)
    .addApi(Drive.API)
    .addScope(Drive.SCOPE_FILE)
    .addConnectionCallbacks(this)
    .addOnConnectionFailedListener(this).build();

    ***************
    DriveFile driveFile = Drive.DriveApi.getFile(getGoogleApiClient(),
    mSelectedFileDriveId);
    driveFile.listParents(GoogleApiClient apiClient).setResultCallback(
    metadataBufferCallback );
     
    ***************
     
    Have any suggestions?
    Thanks!

     

No comments:

Post a Comment