I am trying to make a little app that shows Timetable, but to make it easier I want to show flash website on fragment webview. How can I do this?
I have tried to enable plugin, but it doesn't enable flashplayer. What would be the best solution to show it in the webview or just in app?
In your Manifest file on application tag add this property
android:hardwareAccelerated="true"
If not working then try setting the below property to your webView.
mWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
Note: The above fix does not work in all android phones.
Related
I have made a torch/Flashlight app on android studio (which is working perfectly fine), what i want is to open the flash light just by clicking the app button (without opening the app). can anyone upload the source code.
Please be clear and thorough.
you can use transparent theme for the MainActivity and when activity start, turn on flash light and finish the activity! and nothing was showed to user!
you can use this link transparent theme to know how define transparent theme.
I think it isn't possible to enable flashlight by only clicking the app icon because app icon always refers to an activity.
But you can make a widget. It's well described on:
http://www.vogella.com/tutorials/AndroidWidgets/article.html
Please, is there any way to force WebView to play html5 embedded vids? I spent two days tempting it (from just enabling js and plugins with hardware acceleration to using html5webview class) and made video tag working, but embedding with iframe only shows me preview.
Any suggestions, please?
Does it play if you click on it manually? There are all sorts of things that may go wrong with HTML5 video on the internet, on Android you also have to take into account the various permissions.
Try this first:
Load the webpage in a browser - does it work?
Load the webpage in the browser on the device, does it work?
Load the webpage in the webview, does it play when you click on it?
There should be an auto play property on the webview, but I know that one IOS at least that one is ignore and the video won't play until you click it.
I have custom android application. In which when i click on any button of that application it gives some audio tone(i think it comes from audio Finger). I want to disable it just for my application.
so how can i disable audio tone on button of my android application?
You can go with this code:
YOUR_BUTTON.setSoundEffectsEnabled(false);
OR
Also you can give property with xml:
android:soundEffectsEnabled="false"
Reference site: Android View Doc
Hope it will help you.
I'm just getting started with Android dev, done a few tutorials, now I'm working on a simple app. On both the emulator and my phone (Android 4.0.3 emulator, Android 4.1.1 Atrix HD) apps are displaying in what I think is Holo Light. I'd rather have it be Holo Dark, but when I add the following line to the application block in the Android Manifest file: android:theme="#android:style/Theme.Holo" the app compiles fine but force closes as soon as I open it.
What am I doing wrong? I'm sure it's something really simple, but as I said I'm new to this. Thanks in advance, y'all!
If you want to use a theme for all the activities of your application then you need to use
<application android:theme="#style/CustomTheme">
in AndroidManifest.xml.If you want a theme applied to just one Activity in your application, then add the android:theme attribute to the activity tag instead.So need to know what type you use in your application.However see these things which will clear you more..
http://developer.android.com/guide/topics/ui/themes.html
http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html
The simplest thing you can do and you should always do is to read logs why does it crash. The log will tell you the reason of you crash. Please post the reason including logs from Logcat and only then ask about fixes:)
I am developing a photo sharing app for Android. I have a web site that I want the Android to get WebViews for most of it, but I want the android to have a native home screen rather than the web site homescreen.
As of right now, I open a WebView for login (this is needed because i must login with twitter) but after that I want the android to go to its own native home screen rather that the web site home screen.
I have tried using the shouldOverrideUrl() method to no avail. Is it even possible to program and android app to switch from the WebView at a given url?
Just create a method to check for the URLs to catch. Then make it not call the URL and open the home screen.