Sunday, January 25, 2015

Android From Fitst Screen To Second Screen Activity

အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။

<Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Click me to another screen" />

main2.xml ဆိုၿပီး ဖိုင္အသစ္​ ဖြင္​့​ေပးရမယ္​။
​ေအာက္​တြင္​ ၾကည္​့ရန္


TextView
android:layout_height="wrap_content"
android:text="AIDE"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"/>

Add new xml file here ကိုႏိွပ္​ပါ။


src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။
import(အပိုင္​း)

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;

Button button;

Source(အပုိင္​း)

addListenerOnButton();
}

public void addListenerOnButton() {

final Context context = this;

button = (Button) findViewById(R.id.button1);

button.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {

Intent intent = new Intent(context, MainActivity2.class);
                startActivity(intent);   }});

MainActivity2.java ဖိုင္​အသစ္​ဖြင္​့မည္​။
​ေအာက္​တြင္ ၾကည္​့ရန္​

Add new Class here ကိုႏိွပ္​ပါ။


MainActivity2.java တြင္​ ​ေအာက္​က Code ထည္​့ရန္​

import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.os.Bundle;
import android.widget.Button;

public class MainActivity2 extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
}

}

AndroidManifest.xml(အပိုင္​း)

  <activity
            android:label="@string/app_name"
            android:name=".App2Activity" >
        </activity>


အဆင္​​ေျပပါ​ေစ။

​ေရးသားသူ =​ေဇယ်ာလင္​း


​ေရးသားသူ =​ေဇယ်ာလင္​း

Wednesday, January 21, 2015

Web Search Apk


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။

<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</EditText>

<Button
android:layout_height="wrap_content"
android:text="search"
android:layout_width="wrap_content"
android:id="@+id/button"/>




src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)

import android.app.SearchManager;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;


Source (အပိုင္​း)

findViewById(R.id.button).setOnClickListener(new HandleClick());
    }
    private class HandleClick implements OnClickListener{
public void onClick(View arg0) {
String searchFor=((EditText) findViewById(R.id.editText1)).getText().toString();
Intent viewSearch = new Intent(Intent.ACTION_WEB_SEARCH);
viewSearch.putExtra(SearchManager.QUERY, searchFor);
startActivity(viewSearch);
}




အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Monday, January 19, 2015

Toast Apk


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)

import android.widget.Toast;


Source(အပိုင္​း)

Toast.makeText(getApplicationContext(), "Dev;Zay Yar Lin", Toast.LENGTH_SHORT).show();

မွတ္​ခ်က္​=Dev;Zay Yar Lin ​ေနရာမွာ သင္​ႀကိဳက္​ႏွစ္​သက္​ရာ ထည္​့လို႔ရပါတယ္​။





အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Friday, January 16, 2015

Balance Check Apk(Button Click)


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။

<Button
android:id="@+id/buttonCall"
android:layout_height="wrap_content"
style="?android:attr/buttonBarButtonStyle"
android:text="ေဘစစ္ရန္"
android:layout_width="wrap_content"/>



src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)
import android.content.Context;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

final Context context = this;
private Button button;

Source(အပိုင္​း)

button = (Button) findViewById(R.id.buttonCall);
// add button listener
button.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
startActivity(new Intent("android.intent.action.CALL",Uri.parse("tel:*124" + Uri.encode("#"))));}});

AndroidManifest.xml(အပိုင္​း)

<uses-permission android:name="android.permission.CALL_PHONE" />
   <uses-permission android:name="android.perပmission.READ_PHONE_STATE" />
 




မွတ္​ခ်က္​=(124 ​ေနရာမွာ သင္​ဖုန္​းလိုင္​းကဒ္​ အ​ေပၚမူတည္​ၿပီး ​ေျပာင္​းလဲႏိုင္​ပါသည္​။)


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Wednesday, January 14, 2015

Balance Check Apk


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။


    <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Development By Zay Yar Lin" />



src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)

import android.content.Intent;
import android.net.Uri;

Source(အပိုင္​း)

startActivity(new Intent("android.intent.action.CALL",Uri.parse("tel:*124" + Uri.encode("#"))));

AndroidManifest.xml(အပိုင္​း)

   <uses-permission android:name="android.permission.CALL_PHONE"/>
 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />


မွတ္​ခ်က္​=(124 ​ေနရာမွာ သင္​ဖုန္​းလိုင္​းကဒ္​ အ​ေပၚမူတည္​ၿပီး ​ေျပာင္​းလဲႏိုင္​ပါသည္​။)


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Tuesday, January 13, 2015

Flashlight Apk (ဓာတ္​မီး)


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။

<Button
      android:id="@+id/button"
      android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_centerVertical="true"
   android:layout_centerHorizontal="true"
        android:text="Torch" />





src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)

import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.Camera;
import android.hardware.Camera.Parameters;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;



//flag to detect flash is on or off
private boolean isLighOn = false;
private Camera camera;
   private Button button;
@Override
protected void onStop() {
super.onStop();
if (camera != null) {
camera.release();
}
}


Source(အပိုင္​း)


button = (Button) findViewById(R.id.button);
Context context = this;
PackageManager pm = context.getPackageManager();
// if device support camera?
if (!pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
Log.e("err", "Device has no camera!");
return;
}
camera = Camera.open();
final Parameters p = camera.getParameters();
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (isLighOn) {
Log.i("info", "torch is turn off!");
p.setFlashMode(Parameters.FLASH_MODE_OFF);
camera.setParameters(p);
camera.stopPreview();
isLighOn = false;
} else {
Log.i("info", "torch is turn on!");
p.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(p);
camera.startPreview();
isLighOn = true;}}});




AndroidManifest.xml(အပိုင္​း)


<uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
  


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ=​ေဇယ်ာလင္​း

Sunday, January 11, 2015

Dial Call Apk


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။

<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="47dp"
android:ems="10"
android:inputType="phone">
</EditText>

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+ideditText1"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:text="Dial Call"/>


src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import(အပိုင္​း)

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

private Button button;
private EditText etPhoneno;

Source(အပိုင္​း)
button = (Button) findViewById(R.id.button);
etPhoneno = (EditText) findViewById(R.id.editText);
// add button listener
button.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
String phnum = etPhoneno.getText().toString();
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phnum));
startActivity(callIntent);
}
});

AndroidManifest.xml(အပိုင္​း)

  <uses-permission android:name="android.permission.CALL_PHONE" />


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Saturday, January 10, 2015

Calling Apk


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ျပီးရင္ ​src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။

import (အပိုင္​း)

import android.content.Intent;
import android.net.Uri;

Source (အပိုင္​း)

startActivity(new Intent(Intent.ACTION_CALL,Uri.parse("tel:012-234-5678")));

ဖုန္​းနံပါတ္​​ ​ေနရာမွာ​ ​ေျပာင္​းလဲ အသုံးျပဳႏိုင္​သည္​။


AndroidManifest.xml(အပိုင္​း)


<uses-permission android:name="android.permission.CALL_PHONE"/>


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Friday, January 9, 2015

Website View Apk


Website View Apk

အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။


<WebView
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>


src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။
import(အပိုင္​း)

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

private WebView webView;

Source (အပိုင္​း)

webView = (WebView) findViewById(R.id.webView1);
webView.setWebViewClient(new Callback());
WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);
webView.loadUrl("http://myanmarandroiddev.blogspot.com");
}private class Callback extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view,
String url) {
return (false);
}


AndroidManifest.xml (အပိုင္​း)

<uses-permission android:name="android.permission.INTERNET" />
   


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း

Thursday, January 8, 2015

Website/Blog Url Apk(Button Click)


အ​ေပၚမွာ ​ေျပာထားတဲ့အတိုင္​း AIDE Apk စတင္​ဖြင္​့ပါ။ၿပီးရင္​ res>>>>layout>>>>main.xmlကိုဖြင္​့ပါ။
​ေအာက္​က code ကို ထည္​့ပါ။
<Button
android:layout_height="wrap_content"
android:text="Button"
android:layout_width="wrap_content"
android:id="@+id/button"/>


src >>> MainActivity.java ကိုဖြင္​့ပါ။ ​ေအာက္​က code ကို ထည္​့ပါ။
(import)အပိုင္း

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;

Button button;

Source(အပိုင္​း)
addListenerOnButton(); }
public void addListenerOnButton() {
button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://myanmarandroiddev.blogspot.com/?m=1"));startActivity(browserIntent);}});


အဆင္​​ေျပပါ​ေစ။


​ေရးသားသူ =​ေဇယ်ာလင္​း