Live ISS video in Android WebView, one of the latest missions from the ISS is kind of amazing. The High Definition Earth Viewing (HDEV) experiment consists of four cameras that have been attached outside of the ISS. Temperature is controlled, the cameras are exposed to the radiation from the sun. This will allow astronauts to understand how radiation affects the instruments.
Follow me on Instagram
Live ISS video in Android WebView
The cameras point down at Earth at all times, which makes for some breathtaking images. The feed will sometimes go down as the signal switches between the cameras. If the cameras are down, the screen will be grey.
Taking into account , the HDEV we can embed it inside an Android web view.
Step 1, create a new android project api support 8-19.
Step 2, create a view inside res/layouts/activity_main.xml as below:
MainActivity.java add the following:
public class MainActivity extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.google.com");
}
Calling the url directly you can create a custom html which includes an iframe to the live streaming website of the ISS.
Replace
webView.loadUrl("http://www.google.com");
With
webView.loadData(customHtml, "text/html", "UTF-8");
In the AndroidManifest.xml don’t forget to add the internet permission