Android :: Activity Flow During OAUTH Authentication

Feb 3, 2010

I think that I've found the problem I am having with AccountManager that I described in an earlier thread that got no responses on the board.

I think it is a problem with the way that the Activity Stack is working during the OAUTH workflow. Here's the workflow as I see it. I found this problem by separating out my Activity, which I'll call M, from the oauth Activity, which I'll call O. In the course of authentication, the web browser is invoked and let's call that B.

When a user needs to start over with authentication, my application, through Activity M, starts Activity O. That, in turn, generates some magic URL that is sent to the web browser. So the browser is fired up and information was sent to the OAUTH provider to do a redirect back through the browser back to Activity O.

So, this how the OAUTH workflow looks up to the browser: M -> O -> B

At this point the user logs in and hits the Accept button and the browser then invokes my BROWSABLE activity, which, again, is O. I had thought this would unwind the above stack, but it seems that above situation disappears and what I have after the user hits Accept in the browser is this: B -> O

What I did to work around that is that I put a startActity(M) in O and that seems to work, but it is a workaround.

I believe there is something that I could do with launch modes or activity modes to fix this problem and maintain the original activity stack.

All that is happening, really, is that the O activity pauses for little while, then comes back with the goods, the login credentials. But when I tried to return the information via startActivityForResult (), nothing. Because M is no longer on the Activity Stack.

Android :: Activity Flow during OAUTH Authentication


Android :: Android Twitter Oauth Based Authentication And Update Status SSL Error

Jul 29, 2010

Android twitter Trying the following tutorial for Oauth based authentication and updating user status.

http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html

When i run It has successfully authenticate but when it tries to update the status following error occur.

CODE:...............

View 2 Replies View Related

Android :: Implement 3 Legged Authentication Using OAuth On Android Devices

Feb 3, 2010

following questions:

1. How to implement 3 legged Authentication using OAuth on Android devices? Is there a library that assists in the aforementioned?

2. What does it mean when someone says: "Site/Service ABC supports OAuth"?

View 2 Replies View Related

Android :: How To Control Activity Flow - Back Button Versus Home Button

Sep 2, 2010

I have 3 activities in my app: Activity1 -> Activity2 -> Activity3. Inside Activity3, if the user presses Back, I would like to return to Activity2. In Activity3's onPause event, I added a finish() statement. That's probably not even necessary, but I wanted to make sure this Activity gets cleaned up. This works fine.
However, while in Activity3, if the user presses Home or starts a new app (through notification bar or some other means), I want both Activity3 and Activity2 to finish. If the user returns to this app, he should resume with Activity1.

I have figured out how to do one or the other, but I can't figure out how to handle both cases, if it's even possible. Can I trap the "Back" button in Activity3 and send a message back to Activity2 telling it not to finish()? It seems like the Activities follow the same lifecycle flow (Pause, Stop) regardless of what you do to send them to the background. Just to answer the question of why I want this behavior, imagine that Activity1 is a login screen, Activity2 is a selection screen, and Activity3 is a content screen. If I press Back from the content page, I want to be able to make a new selection. If I exit via any other means (Home, notification bar), I want the user to be "logged out".

View 2 Replies View Related

Checking Code Flow Of NFC In Android-ICS?

Dec 13, 2011

Actually I am checking the code flow of NFC in Android-ICS.But i got stuck because of some files are not present in ICS.

Like :

GB code -> WriteTagActivity (to write into a TAG)

ICS code -> no files.

Some more files are also missing in NFC and TAG.

View 2 Replies View Related

Android :: How To Layout Text To Flow Around An Image

Feb 9, 2010

In android, can you please tell me if there is a way to layout text around an image? Like this: ------ text text text | | text text text ----- text text text text text text text text text text text?

View 3 Replies View Related

Android :: Understanding Proper Alarm Flow

Jan 11, 2010

the app I'm trying to implement allows the user to select a sound file (MP3 or WAV) to play at a specific date and time showing a dialog with a progress bar and an OK/Cancel button allowing the user to stop the playing of the sound file. I want it to behave something like the countdown apps I've seen or even the built-in alarm clock app. As I'm implementing this simple (I thought!) app, I'm trying to better understand the platform and make the application conform to the Android way.

As I've been writing the app, I learn more about how things are supposed to work on the Android platform. And here's where I'm getting a bit confused. During my attempts to get the alarm to fire and display, I'm learning that properly formed Android applications are not supposed to show dialogs as a result of a background service or broadcast receiver being invoked through Android's alarm service. Instead, I think, the app is supposed to use a notification on the status bar to alert the user. The user then has the option to look at the notification to see what the app is trying to tell them..............

View 1 Replies View Related

Android :: How To Layout Text To Flow Around Image?

Feb 12, 2010

Can you please tell me if there is a way to layout textaround an image?I have gotten a response from an android developer about this question. But I am not sure what he means by doing my own version of TextView? Thank for any tips.This is not possible using only the supplied widgets and layouts. could write your own version of TextView to do this, it shouldn't be hard.

View 2 Replies View Related

Android :: Program Flow When Rotating Device With Two Activities

Aug 13, 2010

My first activity is creating a second activity within its onCreate:

CODE:............

The second activity has EditText views for the username and password along with submit and cancel buttons. When either button is pushed, the text from username and password is sent back to activity one (via onActivityResult), which connects to a server to see if the username is available. While connecting to the server showDialog is used to show a ProgressDialog. When the server responds, the ProgressDialog is dismissed and an AlertDialog is shown. This works fine as long as the device is not rotated.

Here's the problem: if the user rotates the device from within the second activity and pushes submit, the first activity re-invokes its onCreate, which ends up launching the second activity again since the username and password are still null.

Does anyone have any suggestions to get around this?

Is there a method that could be used to pass data from activity-2 to activity-1's onCreate? I wouldn't want to use a database in this case, as that seems like overkill.

I've thought about containing the server communication and dialogs to activity 2, but then I'd have duplicate server code in activity 1 and activity 2 (activity 1 connects to the server for other things too). Another issue I'd have with this approach is that the user has an option to cancel creating the password, in which case I want the app to finish. If I called finish from activity 2, activity 1 would appear and I don't want that to show unless a username and password have been created.

It just occurred to me - if I could replace activity 2 with a dialog it might make things simpler. The dialog view needs to have 2 EditTexts and 2 buttons. Can I create something like this and use the showDialog method?

View 1 Replies View Related

Android :: Design Flow Chart Scheme For Apps?

Oct 7, 2010

I'm seeing that it would be good to have some sort of charting scheme (or possibly just a table-based design strategy) when designing Android apps.Have any such schemes been proposed?

View 4 Replies View Related

Android :: Multiple Process On Separate Development Flow

Jul 14, 2009

I need two activities run in different processes in the same application. Now I have made it work by specifying the different process name in "android:process". But I met a problem, from http://developer.android.com/guide/topics/manifest/application-elemen..., we have only one superclass of Application will run before the activity starts(I have tested it, and each time a after new processes start, this Application(its superclass) will run before activity). But, my two activities have two different superclasses of Applications.

So, how to make Applications for different activities run for its corresponding activity? If there is no way to use different Application class for different activity, how can I make a flag for the common Application superclass to judge which process(by getting its name) is running? BTW, the two activities were on the separated development flow and I am trying to merge them.

View 12 Replies View Related

Android :: Make Control (focus) Flow From Button To Top Of List View

Oct 4, 2010

My activity has a set of buttons on the left half of the screen and a ListView on the right.Initially the focus is on the first button. When I browse the buttons by pressing DOWN arrow key and then press the RIGHT arrow key, the focus does not go to the topmost list item. Instead, the list item correspondingly on the right gets focused.Is there a way that when I press the RIGHT arrow key, the focus goes to the topmost item on the Listview?

View 1 Replies View Related

HTC EVO 4G :: Music Album Art Flow?

May 14, 2010

Will there be any cover flow on the evo and will you be be able to use the music player in landscape mode. I asked this a previous thread figure I would bring it back up.

View 4 Replies View Related

Android :: Best Learning Resource For OAuth

Jul 14, 2010

I have to use OAuth for my Android client and I have found that the learning resources are pretty rare or inadequate for this technology. Does anybody know a good book/tutorial/online resource to learn OAuth?

View 3 Replies View Related

Android :: OAuth Request Token - Null In App

Jun 4, 2010

I am trying to authenticate something(in this case LinkedIn) using OAuth but the requested token always returns null?

Here is my code below:

CODE:........

I basicaly followed the example here http://donpark.org/blog/2009/01/24/android-client-side-oauth.

View 4 Replies View Related

Android :: OAuth Secrets In Mobile Apps

Dec 19, 2009

When using the OAuth protocol, you need a secret string obtained from the service you want to delegate to. If you are doing this in a web app, you can simply store the secret in your data base or on the file system, but what is the best way to handle it in a mobile app (or a desktop app for that matter)?

Storing the string in the app is obviously not good, as someone could easily find it and abuse it.

Another approach would be to store it on you server, and have the app fetch it on every run, never storing it on the phone. This is almost as bad, because you have to include the URL in the app. I don't believe using https is any help.

The only workable solution I can come up with is to first obtain the Access Token as normal (preferably using a web view inside the app), and then route all further communication through our server, where a script would append the secret to the request data and communicates with the provider. Then again, I'm a security noob, so I'd really like to hear some knowledgeable peoples' opinions on this. It doesn't seem to me that most apps are going to these lengths to guarantee security (for example, Facebook Connect seems to assume that you put the secret into a string right in your app).

I don't believe the secret is involved in initially requesting the Access Token, so that could be done without involving our own server. Am I correct?

View 7 Replies View Related

Sprint HTC Hero :: Turn Off Text Flow In Browser?

Nov 9, 2009

Does anyone know if there is a way turn off the text flow in the Hero's browser? I hate how when I pinch to zoom, it auto text flows and throws me onto some random place on the site...pretty annoying. I have to then search around for where i on the site I was before I did the pinchzoom

View 1 Replies View Related

General :: Dolphin Browser HD / New Tab Homepage And Text Re-flow?

Aug 2, 2012

New to Android and to Dolphin Browser HD. I've Googled for days, however, I have come up with squat.

1) When I open a new tab, can it automatically go to my homepage and not the "Speed Dial" sort of page it does now? Any add-ons that might enable this?

2) Does Dolphin Browser HD do automatic text reflow? And, if not, any other browsers that can do this? It is pretty tedious now trying to read pages that aren't re-sized for mobile.

View 3 Replies View Related

Android :: SignPost Or Twitter4j For Sign-in With Twitter - OAuth

Nov 1, 2010

About signpost, and then went back to Twitter4J with which I have created my twitter applications when OAuth wasn't necessary. whether I should use signpost or Twitter4J's method of OAuth authentication. I have read that Twitter4J itself uses signpost for OAuth, still am not sure about the choice that I should make.

View 2 Replies View Related

Android :: Handle OAuth Callback Using Intent-filter

Apr 19, 2010

I am building an Android application that requires OAuth. I have all the OAuth functionality working except for handling the callback from Yahoo.

I have the following in my AndroidManifest.xml:

CODE:..............

Where www.test.com will be substituted with a domain that I own.

It seems :

This filter is triggered when I click on a link on a page. It is not triggered on the redirect by Yahoo, the browser opens the website at www.test.com It is not triggered when I enter the domain name directly in the browser.

When exactly this intent-filter will be triggered? Any changes to the intent-filter or permissions that will widen the filter to apply to redirect requests?

View 3 Replies View Related

Android :: Writing Twitter Client Using OAuth - Callback Fails

Feb 15, 2010

I am working on an Android application which is to serve as a simple Twitter client. I am using OAuth for authorization and have registered my application with Twitter as new OAuth client. Now when the user authorizes the application, I expect to be taken to the Callback URL(which is pointing to my application); but this is not happening.

My Problem along with source code is described in detail here: http://stackoverflow.com/questions/2199357/oauth-twitter-on-android-c...)

The following intent is launched post authorization: Intent { act=android.intent.action.VIEW dat=http://twitter.com/oauth/authorize? oauth_token=XXACTUAL_TOKEN_HEREXX8&oauth_callback=myapp:///tweet cmp=com.android.browser/.BrowserActivity }

Some how, the hypothetical URL, I provided while registering my application, gets called.

View 2 Replies View Related

Android :: Provider Is Null When Doing Oauth After Turning Back From Web Page

Jun 27, 2010

I use signpost-oauth do oauth in android, and after login on the web page, return to the Activity, the provider is null sometimes.

CODE:.....

And the manifest.xml

CODE:.....................

I don't know why the provider is null sometimes.

View 1 Replies View Related

Android :: Signpost OAuth - How To Re-create The Consumer Between Two Succesive Runs

Oct 9, 2010

I'm succesfully using Signpost to authorize calls to protected resources in a Google account via OAuth.

However it seems a bit weird that the user has to go each and every time through Google and grant access. Is there a way of serializing the Consumer and recreating it so that re-authorization is not needed? I've tried keeping the tokens, secret and verifier in the shared preferences and setting them in the Consumer but I receive a OAuthExpectationFailedException.

View 1 Replies View Related

Android :: Connecting The Login Flow Between Android/iPhone App And The Web

Feb 5, 2010

When the person opens my app, I want to display a button. The user clicks this button, and it opens a browser (embedded, of course) inside the app, allowing the user to LOGIN through that web page.

Of course, when the person logs in, it only logs in to that web server. The web service now knows that the user is logged in.

As the user uses my mobile app, I need to know if he's logged in or not. How can I know? There's no way for my app to determine if the user is logged into my web service.

By the way, I am using Django framework for my web service.

View 1 Replies View Related

Android :: Android Twitter With Oauth-signpost Error Authorization Failed - Server Replied With A 401

Jul 8, 2010

Im tryin to use Twitter with OAuth but i receive this exception.

Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.

im using this sample
http://code.google.com/p/oauth-signpost/wiki/TwitterAndSignpost

Error Line:
String authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);

View 1 Replies View Related

Android :: HttpUrlConnection - Authentication

Mar 24, 2009

I am beating my head against a wall trying to figure out why I cannot get Authenticated on my server whilst using HttpUrlConnection. I need to post a file in a post method and it seems I cannot do so with the DefaultHttpClient and a regular HttpPost (unless I am completely missing something?). I can get DefaultHttpClient to authenticate just fine using setCredentials() but the same doesn't exist for HttpUrlConnection so I try to set through setRequestProperty: conn.setRequestProperty("Authorization", "Basic " + Base64EncodedUserNamePassword); to no avail.

View 6 Replies View Related

Android :: SSL Client Authentication

Mar 11, 2009

I am new on SSL programming. The Android app I am developing needs to open an SSL socket to a secure server which requires the client authentication. When running on the Emulator and trying to talk to a Server running on the host PC, the following Android code snippet always gives me a SocketException at the line, SSLSocket c = (SSLSocket) f.createSocket(hostName, 8888) :

private void openSslClient(String hostName) { try { KeyStore keyStore = KeyStore.getInstance (KeyStore.getDefaultType()); InputStream fis = this.getAssets().open("client.bks"); keyStore.load(fis, "clientjks".toCharArray());

KeyManagerFactory kmf = KeyManagerFactory.getInstance ("X509");
kmf.init(keyStore, "clientkey".toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance ("X509");..............

View 2 Replies View Related

Android :: How To Do HTTP Authentication

Dec 28, 2009

I am checking out the class org.apache.http.auth. Any more reference or example if anyone has?

View 2 Replies View Related

General :: Android 4.0 SSL Authentication

Jul 19, 2012

I am new to android and know very little about authentication. Ive been asked to build an rss feed app that will need to do Client side certificate authentication through SSL.

I've looked into the keychain api but how to use it and seen no tutorials of its usage.

I am a little lost as ive not done anything with authentication before. How to do mutual SSL client Authentication in android 4.0?

View 1 Replies View Related

Android :: Android - Twitter Oauth - Many Different Methods - None Seem To Work

Sep 16, 2010

I can't get Oauth to work with Twitter. I have tried the following (all result in the same 401 error):

CODE:.......................

I've tried my own implementation and copy/pasted the sample code from each of the sites, and nothing seems to work. I'm also 100% sure I also downloaded and included any dependencies (where needed).

Here's the interesting part. Using jTwitter and the oauth-signpost library, I can initiate a connection to Twitter, open a browser window for the user, have them log-in and generate a PIN for my app. When the app goes to post a status update however, (using the pin, and the stored access token and token secret), the 401 error pops up. All other things I've tried won't even let me open a browser window and ask the user to generate a PIN (they die with the 401 error on the request for the "request token").

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved