Discussion Forums  >  WebViews and HTML for Mobile

Replies: 2    Views: 209

Hmmm
buzztouch Evangelist
Profile
Posts: 67
Reg: Sep 17, 2013
location unknow...
6,670
Fourm StarFourm Star
06/19/14 09:03 AM (8 years ago)

getBaseContext() in custom_URL plugin on Android

We have a user profile page where we want to let users upload a profile photo. Using the standard custom_URL plugin, html file upload fields do not function. We are trying to integrate code we found at androidexample.com into the custom_URL plugin and are getting errors on two lines that call getBaseContext() and getApplicationContext(). The code we are incorporating is here: http://androidexample.com/Open_File_Chooser_With_Camera_Option_In_Webview_File_Option/index.php?view=article_discription&aid=128&aaid=148 Toast.makeText(getBaseContext(), "Exception:"+e, Toast.LENGTH_LONG).show(); Toast.makeText(getApplicationContext(), "activity :"+e, Toast.LENGTH_LONG).show(); Would appreciate any help on how to call these from within the custom_URL plugin.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
Fourm StarFourm StarFourm Star
like
06/19/14 04:01 PM (8 years ago)
Just use the BT Methods instead... showToast("Exception:"+e, "long"); showToast( "activity :"+e, "short"); Cheers! -- Smug
 
Hmmm
buzztouch Evangelist
Profile
Posts: 67
Reg: Sep 17, 2013
location unknow...
6,670
Fourm StarFourm Star
like
06/20/14 05:57 AM (8 years ago)
Perfect. Thanks Smug.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.