#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    2
    Rep Power
    0

    Webview loadurl from activity problem


    Hello,

    I've been trying to get an app working for a while now but it seems like i'm crashed..

    My main activity creates 3 tabs that i want
    addTab("Scan", R.drawable.tab_scan, scanActivity.class);
    addTab("Search", R.drawable.tab_search, searchActivity.class);
    addTab("View", R.drawable.tab_home, viewActivity.class);
    So every tab has it's own class.

    Now the scan tab scans a barcode and gives back a website link (String) and I want the View tab to display this website.

    How do I get the string from the scanactivity to to the viewactivity?

    I've tried sharedPreferences but that doesn't seem to work.
    (It does when i place the save command above the create tab in the main activity)

    It seems that after creating the tabs, i can't send strings to it.

    Is there something I'm missing? could someone please help me?

    George
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    2
    Rep Power
    0
    Fixed,

    Placed a String in the activity creating the tabs

    and the tab creating the string has onPause writing to String
    while the receiving tab has onResume get String

IMN logo majestic logo threadwatch logo seochat tools logo