Coder Social home page Coder Social logo

livesdk-for-android's People

Contributors

cgollner avatar deepeshm avatar huangcd avatar jeanine-msft avatar liwa avatar mehmet6parmak avatar mkoenig2203 avatar peternied avatar riksa avatar rorybr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

livesdk-for-android's Issues

Google Play Warning: SSL Error Handler Vulnerability

This is what I have just received from Google.

The problem is in class AuthorizationWebViewClient method onReceivedSslError()

@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    // TODO: Android does not like the SSL certificate we use, because it has '*' in
    // it. Proceed with the errors.
    handler.proceed();
}

Hello Google Play Developer,

Your app(s) listed at the end of this email have an unsafe implementation of the WebViewClient.onReceivedSslError handler. Specifically, the implementation ignores all SSL certificate validation errors, making your app vulnerable to man-in-the-middle attacks. An attacker could change the affected WebView's content, read transmitted data (such as login credentials), and execute code inside the app using JavaScript.

Please address this vulnerability as soon as possible and increment the version number of the upgraded APK. To properly handle SSL certificate validation, change your code to invoke SslErrorHandler.proceed() whenever the certificate presented by the server meets your expectations, and invoke SslErrorHandler.cancel() otherwise.

For more information about the SSL error handler, please see our documentation in the Android Developers Help Center. For other technical questions, you can post to https://www.stackoverflow.com/questions and use the tags “android-security” and “SslErrorHandler.”

To confirm you’ve upgraded correctly, submit the updated version to the Developer Console and check back after five hours. If the app hasn’t been correctly upgraded, we will display a warning.

While these specific issues may not affect every app that uses WebView SSL, it’s best to stay up to date on all security patches. Apps with vulnerabilities that expose users to risk of compromise may be considered dangerous products in violation of the Content Policy and section 4.4 of the Developer Distribution Agreement.

Apps must also comply with the Developer Distribution Agreement and Content Policy. If you have questions or concerns, please contact our support team through the Google Play Developer Help Center.

Regards,

The Google Play Team

How go get access token to send email via SMTP?

Hi,
I used Live SDK to sign in and authorize permission. It worked well with this code.

public void loginLive() {
        auth.login(MainActivity.this, scopes, new LiveAuthListener() {
            public void onAuthComplete(LiveStatus status, LiveConnectSession session, Object userState) {
                if (status == LiveStatus.CONNECTED) {
                    resultTextView.setText("Signed in.");
                    client = new LiveConnectClient(session);
                    greetUser();

                } else {
                    resultTextView.setText("Not signed in.");
                    client = null;
                }
            }

            public void onAuthError(LiveAuthException exception, Object userState) {
                resultTextView.setText("Error signing in: " + exception.getMessage());
                client = null;
            }
        });
    }

And from now, i want to get a access token to be able to send a email via SMTP. But I do not know how I can get it.
Can you please tell me should I do ? Thanks.

Uploading files larger than 100 MB

When uploading files larger than 100 MB, the upload fails, but there is no exception. The upload takes it time, and the returned result of the upload is an empty Json object {}.

Is this the expected result when an upload fails?

Add parameter to request to limit results from server

I'm facing some problems on my Skydrive. I do have up to 1000 pictures in some folders. I need to limit the results and load my gridview dynamicly. Otherwise it takes really long to transfer up to 2-3 MB from the server. So I changed the SDK to pass parameter to the API if needed. Here are the most important changes:

ApiRequest.java

public ApiRequest(LiveConnectSession session,
                  HttpClient client,
                  ResponseHandler<ResponseType> responseHandler,
                  String path) {
    this(session, client, responseHandler, path, ResponseCodes.SUPPRESS, Redirects.SUPPRESS, null);
}
public ApiRequest(LiveConnectSession session,
                  HttpClient client,
                  ResponseHandler<ResponseType> responseHandler,
                  String path,
                  List<NameValuePair> params) {
    this(session, client, responseHandler, path, ResponseCodes.SUPPRESS, Redirects.SUPPRESS, params);
}

/**
 * Constructs a new instance of an ApiRequest and initializes its member variables
 *
 * @param session that contains the access_token
 * @param client to make Http Requests on
 * @param responseHandler to handle the response
 * @param path of the request. it can be relative or absolute.
 * 
 * @param params for the request like offset, limit, filter (null = no parameter)
 */
public ApiRequest(LiveConnectSession session,
                  HttpClient client,
                  ResponseHandler<ResponseType> responseHandler,
                  String path,
                  ResponseCodes responseCodes,
                  Redirects redirects,
                  List<NameValuePair> params) {
    assert session != null;
    assert client != null;
    assert responseHandler != null;
    assert !TextUtils.isEmpty(path);

    this.session = session;
    this.client = client;
    this.observers = new ArrayList<Observer>();
    this.responseHandler = responseHandler;
    this.path = path;

    UriBuilder builder;
    this.pathUri = Uri.parse(path);

    if (this.pathUri.isAbsolute()) {
        // if the path is absolute we will just use that entire path
        builder = UriBuilder.newInstance(this.pathUri);
    } else {
        // if it is a relative path then we should use the config's API URI,
        // which is usually something like https://apis.live.net/v5.0
        builder = UriBuilder.newInstance(Config.INSTANCE.getApiUri())
                            .appendToPath(this.pathUri.getEncodedPath())
                            .query(this.pathUri.getQuery());
    }

    responseCodes.setQueryParameterOn(builder);
    redirects.setQueryParameterOn(builder);

    if(params != null)
    {
        for(NameValuePair pair: params)
        {
            builder = builder.appendQueryParameter(pair.getName(),pair.getValue());
        }
    }

    this.requestUri = builder;
} 

GetRequest.java

/**
 * Constructs a new GetRequest and initializes its member variables.
 *
 * @param session with the access_token
 * @param client to perform Http requests on
 * @param path of the request
 * @param params for the request like offset, limit, filter (null = no parameter)
 */
public GetRequest(LiveConnectSession session, HttpClient client, String path, List<NameValuePair> params) {
    super(session, client, JsonResponseHandler.INSTANCE, path, params);
}

LiveConnectClient.java

/**
 * Performs a synchronous HTTP GET on the Live Connect REST API.
 *
 * HTTP GET retrieves the representation of a resource.
 *
 * @param path object_id of the resource to retrieve.
 * @return The LiveOperation that contains the JSON result.
 * @throws LiveOperationException if there is an error during the execution of the request.
 * @throws IllegalArgumentException if the path is empty or an absolute uri.
 * @throws NullPointerException if the path is null.
 */
public LiveOperation get(String path) throws LiveOperationException {
    assertValidRelativePath(path);

    GetRequest request = new GetRequest(this.session, this.httpClient, path, null);
    return execute(request);
}

/**
 * Performs an asynchronous HTTP GET on the Live Connect REST API.
 *
 * {@link LiveOperationListener#onComplete(LiveOperation)} will be called on success.
 * Otherwise, {@link LiveOperationListener#onError(LiveOperationException, LiveOperation)} will
 * be called. Both of these methods will be called on the main/UI thread.
 *
 * @param path of the resource to retrieve.
 * @param params for the request like offset, limit, filter (null = no parameter)
 * @param listener called on either completion or error during the get request.
 * @return the LiveOperation associated with the request.
 * @throws IllegalArgumentException if the path is empty or an absolute uri.
 * @throws NullPointerException if the path is null.
 */
public LiveOperation getAsync(String path, List<NameValuePair> params, LiveOperationListener listener) {
    return this.getAsync(path, params, listener, null);
}

/**
 * Performs an asynchronous HTTP GET on the Live Connect REST API.
 *
 * {@link LiveOperationListener#onComplete(LiveOperation)} will be called on success.
 * Otherwise, {@link LiveOperationListener#onError(LiveOperationException, LiveOperation)} will
 * be called. Both of these methods will be called on the main/UI thread.
 *
 * @param path object_id of the resource to retrieve.
 * @param params for the request like offset, limit, filter (null = no parameter)
 * @param listener called on either completion or error during the get request.
 * @param userState arbitrary object that is used to determine the caller of the method.
 * @return the LiveOperation associated with the request.
 * @throws IllegalArgumentException if the path is empty or an absolute uri.
 * @throws NullPointerException if the path is null.
 */
public LiveOperation getAsync(String path, List<NameValuePair> params, LiveOperationListener listener, Object userState) {
    assertValidRelativePath(path);
    if (listener == null) {
        listener = NULL_OPERATION_LISTENER;
    }

    GetRequest request = new GetRequest(this.session, this.httpClient, path, params);
    return executeAsync(request, listener, userState);
}

I'm not sure if this is the best way, but it seems a solution for me. So I do first load 50 entries and then when the adapter visit the last entry I start to fetch the next 50.

Also its possible now to add a filter e.g. only receive pictures.

One the "normal" functions I just call the API with params=null.

Get thumbnail of images

Is there a way to get the thumbnail of a photo stored on Onedrive using live sdk for Android?

SSL handshake failed on Android 2.2

Exception: Not trusted server certificate

Android 2.3+ has no this problem.

com.microsoft.live.LiveOperationException: An error occured while communicating with the server during the operation. Please try again later.
W/System.err(  479):    at com.microsoft.live.ApiRequest.execute(ApiRequest.java:227)
W/System.err(  479):    at com.microsoft.live.ApiRequestAsync.doInBackground(ApiRequestAsync.java:155)
W/System.err(  479):    at com.microsoft.live.ApiRequestAsync.doInBackground(ApiRequestAsync.java:1)
W/System.err(  479):    at android.os.AsyncTask$2.call(AsyncTask.java:185)
W/System.err(  479):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err(  479):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(  479):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
W/System.err(  479):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
W/System.err(  479):    at java.lang.Thread.run(Thread.java:1096)
W/System.err(  479): Caused by: javax.net.ssl.SSLException: Not trusted server certificate
W/System.err(  479):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
W/System.err(  479):    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
W/System.err(  479):    at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
W/System.err(  479):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
W/System.err(  479):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err(  479):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err(  479):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err(  479):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err(  479):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err(  479):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err(  479):    at com.microsoft.live.ApiRequest.execute(ApiRequest.java:209)
W/System.err(  479):    ... 8 more
W/System.err(  479): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
W/System.err(  479):    at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)
W/System.err(  479):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)
W/System.err(  479):    ... 18 more
W/System.err(  479): Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
W/System.err(  479):    at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:149)
W/System.err(  479):    at java.security.cert.CertPathValidator.validate(CertPathValidator.java:202)
W/System.err(  479):    at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)
W/System.err(  479):    ... 19 more

LiveSDK keep user info event if user decide not to grant access permission

Repro step:

  1. Login with your account.
  2. In the "Let this app access your info?" page, click "No".
  3. Login Again.

Expect:
Ask me to login with my account and password first and then display the "Let this app access your info?" page

Actual:
Display the "Let this app access your info?" page directly.

EntityUtils.toString(entity) throwing OutOfMemory errors

I am facing OufOfMemory errors inside LiveSDK, Please help.

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.OutOfMemoryError
at org.apache.http.util.CharArrayBuffer.(CharArrayBuffer.java:55)
at org.apache.http.util.EntityUtils.toString(EntityUtils.java:131)
at org.apache.http.util.EntityUtils.toString(EntityUtils.java:146)
at com.microsoft.live.JsonResponseHandler.handleResponse(JsonResponseHandler.java:50)
at com.microsoft.live.JsonResponseHandler.handleResponse(JsonResponseHandler.java:41)
at com.microsoft.live.ApiRequest.execute(ApiRequest.java:243)
at com.microsoft.live.ApiRequestAsync.doInBackground(ApiRequestAsync.java:171)
at com.microsoft.live.ApiRequestAsync.doInBackground(ApiRequestAsync.java:36)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
... 4 more

Nullpointerexception when trying to get calendar events from a given time period

When trying to get calendar events by passing start_time and end_time parameter via the path as described here (http://msdn.microsoft.com/en-us/library/live/hh826523.aspx) a Nullpointerexception is thrown.

The path I pass to the get-method of the LiveConnectClient looks like this:
"calendar.4c462a2cfff193f5.acc5cf947af34550b8dd736f7f87f095/events?start_time=2013-04-01T00:00:00+0200&end_time=2013-04-30T23:59:59+0200"

Are the parameters in wrong format?
Passing just the calendar id and the path for the events resource works fine:
"calendar.4c462a2cfff193f5.acc5cf947af34550b8dd736f7f87f095/events".

Here is the part of the Stacktrace:
// ===========================================================
E/AndroidRuntime(13814): Caused by: java.lang.NullPointerException
E/AndroidRuntime(13814): at java.lang.AbstractStringBuilder. AbstractStringBuilder.java:86)
E/AndroidRuntime(13814): at java.lang.StringBuilder.(StringBuilder.java:95)
E/AndroidRuntime(13814): at com.microsoft.live.UriBuilder.path(UriBuilder.java:216)
E/AndroidRuntime(13814): at com.microsoft.live.UriBuilder.newInstance(UriBuilder.java:87)
E/AndroidRuntime(13814): at com.microsoft.live.ApiRequest.(ApiRequest.java:166)
E/AndroidRuntime(13814): at com.microsoft.live.ApiRequest.(ApiRequest.java:133)
E/AndroidRuntime(13814): at com.microsoft.live.GetRequest.(GetRequest.java:29)
E/AndroidRuntime(13814): at com.microsoft.live.LiveConnectClient.get(LiveConnectClient.java:923)

Migration to Android Studio

Any consideration for migrating the project from Eclipse to Android Studio, now that this is the official IDE of Android?

Newer version available?

If I understand the agreement correctly, the usage of this code is now illegal. In the file LICENSE.txt there is the following license term:
"2. TERM. The term of this agreement is until December 31, 2012, or commercial release of the software, whichever is first."

So is there a newer beta version or commercial release available anywhere?

Get Error while fetching events from a calendar

Hi

I am trying to get all events from a calendar, but i got java.lang.NullPoniterException. Here is my code:

LiveSdkSampleApplication app = (LiveSdkSampleApplication) getApplication();
mConnectClient = app.getConnectClient();
mOperationListener = new OperationListener();

mConnectClient.getAsync(calenderID+"/events?start_time=2014-01-01T00:00:00Z&end_time=2014-08-30T00:00:00Z",mOperationListener);

but if i use

mConnectClient.getAsync(calenderID+"/events",mOperationListener);

i got the result but it show future events upto 30days. I want to show all the events between two dates or in a year.

Please tell me where is wrong....

Onedrive API reports incorrect file sizes for images

I am creating a Github issue here b/c I think is a real issue (definately preventing me from launching a product with Onedrive support). Maybe I am just doing some programmatically incorrect, but I've wrestled with trying to debug it for several hours and am not getting much help on the SO forums

http://stackoverflow.com/questions/26639218/does-onedrive-change-re-encode-jpg-files

Here is a post from another user who seems to have the same issue.

http://stackoverflow.com/questions/26906007/onedrive-wrong-size-for-png-files

This is a sample image that doesn't work

https://onedrive.live.com/redir?resid=A5B76D4B68BC2941%213337

Update Sample

There is no "SkyDrive" anymore. A fresh sample for OneDrive would be great.

Authentication via Built-in WindowsLive Button

Hi,

May i check if there is a built-in Login Button for Windows Live authentication? Or i need to customized my own icon set.

Please correct me if i might have missed it in AndroidManifest.xml

Library will not build under Android Marshmallow

This library will not build as of Android API Level 23. The org.apache.http classes that were deprecated in API Level 22 are removed as of API Level 23.

An interim workaround exists, in gradle force the use of the legacy library:

useLibrary 'org.apache.http.legacy'

AuthorizationResult.onPageFinished(WebView view, String url) throws NullPointerException

Step:
When login in,

  1. after user enter there name and password, in the confirm page (xxx app is requesting you permission ... YES, NO)
  2. turn off the network.
  3. Click YES or NO
    after a while, the app will crash.

The url passed to AuthorizationResult.onPageFinished method is "data:text/html,chromewebdata", then uri.getHost().equals(Config.INSTANCE.getOAuthLogoutUri().getHost()) will throw NullPointerException

For now, I can only reproduce this crash in XiaoMi phone

Store access token

I wanted to know that if there is a way to initialize the client with access-token provided by session class, so that i don't have to make user login multiple times ? Any help will be appreciated! :)

Duplicate call to /oauth20_token.srf

Shortly after log in is successful, and onAuthComplete is called, I get an onAuthErrorcall. After taking a look into Fiddler, I could tell that a second call to /oauth20_token.srf was being made, using exactly the same parameters.
I looked into the live sdk code, but couldn't figure out where the problem was. I commented all the "after log in" code from my app, to make sure it wasn't something on my side.
Take a look at the screen shots.

First call

Second call

Blocking Connect

Can you add a blocking version of LiveAuthClient.login(), LiveAuthClient.initialize() and LiveAuthClient.logout()? I'd like to avoid the hassle w/ manual locking.

NonUI Thread CallBacks

What about calling callback methods in non-ui thread while keeping onPostExecute callbacks?

When i try to synchronize multiple requests sent to live server i cannot synchronize them since both the request and completion callbacks called in UI thread.

Rename Files & Folders

Hi, im using live sdk for android for integrating Onedrive in my app , i didn't find any method for renaming files and folder. can anyone please tell me a way to rename files and folders in Live sdk for android.
thank you!

java.net.SocketTimeoutException: Read timed out

I've been getting lots of java.net.SocketTimeoutException: Read timed out lately. The status at http://status.dev.live.com/Index looks fine.
Just wondering if someone else is having the same issue. This doesn't happen on any specific request. It's a little random.

Caused by: java.net.SocketTimeoutException: Read timed out
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:673)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)
at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:180)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)
at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:428)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
at com.microsoft.live.ApiRequest.execute(ApiRequest.java:237)
﹕ ... 10 more

Can not cancel downloadAsync task.

when I call LiveDownloadOperation downloadAsync(String path,File file,LiveDownloadOperationListener listener) method to download a big file, then UI thread call cancel method, but the download task is still running, at last the onDownloadCompleted callback function will be called. my code as follows:

  1. UI thread call start() method;
    public void start(){
    try {
    File local = new File(mLocalFilePath);
    Helper.makeSureDocExist(local);
    mDownloadOperation = LiveSdkApplication.getSingleton(null).getConnectClient().downloadAsync(mOneDriveFilePath + "/content",
    local, new LiveDownloadOperationListener() {
    @OverRide
    public void onDownloadProgress(int totalBytes,
    int bytesRemaining,
    LiveDownloadOperation operation) {
    mCallback.onProgressUpdate((long)((totalBytes - bytesRemaining) / (float)totalBytes * 100));
    }

                    @Override
                    public void onDownloadFailed(LiveOperationException exception,
                                                 LiveDownloadOperation operation) {
                        mErrorMsg = exception.getMessage();
                        mCallback.onFinishDownLoad(false, mLocalFilePath,mErrorMsg);
                    }
    
                    @Override
                    public void onDownloadCompleted(LiveDownloadOperation operation) {
                        mErrorMsg = "DownloadFile success!";
                        mCallback.onFinishDownLoad(true, mLocalFilePath,mErrorMsg);
                    }
                });
    }catch (Exception e){
        Log.e(TAG, e.toString());
    }
    

    }

2.UI thread call mDownloadOperation.cancel();
3. after moment onDownloadCompleted will be called, and the big file still be downloaded.

Crash when attempting connection with no internet connection

When invoking LiveAuthClient.login() with all network access disabled (Android 4.4.4), the app crashes with the following stacktrace:

05-29 15:51:58.343    W/System.err﹕ java.lang.NullPointerException
05-29 15:51:58.343    W/System.err﹕ at com.microsoft.live.AuthorizationRequest$OAuthDialog$AuthorizationWebViewClient.onPageFinished(AuthorizationRequest.java:103)
05-29 15:51:58.347    W/System.err﹕ at com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:455)
05-29 15:51:58.347    W/System.err﹕ at com.android.org.chromium.android_webview.AwContentsClient$AwWebContentsObserver.didFinishLoad(AwContentsClient.java:62)

Issue to login first time.

When we run project first time then got below error. I think.. Some url issue. Please check & let us know if any other issue.

"The Provided value for the input parameter 'redirect_uri' is not valid. The client application must be marked as 'mobile', or the value must be an absolute URL which matches the registered redirect URL."

LiveSDK-for-Android Licence

The Licence file says that the SDK is only licensed for use until 31st December 2013.

Please update the licence file with the current terms of the licence for the Android LiveSDK, whatever they are!

Repeatedly asks for permission

In the sample app, I successfully logged in the first time it ran, and it prompted me whether to allow the "Sign you in automatically" permission. On every subsequent login, it does not ask me for my username/password, but it again prompts me whether to allow the same permission. So it seems it is remembering that I allowed the permission, but not realizing it should skip the prompt after auto login.

WebViewClient.onReceivedSslError

Hi,
I am using your library for our Android application. Now I am getting the following warning from Google Play store.

"Your app is using an unsafe implementation of WebViewClient.onReceivedSslError handler. Please see this Google Help Center article for details, including the deadline for fixing the vulnerability.
Vulnerable classes:com.microsoft.live.AuthorizationRequest$OAuthDialog$AuthorizationWebViewClient"

Here is how I am importing your library (build.gradle):
compile 'com.microsoft.orc:live-auth:0.14.2'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.