1. Are you ready for the Galaxy S20? Here is everything we know so far!

Using Passwords in Tasker and SL4A

Discussion in 'Android Devices' started by hawkjm73, Dec 26, 2011.

  1. hawkjm73

    hawkjm73 Newbie
    Thread Starter

    First off, I love my nexus! :)

    Now to the question:

    I'm using tasker and sl4a to give me one button control for my Viper SmartStart in my car. Their app was laggy and really slow to load, but you can use https calls to do the remote functions. Much faster, and I can do voice control when I get it set up to my liking. The main trouble is, I'm storing the Viper password in plane text in my script. Major no-no. Gaining the password wouldn't allow someone to drive off with my car, as you still need the key for that, but they would be able to access the interior.

    Does anyone have any ideas how I might store the password incripted, or at least obfuscated? I thought maybe storing it in two seperate peices, and having tasker reassemble it via some sort of algorithim, but I'm unsure if that would increase security signifigently.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. tdsteve

    tdsteve Lurker

    I'm about to dive into this question as well. I'm working on a Android interface to a project management website for work. I figured out how to push my username and pwd from my py scripts to log-in into the website, but now I need to figure out how to store it on my phone (in the app).

    Give this a try:
    Google + PreferencesFacade

    further reading:
    Google + android data-storage

    (sorry, can't post links yet)
     
  3. tdsteve

    tdsteve Lurker

    Just ran a quick test and its working:

    # Storing
    self.droid.prefPutValue('key','value','FileName')

    # Retrieving a value
    print self.droid.prefGetValue('key','FileName')

    # Retrieving all
    print self.droid.prefGetAll('FileName')

    You may have to do some further work to encrypt your information (ie pwds), but its a start. I'm also not sure if these values are available to other apps or if this if private to the particular app. Also, I've read a bit on issues with rooted phones and storing data - bottom line is encryption.
     
  4. tdsteve

    tdsteve Lurker

    I believe this answers part of my question:
    prefPutValue - uses "MODE_PRIVATE" when writing to preferences. Save values to the default shared preferences is explicitly disallowed.
     

Galaxy Nexus Forum

The Galaxy Nexus release date was November 2011. Features and Specs include a 4.65" inch screen, 5MP camera, 1GB RAM, TI OMAP 4460 processor, and 1750mAh battery.

November 2011
Release Date
0
Reviews
Loading...

Share This Page

Loading...