Skip to content

Instantly share code, notes, and snippets.

@TjWallas
TjWallas / AndroidVimeo.java
Created April 22, 2013 06:59
Embedding Vimeo Videos using WebView on Android
//Auto playing vimeo videos in Android webview
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAppCacheEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
// how plugin is enabled change in API 8
if (Build.VERSION.SDK_INT < 8) {
mWebView.getSettings().setPluginsEnabled(true);
} else {
mWebView.getSettings().setPluginState(PluginState.ON);
# This is the same regex/phrasing as the original step from the compendium
# It's just passes on the work to a method which can be used via code from other code
Then /^I save a screenshot with prefix (\w+)$/ do |prefix|
screenshotFromPrefix(prefix)
end
def screenshotFromPrefix prefix
# contruct filename based on the prefix and a timestamp (in millis to avoid overwriting screenshots taken close to each other)
filenameWithRelativePath = "#{prefix}_#{DateTime.now.strftime('%Q')}.png"
@ljanzik
ljanzik / .project
Created June 17, 2012 17:34
Building Android App with Maven
<projectDescription>
<name>thoughtsonmobile-testapp</name>
<projects/>
<buildSpec>
<!-- added two adt build commands for full eclipse support -->
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>