June 21st, 2012, 04:25 AM
Webview loadurl from activity problem
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?
June 21st, 2012, 07:54 AM
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