Posts

Showing posts from October, 2016

Android Virtual Device

Image
Run your apps in AVD and get full run time details in android studio.

File handling

Image
Learn file handling in android apps. MainActivity.java package com.example.ashish.filehandleing; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.OutputStreamWriter; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main

Break and Continue in C++

Image
Learn the use of break and continue statement using this c++ program. #include<iostream> #include<conio.h> using namespace std; int main() { int i; for(i=1;i<=10;i++) { if(i==4) {              // 4 number is skipped. continue; } if(i==9) { // loop breaks and control goes out of for loop break; } cout<<i<<"\n"; } return 0; } Output 1 2 3 5 6 7 8

Create hello world app

Image
Start your android app development by learning first basic hello world app.

WebView in android apps

Image
Create browser in android app using WebView. Insert this code in Mybrowser.java file and my_browser.xml file. Mybrowser.java package com.example.ashish.internet; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.webkit.WebView; public class abc extends AppCompatActivity { private WebView web; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_abc); web=(WebView)findViewById(R.id.webView); web.getSettings().setLoadsImagesAutomatically(true); web.loadUrl("https://www.google.co.in"); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_abc, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { int i

Android Quiz

Image
Which is not the life cycle of android app ? A. onCreate() B.onStart() C.onPause() D.onTerminate() View Answer

Media Player in android apps

Image
Learn to insert songs and media in android apps.

Android Toasts

Image
How to create android toast in apps

Google Pixel

Image
Google released their new smartphone called 'Google Pixel' in October, 2016.It comes with Android    OS, v7.1 (Nougat). It has  AMOLED touchscreen with  1080 x 1920 pixels resolution. It has 4GB RAM and 2770 mAh  Li-Ion battery. It has 12 MP camera.

Code challenge

Image
Q.1 What is the output of following program code (Assume header files already declared) ?       for(i=0;i<=10;i++);       {          printf("%d",i);       } Options A.0,1,2,3,......10 B.10 C.11 D.Compile time error View Answer