Patrick | 22 Aug 14:43 2014
Picon

Play a Youtube video

Hello,
I'm trying to play a Youtube video embedded in my app layout.
I thought it would be easy, but apparently it's not (for me).
I tried with VideoView and a RTSP link but the quality is too bad.
I also tried with a WebView but it doesn't work on some Android versions.
I'd like to support Android 2.x if possible.
On Android 2.3, I have player buttons but the video does not start.
On Android 2.1, when I tap the play button, I have a message "An error occurred, please try again later."
I also want to support platforms without the Youtube app (like Amazon, Blackberry...) so the Youtube Android Player API is not an option for me.
Please help... Thanks in advance!

Here is my code:

public class YoutubeActivity extends Activity {
  private WebView webView;
  public void onCreate (Bundle savedInstanceState) {
    super.onCreate (savedInstanceState);
    webView = new WebView (this);
    setContentView (webView);
    webView.getSettings ().setJavaScriptEnabled (true);
    webView.setWebChromeClient (new WebChromeClient ());
    webView.setWebViewClient (new WebViewClient () {
      public boolean shouldOverrideUrlLoading (WebView view, String url) {
        view.loadUrl (url);
        return true;
      }
    });
    if (Build.VERSION.SDK_INT < 8) {
      webView.getSettings ().setPluginsEnabled (true);
    }
    else {
      webView.getSettings ().setPluginState (PluginState.ON);
    }
    webView.loadUrl ("http://youtube.com/embed/sNUNB6CMnE8?rel=0");
  }
  protected void onPause () {
    super.onPause ();
    webView.loadUrl ("about:blank");
  }
}

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
luca | 22 Aug 11:26 2014
Picon

Offline "advertising"

Hi,

offline advertising is worthless from the viewpoint of earning something for obvious reasons, but one could always show
a banner or something similar to an interstitial of some other app he/she owns, even if they become non-clickable.
The reason to do that is that, even if there is no internet connection, the user experience will continue to be the same
as when there is an internet connection. If the model of business of an app is free+ad and paid-ad (that is, there is the
free version which shows ads and there is a paid version free of ads and possibly with some other features), the free
version should always presents some type of "ad interruption". Otherwise the user could always go offline to use
the app without the annoying ads (*annoying for the user but vital for the developer*).

Could this practice be a problem for google?
What do you think?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Steve Gabrilowitz | 21 Aug 19:58 2014
Picon

Library projects with Android Studio

I have a couple of projects that use the same library project all set up nicely in Eclipse.  Now I import the library project into Android Studio and then import the projects that use it, but each time the import process created a COPY of the library which is not what I want.  What file(s) do I have to edit in order to get the application projects to use the original library project instead of a copy?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rahul Raja | 21 Aug 19:14 2014
Picon

Screencast in Android

Hey 
Is there a good app or method by which i can make a screencast for one of my
Android application?
I googled but only found some paid apps which also requires the phone to be
rooted. I dont know whether they will work even after purchasing their pro version.

https://play.google.com/store/apps/details?id=com.iwobanas.screenrecorder.pro&hl=en

This crashes on starting.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
vegetable | 18 Aug 15:08 2014
Picon

Implementing Google map in application

Hello, i have tried few days to implement maps with API v2 in my application.
I have added every permission enabled every API, but don't have any success.

I'm stuck on this "Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).", is there any way to find out what exactly went wrong, some logs on API side in my account or anything that could help?
I have regenerated my (debug) API key 4 times, does my API account has to mach Google account that is registered with application?
Another strange thing in logcat is this : "Google Maps Android API(23503): Google Play services client version: 4452000" and few lines later "Google Maps Android API(23503): Google Play services package version: 5089038"
Why two versions ?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Schollmeyer | 18 Aug 09:59 2014

ART Performance Issue

Hi,

My app has an export feature that usually takes 1 minute to complete. When I switch to ART it takes 5 minutes. The export heavily uses Method.invoke and reflection in general.

Any ideas how to track down the issue?

Cheers, Michael
mictale.com/ms
--

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Save My Life! | 15 Aug 14:35 2014
Picon

inflating custom view (with canvas) over main.xml

Dear sir,

I am having 2 things:

1. Main.xml with background image

2. Customview with canvas.
In side canvas i am drawing shape : circle

In activity1(where setcontentview(r.layout.main)) 
i need following:

On output it should display shape(from custom view) with background(from main.xml)

Help me to achieve this.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ragnarok | 15 Aug 13:43 2014
Picon

Backport color emoji font support to the system previous KitKat

As I know, In KitKat, google add color emoji font for typeface, so we can create a ttf file like 'Apple Color Emoji.ttf' in OSX to render Japanese emoji in android, all we do is just need servals lines code to specific the Typeface of TextView or EditText, I had already achieve this, but I want to know how to backport this feature to the system previous KitKat, I pull the libskia.so from KitKat, and use this so to create a Typeface, but it seem not work, it always return null, is any one has a good idea?

And here is the emoji font I create, you can use directly in your project, but it only work under KitKat

https://drive.google.com/file/d/0B1l-mveZqbbOTUtHVmNIZm51NW8/edit?usp=sharing

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dean Schulze | 15 Aug 04:31 2014
Picon

How can I use Android Javadoc offline

I found how to download the Android Javadoc (SDK Manager, latest sdk version has a check box for the documentation).  Now that I have a local copy of the Javadoc I can't find an index into the Javadoc for the Android SDK APIs.  The top level index.html brings up an advertisement for Android-L.  I've opened a few more index.html files but none of them have the javadocs.  When I do a search for a class the search results take me to the online docs instead of within the downloaded docs.

Where did they hide the index to the Android SDK Javadocs in the version that the SDK Manager downloads?

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mihai Badea | 15 Aug 02:47 2014
Picon

can I get DhcpInfo - for Ethernet? instead of WiFi?

I have the following code to determine all info about my local network on Wifi:

WifiManager wifiMan = (WifiManager)context.getSystemService(Context.WIFI_SERVICE); dhcpInfo = wifiMan.getDhcpInfo(); networkAddress = ntoh(dhcpInfo.netmask & dhcpInfo.ipAddress); broadcastAddress = ntoh((dhcpInfo.netmask & dhcpInfo.ipAddress) | (~dhcpInfo.netmask)); netMask = ntoh(dhcpInfo.netmask); ipAddress = ntoh(dhcpInfo.ipAddress);

However I could not find a way to get this DhcpInfo object for Ethernet. There is no such thing as EthernetManager....

How to get the above info - while Android connected via Ethernet (USB OTG + Ethernet adapter)?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alex Fu | 14 Aug 20:10 2014
Picon

Native code linking error

I'm currently attempting to build ffmpeg to work on the Android platform. I was able to successfully build and run ndk-build without errors, however when I go to actually run the application, I get hit with the following linking error:

cannot locate symbol "atof" referenced by "libavformat-55.so"

As far as I can tell, atof is in stdlib, however it doesn't seem to be picking it up for some reason.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers <at> googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe <at> googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane