General :: Playing Local Audio File In Webview App

Feb 3, 2012

When trying to play a local mp3 file included in the APK, nothing happens. However, if I pull an mp3 from the web it works.

e.g.

< a u d i o src="[URL]..." > WORKS

< a u d i o src="01.mp3" > DOES NOT WORK

I tried looking through logs for clues and found this line. I'm not sure if it's relevant or not.

PlayerDriver::isProtectedFile(file:///android_asset/www/01.mp3)

I'm new to Android development, so I can only guess that the file is somehow inaccessible for streaming.

I'd love to get this figured out though. Having to pull the files remotely every time is not a desirable solution.

Some additional info. Either solution works when tested in the browser. The local file problem only arises when I convert it to an app. I'm using PhoneGap build to create the APK.

General :: Playing local audio file in webview app


General :: Samsung S3 - Playing Audio File During Call?

Jan 28, 2014

I want to play an audio file so that the person i am calling can hear it.Not through the speaker though because it will decrease the sound quality.

I tried to open the audio file while calling (with default sound player and google music) but although it openes the app it says "unable to play during call".I also tried in handsfree mode but didnt worked.

I use sg s3 mini with android 4.1.2.

View 1 Replies View Related

Android :: WebView Playing Audio With Javascript

Sep 25, 2010

I'm trying to very quickly port over an html application with plays sound (with soundmanager2) to a native android app using WebView. From my research, I haven't seen any evidence that sound, such as mp3s, can be played via javascript or any other methods using WebView.

My goal now is to quickly port over the html app and then eventually create a truely native application without using WebViews.

If anyone has been able to successfully implement playing audio using WebViews and Javascript or if this is just not possible at this time.

View 1 Replies View Related

Android :: Way To Display Local File In WebView?

Feb 28, 2009

I thought it might be interesting to some developers. Here's a complete working example of ContentProvider for this purpose: http://blog.tourizo.com/2009/02/how-to-display-local-file-in-android. I also found a topic here: http://groups.google.com/group/android-developers/browse_thread/threa. Looks like the topic was closed and I couldn't reply there, so I created new one.

View 2 Replies View Related

Play Local Swf-file (flash) With Webview?

Sep 9, 2010

I guess webview is the best solution to play a local swf-file (flash). I just get cryptic character in the emulator with this html code in webview.

HTML Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Flash</title>
</head>

[URL]

How can i play a local swf-file when the user click on some kind of link, java or html?

View 10 Replies View Related

Android : Playing Local 3gp Video File Causes PVMFErrNotSupported

Jul 21, 2009

I plan to have a 3gp video file that will come with the installation package, it will be placed in /files/ subdirectory, and I would like to ask the native Android media player to play it when I want that.

Here is what I have planned to do/code:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW);

Uri data = Uri.parse("BattlestarGalactica.3gp"); intent.setDataAndType(data,"video/3gpp"); startActivity(intent);

However, when I try to launch the lines above, I get the following error:

CODE:.............

And the video can not be played.

What am I doing wrong that is not applicable to Android platform?

View 7 Replies View Related

Android :: How To Use Webview.loadUrl / When Html File Is Local?

Nov 2, 2010

How do I open a a local html-page (named, for instance "test.html") in a WebView? where should i keep this keep html page with images in project and how to use Webview.loadUrl(String url)?

View 4 Replies View Related

Android :: Loading External Data On Local File In WebView

May 27, 2009

when I load external web page, image or javascript file from local webpage. I can't see external image and can't load javascript or webpage. But I can only see local image. Why I can't load external javascript, webpage or image? Here is the HTML source. (of course, I filled right [daum open API key])

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta
http-equiv ="Content-Type" content="text/html;
charset=UTF-8"> <title>Daum 지도 API</title>
<script type="text/javascript"
src="http://apis.daum.net/maps/maps.js?
apikey=[daum open API key]" charset="utf-8"></script> </head> <body>
<div id="map" style="width:600px;
height:400px;
" style="border:1px solid #000">
</div> <img src="http://4.bp.blogspot.com/_2-7AdSkZA7I/RlCnDhD3ZfI/ AAAAAAAAE9U/LEHMtyVLdY8/s400/CutyTale10.jpg">
<img src="file:///android_asset/coffeebean.jpg">
<script type="text/javascript">
var map = new DMap("map", {point:new DLatLng(37.48879895934866, 127.03130020103005), level:2} );
</script> <iframe src="http://www.daum.com" width="300" height="150"></iframe> </body> </html>

and I use this Activity source
package bo.my.android.test;
import android.app.Activity;
import android.os.Bundle; import android.webkit.WebView;
public class OpenAPITest extends Activity {
WebView webView;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webView = (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new DaumMapClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/daummap.html");
//webView.loadUrl("http://www.daum.net");
} }

View 3 Replies View Related

Android :: Playing Audio File During Call

Jan 30, 2009

I want to accept incoming calls and play an audio file for the caller. Is there a possibility of playing an audio file during a phonecall, so that the caller hears a wav- file? It seems to me that nothing is possible during a phone call since release 1.0. Hope this is getting better in the next release.

View 5 Replies View Related

Android :: Playing Audio File On Voice Call

Apr 20, 2010

I want to play an audio file on a voice call as following:
The application initiates a call from device X to device Y
When Y replies application on device X should inject an audio file in the stream of the call so device Y hears this audio file.

View 2 Replies View Related

Android : Playing Bigger Size Audio Wav Sound File Produces Crash

Mar 25, 2010

I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(10kb, 20 kb files etc) very well.

P.S: I should play PCM(.wav) buffer sound, the reason behind why i use AudioTrack here. Though my device has lesser memory, how would i read bigger audio files bytes by bytes and play the sound to avoid crashing due to memory constraints. Code...

Could someone guide me please to play the AudioTrack code for bigger size wav files?

View 1 Replies View Related

General :: Playing Local MP3s From SD Or Internal Storage?

Apr 27, 2013

This should be so simple, but apparently, it's not. I have a folder on my Nexus 4 internal storage:

/sdcard/Music/Favorite Songs/Current

... with a bunch of MP3s in it with ID3 v2.4 tagging. How in the world do I add these to the Play Music app (not cloud) without using some desktop manager? I also tried installing Omich Player (a fork of Apollo) and while I can browse to the folder, none of my music shows up under artists/albums/etc.

View 2 Replies View Related

General :: Audio Echoing - Playing Sound Twice?

Jan 22, 2013

I have a flash file that I open through smartswf and suddenly the audio is now echoing, like its playing the sound twice. It use to work OK on this ROM (cyanogenmod 10) with this app. It does the same with other flash files also. I have tried other apps and does the same thing, and tried reinstalling flash and rolling back to earlier versions with the same result.

View 1 Replies View Related

General :: Playing Music Through Audio Device Using Bluetooth

Apr 29, 2014

Having problem playing music through audio device using bluetooth (Bluetooth Speaker).. (All cm7 based rom for galaxy pocket have this problem)

Device: Galaxy Pocket
Rom: Reincarnation V5
Kernel: Getux Kernel V1
Added Tweaks: KickAss kernelizer,Supercharger

View 3 Replies View Related

General :: Phone Resets When Playing Video Or Audio?

May 12, 2013

I'm having a strange problem with my Xperia Arc (4.0.4) that is proving very difficult to track down. When playing music or videos, after a random amount of time (maybe 20 or 30 seconds) the phone will crash and restart. This happens regardless of the app I use - Play Music, Poweramp, MX Player and YouTube. I have restored my phone using CWM to a much earlier backup, but eventually (within a few hours) the problem returns.

My only other recourse would seem to be a full wipe and return to stock firmware, which would be a major PITA and obviously wouldn't support if this is a hardware issue or some conflict with an update

View 4 Replies View Related

Android :: How To Run Local Web App In Phone Webview?

Aug 5, 2010

Can anybody tell how to run the local webapplication using android webview. I want to run my own webpages in android using web view.

View 2 Replies View Related

Android :: How To Mix External / Local Content In WebView?

Oct 12, 2009

I am trying to create a hybrid Android app which pulls HTML content from a web server and renders it in a WebView. However, I also want the external HTML to be able to reference images that are packaged within the android app. I realize that currently it is not possible to do something like <img src="file:///my_image.jpg" /> in the HTML. I have seen discussions of using the ContentProvider to create name spaces in the html, however all of these examples seem to assume that the actual html page is also on the device and tend to use WebView.loadData(). So, is there someway that it is possible to do this? The main goal is to package all the application images/css in the android app, but put the bulk of the application on an external server that returns the actual markup.

View 2 Replies View Related

Android :: Way To Display A Pic To Local Html In Webview?

Apr 15, 2010

I am developing a small application in Android. I come across a problem, and not sure whether it is possible in Android platform. I have some local html files. There is an Activity contains a webview, which is used to display these local html files. In some cases, I want to display a picture selected from phone into one of these local html files. Is it possible? Has anyone resolved such problem? I appreciate any of your replies.

View 2 Replies View Related

Android :: WebView Unable To Open Some Local Urls?

Nov 10, 2009

I have a WebView that I'm using to open some files stored in the assets/ directory of my project. It works fine for most of the files, but there's one in particular (and I'm sure others I haven't found) that it just will not open.Code...

View 4 Replies View Related

General :: Open Local KML File In Google Maps In Offline Mode

Sep 7, 2013

i just registered here to find out if opening a KML file on my SD card with Google maps in offline mode can work. I am looking for an solution quite a time, but only found this thread on stackover.

Quote:

To load kml into Google Maps on Android without writing an app, you can create a little html file somewhere with a geo-uri link to the kml file and then click on that link in any Android web browser.

For example: suppose your kml file is located in /sdcard/overlay.kml then you write a geo-uri link like this:

Quote:

<html>
<head><title>Example KML link page using a geo-uri</title></head>
<body>
<a href="geo:0,0?q=file:///sdcard/overlay.kml">overlay.kml</a>
</body>
</html>

Clicking on the link will launch Maps and then Maps will attempt to load and your kml.

Be warned however that the Android version of Maps does not appear to handle the same version/range of kml elements as the desktop version (or desktop Google Earth).

a other thread is about editing the manifest file to get maps to open local KML files

Quote:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="h**p://schemas.android.com/apk/res/android"
package="com.example.lyold"

[Code]....

Any way to open local KML files with google maps in offline mode ? I want to open kml ONLY in google maps, i know there are several apps out there that support kml files....

View 2 Replies View Related

Android :: Playng Video File Present In Local File Syste

Sep 6, 2010

How to play video present in local file system (ex:in res/a.3gp) using VideoView .I am getting error as Video cant be played.Can any one help me in sorting out this issue?

View 2 Replies View Related

Android :: WebView For Form Based Local AJAX Application

Feb 18, 2009

I'm thinking of using WebView as a container for "Form" based JavaScript+DHTML applications. This is simple fill-out-forms like you have on the web, but now on mobile like for note taking, order taking, and the like.This is to allow web developers to build the bulk of the application - Javascript will perform validation, computations, etc.On the Java side, I only need to implement database CRUD operations, and a ListView to scroll over the forms.To minimize the learning curve on the JavaScript side, I've been thinking on how to emulate AJAX calls so that the web developers don't need to learn new methods to call on the JavaScript-Java bridge. Of course this isn't possible using XMLHttpRequest, so I'm thinking of adapting JQuery or other Javascript libraries for this purpose.

View 3 Replies View Related

Android :: Analog To IOS Core Audio / Audio File Stream Services?

Sep 22, 2010

Is there an Android equivalent to the iOS Core Audio / Audio File Stream Services? I need to be able to read audio bytes from a network and feed them to the audio system under my control, so I can do my own timeouts / reconnects / range requests / etc. without interrupting the audio playback (since the system audio thread would be playing audio already enqueued). It seems that MediaPlayer doesn't give me this level of control. Is there a lower-level framework that does, either in the SDK or NDK?

View 2 Replies View Related

Android :: Playing YouTube Content In WebView

Oct 7, 2010

I have Java and plugins enabled. Why I can play many online flash videos in my webview, but nothing on m.youtube.com works? I would be more than satisfied with a workaround that passes the video to the YouTube application.

View 2 Replies View Related

Android :: Combine Only One Audio File From Two Audio Files

Oct 2, 2010

I want combine two audio files. (A audio file + B audio file = AB audio file)So, my search result is:

1. useing an AudioTrack.

2. decode PCM from audio file.

3. combine PCM.

This is currect? It there another way?

View 1 Replies View Related

General :: Play WhatsApp Audio AAC File?

Apr 6, 2014

i save whatsapp audio files ( .aac ) , but i cant' play them on pc or phone ...

View 2 Replies View Related

Android :: Any Audio Is Currently Playing

May 22, 2009

I am using a MediaPlayer instance in order to stream audio files from an Internet location. The audio player is in a separate activity. The user can select from a list of audio files and come to this activity which plays the audio.Now the user might go back to the previous activity (with the list)and select another audio file. In this case, I want to stop any other audio that is playing and start playing the new audio which was selected.Is there any way I can know whether an audio file is playing without having to hold on to the MediaPlayer object?

View 8 Replies View Related

Android :: Playing Of Wma Audio

Apr 9, 2009

the opencore can not play the audio of wma. is it right? and the total time of the wma file can not be find in the trackbrowseractivity. who know why?

View 2 Replies View Related

General :: Play Audio File On Voice Call

Dec 17, 2011

I want to play an audio file on a voice call as following the application initiates a call from device X to device Y. When Y replies application on device X should inject an audio file in the stream of the call so device Y hears this audio file

Is possible to inject an audio file in the stream of the call/the output of microphone?

View 2 Replies View Related

General :: Can't Play Any Audio File And See Photos In Gallery

Aug 16, 2012

All apps that play audio files from my device can not find and play any of my songs and audio files that are in my device internal SDcard and I can not see my photos in the gallery.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved