Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
GenJoe
Sep 15, 2010


Rehabilitated?


That's just a bullshit word.
Is there a way to programatically disable the android WebView from loading the mobile version of a website? It seems that the WebView defaults to loading mobile versions, but for my purposes I pretty much need it to load the default version of the website.

Adbot
ADBOT LOVES YOU

GenJoe
Sep 15, 2010


Rehabilitated?


That's just a bullshit word.

Glimm posted:

Maybe try using WebSettings:

http://developer.android.com/reference/android/webkit/WebSettings.html#setUserAgentString%28java.lang.String%29

code:
webView.getSettings().setUserAgentString("Some user agent that represents itself as a desktop?")

Thanks, that worked pretty well.

GenJoe
Sep 15, 2010


Rehabilitated?


That's just a bullshit word.
So I have an app that authenticates the user with a third party website using account information that the user supplies. Right now I am storing their username/passwords in plaintext on the app's internal file storage so they don't have to supply this information every time the app connects to the website. The files are supposed to be private to the application, but I would still like to encrypt the user information because of obvious reasons.

Hashing here isn't going to work, because the app has to post the unencrypted passwords to the website, so what is going to be the best way to encrypt and decrypt the data to and from storage? I don't have much experience with cryptography, doubly so with doing it in the context of an android app, so any help would be appreciated.

GenJoe
Sep 15, 2010


Rehabilitated?


That's just a bullshit word.

Sereri posted:

Do you have to present the password with every request? Can't you just save cookies or something similar?

No, cookies will keep the user logged in for the current session, so its more an issue of keeping the password stored for subsequent sessions. There are two problems with not storing any user information at all. First is that I don't want the app to prompt the user for a password every time they start the app up again (the entire app revolves around connecting to this website and retrieving data from it, so that would really mess with the user experience). The second is that the app will poll the website at scheduled intervals in the background, so the user will not always be there to supply their information to the app.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply