Author Archives: erioncuni85

About erioncuni85

info

Tutoriale Android 05


Share on Facebook & E-Mail an Image from drawable folder :

First Create a Main Class called whatever you want.
I named it just Share.class

package www.wildalbsoft.com;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Share extends Activity {

Button Share;
EditText text;

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

		Share = (Button) findViewById(R.id.share_facebook);
		

		Share.setOnClickListener(new View.OnClickListener() {

		
			
				// TODO Auto-generated method stub
				public void onClick(View v) {
					
					final CharSequence[] items = { "facebook", "email" };

					AlertDialog.Builder builder = new AlertDialog.Builder(
							Share.this);

					builder.setTitle("Share");

					builder.setItems(items, new DialogInterface.OnClickListener() {

						public void onClick(DialogInterface dialog, int item) {
							// sharePos=mPager.getCurrentItem();
							if (item == 0) {

								Intent share = new Intent(Share.this,
										ShareFacebook_Image.class);
								share.putExtra("image", R.drawable.bleach);
								startActivity(share);

							}

							if (item == 1) {

								Intent shareIntent = new Intent(
								android.content.Intent.ACTION_SEND);
								shareIntent.setType("image/jpeg");
								shareIntent.putExtra(
										android.content.Intent.EXTRA_SUBJECT,
										"WildAlbSoft Tutorial Share!");
								shareIntent
										.putExtra(
												android.content.Intent.EXTRA_TEXT,
												"This is a test image! ");

									shareIntent.putExtra(
											Intent.EXTRA_STREAM,
											Uri.parse("android.resource://www.wildalbsoft.com/"
													+ R.drawable.bleach));
							
								startActivity(Intent.createChooser(shareIntent,
										"Share:"));

							}

						}

					});
					AlertDialog alert = builder.create();

					alert.show();

				}

		});
		
		

	}
}

after that another class called ShareFacebook_Image.class

package www.wildalbsoft.com;

import java.io.ByteArrayOutputStream;

import com.facebook.android.DialogError;
import com.facebook.android.Facebook;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.widget.Toast;

public class ShareFacebook_Image extends Activity {

	private static final String APP_ID = "YOUR APP ID CREATED FROM ANDROID DEVELOPER PANEL";

	private static final String[] PERMISSIONS = new String[] { "publish_stream" };

	private static final String TOKEN = "access_token";
	private static final String EXPIRES = "expires_in";
	private static final String KEY = "facebook-credentials";

	private Facebook facebook;
	private String messageToPost;

	Bundle extras;
	int image;

	public boolean saveCredentials(Facebook facebook) {
		// Editor editor = getApplicationContext().getSharedPreferences(KEY,
		// Context.MODE_PRIVATE).edit();
		// editor.putString(TOKEN, facebook.getAccessToken());
		// editor.putLong(EXPIRES, facebook.getAccessExpires());
		// return editor.commit();

		SharedPreferences settings = getSharedPreferences(KEY,
				Context.MODE_PRIVATE);
		SharedPreferences.Editor editor = settings.edit();
		editor.putBoolean("silentMode", true);

		// Don't forget to commit your edits!!!
		return editor.commit();

	}

	public boolean restoreCredentials(Facebook facebook) {
		SharedPreferences sharedPreferences = getApplicationContext()
				.getSharedPreferences(KEY, Context.MODE_PRIVATE);
		facebook.setAccessToken(sharedPreferences.getString(TOKEN, null));
		facebook.setAccessExpires(sharedPreferences.getLong(EXPIRES, 0));
		return facebook.isSessionValid();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		facebook = new Facebook(APP_ID);
		restoreCredentials(facebook);

		requestWindowFeature(Window.FEATURE_NO_TITLE);

		// setContentView(R.layout.facebook_dialog);

		String facebookMessage = getIntent().getStringExtra("facebookMessage");
		if (facebookMessage == null) {
			facebookMessage = "Test wall post";
		}
		messageToPost = facebookMessage;

		extras = getIntent().getExtras();
		// String text = extras.getString("text");
		image = extras.getInt("image");
		messageToPost = "";
		System.out.println("message to post:" + messageToPost);

		if (!facebook.isSessionValid()) {
			loginAndPostToWall();
		} else {
			postToWall(messageToPost);
		}

	}

	/*
	 * public void doNotShare(View button){ finish(); } public void share(View
	 * button){ if (! facebook.isSessionValid()) { loginAndPostToWall(); } else
	 * { postToWall(messageToPost); } }
	 */

	public void loginAndPostToWall() {
		
		//to force share on facebook from your app and not from facebook app you must set permissions to -1  🙂
		facebook.authorize(this, PERMISSIONS, -1, new LoginDialogListener());
	}

	public void postToWall(String message) {

		byte[] data = null;

		Bitmap bi = BitmapFactory.decodeResource(getResources(), image);
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		bi.compress(Bitmap.CompressFormat.JPEG, 100, baos);
		data = baos.toByteArray();

		Bundle parameters = new Bundle();

		parameters
				.putString(
						"name",
						"Image uploaded from android WildAlbSoft Tutorial!");
		// parameters.putString("href", url);
		// parameters.putString("title", "Tramite iCalciatori Panini");
		// parameters.putString("description","Scarica anche tu da Google Play l'applicazione gratuita Pulcino Pio \n per il tuo smartphone Android!");
		// parameters.putString("caption", "TRAMITEiCalciatori Panini");
		// parameters.putString("link", "http://www.google.com");
		// parameters.putString("type", "jpeg");
		// parameters.putByteArray("source", data);
		// parameters.putString("method", "photos.upload");

		parameters.putByteArray("picture", data);

		try {
			facebook.request("me");
			String response = facebook.request("me/photos", parameters, "POST");
			Log.d("Tests", "got response: " + response);
			if (response == null || response.equals("")
					|| response.equals("false")) {
				showToast("Blank response.");
				finish();
			} else {
				showToast("Messaggio inviato al tuo facebook!");

			}
			finish();
		} catch (Exception e) {
			showToast("Impossibile inviare!");
			e.printStackTrace();
			finish();
		}
	}

	class LoginDialogListener implements DialogListener {
		public void onComplete(Bundle values) {
			saveCredentials(facebook);
			if (messageToPost != null) {
				postToWall(messageToPost);
			}
		}

		public void onFacebookError(FacebookError error) {
			showToast("Autenticazione con Facebook fallito!");
			finish();
		}

		public void onError(DialogError error) {
			showToast("Autenticazione con Facebook fallito!");
			finish();
		}

		public void onCancel() {
			showToast("Autenticazione con Facebook annullato!");
			finish();
		}
	}

	private void showToast(String message) {
		Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT)
				.show();
	}
}

and the xml facebook_share.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
    
    <RelativeLayout android:id="@+id/layout_siper"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_alignParentTop="true"
        android:background="@color/DarkCyan">
        
        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/teks_qender"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:gravity="center"
            android:textColor="@color/White"
            android:textStyle="bold"
            android:typeface="serif"
            android:textSize="15sp"
            android:text="@string/text_facebook"/>
    </RelativeLayout>
    <RelativeLayout 
        android:id="@+id/layout_qender"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@+id/layout_siper"
        android:layout_above="@+id/layout_poshte"
        android:background="@color/DimGray">

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="46dp"
            android:src="@drawable/facebook" />

        <EditText
            android:id="@+id/editText1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/imageView1"
            android:inputType="text"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="34dp"
            android:ems="10" >

            <requestFocus />
        </EditText>

        <Button
            android:id="@+id/share_facebook"
            android:layout_width="150dp"
            android:layout_height="wrap_content"
            android:layout_below="@+id/editText1"
            android:layout_centerHorizontal="true"
            android:text="@string/share" />

        </RelativeLayout>
<RelativeLayout 
    	android:id="@+id/layout_poshte"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:background="@color/DarkCyan">
        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/teks_poshte"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:gravity="center"
            android:textColor="@color/White"
            android:textStyle="bold"
            android:typeface="serif"
            android:textSize="15sp"
            android:text="@string/teks"/>
	</RelativeLayout>
</RelativeLayout>

Also you must download facebook sdk and import to your project as library.
Last thing,do not forget to declare your classes to the Manifest file and to add the permission needet like internet..


Tutoriale Android 04


Optimized layout for “2-5.4 ” android screen sizes.


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
    
    <RelativeLayout 
        android:id="@+id/layout_siper"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_alignParentTop="true"
        android:background="@color/DarkCyan">

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:text="Qender" />

    </RelativeLayout>
    <RelativeLayout 
        android:id="@+id/layout_qender"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_below="@+id/layout_siper"
        android:background="@color/DimGray">

        <Button
            android:id="@+id/button2"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_alignParentLeft="true"
            android:text="Majtas" />

     </RelativeLayout>
        <RelativeLayout 
        android:id="@+id/layout_qender2"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_below="@+id/layout_qender"
        android:background="@color/Beige">

            <Button
                android:id="@+id/button3"
                android:layout_width="100dp"
                android:layout_height="wrap_content"
               android:layout_centerVertical="true"
            android:layout_alignParentRight="true"
                android:text="Djathtas" />

        </RelativeLayout>
        <RelativeLayout 
        android:id="@+id/layout_qender3"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_below="@+id/layout_qender2"
        android:background="@color/PaleGreen">

            <Button
                android:id="@+id/button4"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button4_1"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toRightOf="@+id/button4"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button4_2"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toRightOf="@+id/button4_1"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button4_3"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toRightOf="@+id/button4_2"
                android:layout_centerVertical="true"
                android:text="Button" />

        </RelativeLayout>
        <RelativeLayout 
        android:id="@+id/layout_qender4"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_below="@+id/layout_qender3"
        android:background="@color/PaleTurquoise">

             <Button
                android:id="@+id/button5"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button5_1"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toLeftOf="@+id/button5"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button5_2"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toLeftOf="@+id/button5_1"
                android:layout_centerVertical="true"
                android:text="Button" />
            <Button
                android:id="@+id/button5_3"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="80dp"
                android:layout_height="wrap_content"
               android:layout_toLeftOf="@+id/button5_2"
                android:layout_centerVertical="true"
                android:text="Button" />

        </RelativeLayout>
        <RelativeLayout 
    	android:id="@+id/layout_qender5"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@+id/layout_poshte"
        android:layout_below="@+id/layout_qender4"
        android:layout_alignParentBottom="true"
        android:background="@color/GoldenRod">

            <Spinner
                android:id="@+id/spinner1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:entries="@array/emrat"
                android:layout_alignParentTop="true" />
            
            </RelativeLayout>
<RelativeLayout 
    	android:id="@+id/layout_poshte"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:background="@color/DarkCyan">

    <Button
        android:id="@+id/button6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:layout_marginLeft="16dp"
        android:textSize="10sp"
        android:text="Qendruar_Majtas" />

    <Button
        android:id="@+id/button7"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:textSize="10sp"
        android:text="Qender" />

    <Button
        android:id="@+id/button8"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:layout_marginRight="14dp"
        android:textSize="10sp"
        android:text="Qendruar_Djathtas" />

</RelativeLayout>


Tutoriale Android 03


Ngjyrat te deklaruara ne folderin Values i cili ben pjese ne res:

Shpresoj qe tju hyj ne pune 🙂

Mjafton te kopjohet,ne nje file xml dhe quheni me emrin “color” dhe ruheni sic tregohet ne shembullin e figures.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="yellow">#FFFF00</color>
<color name="AliceBlue">#F0F8FF</color>
<color name="AntiqueWhite">#FAEBD7</color>
<color name="Aqua">#00FFFF</color>
<color name="Aquamarine">#7FFFD4</color>
<color name="Azure">#F0FFFF</color>
<color name="Beige">#F5F5DC</color>
<color name="Bisque">#FFE4C4</color>
<color name="Black">#000000</color>
<color name="BlanchedAlmond">#FFEBCD</color>
<color name="Blue">#0000FF</color>
<color name="BlueViolet">#8A2BE2</color>
<color name="Brown">#A52A2A</color>
<color name="BurlyWood">#DEB887</color>
<color name="CadetBlue">#5F9EA0</color>
<color name="Chartreuse">#7FFF00</color>
<color name="Coral">#FF7F50</color>
<color name="CornflowerBlue">#6495ED</color>
<color name="Cornsilk">#FFF8DC</color>
<color name="Crimson">#DC143C</color>
<color name="Cyan">#00FFFF</color>
<color name="DarkBlue">#00008B</color>
<color name="DarkCyan">#008B8B</color>
<color name="DarkGoldenRod">#B8860B</color>
<color name="DarkGray">#A9A9A9</color>
<color name="DarkGrey">#A9A9A9</color>
<color name="DarkGreen">#006400</color>
<color name="DarkKhaki">#BDB76B</color>
<color name="DarkMagenta">#8B008B</color>
<color name="DarkOliveGreen">#556B2F</color>
<color name="Darkorange">#FF8C00</color>
<color name="DarkOrchid">#9932CC</color>
<color name="DarkSalmon">#E9967A</color>
<color name="DarkSeaGreen">#8FBC8F</color>
<color name="DarkSlateBlue">#483D8B</color>
<color name="DarkSlateGray">#2F4F4F</color>
<color name="DarkSlateGrey">#2F4F4F</color>
<color name="DarkTurquoise">#00CED1</color>
<color name="DarkViolet">#9400D3</color>
<color name="DeepPink">#FF1493</color>
<color name="DeepSkyBlue">#00BFFF</color>
<color name="DimGray">#696969</color>
<color name="DodgerBlue">#1E90FF</color>
<color name="FireBrick">#B22222</color>
<color name="FloralWhite">#FFFAF0</color>
<color name="ForestGreen">#228B22</color>
<color name="Fuchsia">#FF00FF</color>
<color name="Gainsboro">#DCDCDC</color>
<color name="GhostWhite">#F8F8FF</color>
<color name="Gold">#FFD700</color>
<color name="GoldenRod">#DAA520</color>
<color name="Gray">#808080</color>
<color name="Grey">#808080</color>
<color name="Green">#008000</color>
<color name="GreenYellow">#ADFF2F</color>
<color name="HoneyDew">#F0FFF0</color>
<color name="HotPink">#FF69B4</color>
<color name="IndianRed">#CD5C5C</color>
<color name="Indigo">#4B0082</color>
<color name="Ivory">#FFFFF0</color>
<color name="Khaki">#F0E68C</color>
<color name="Lavender">#E6E6FA</color>
<color name="LavenderBlush">#FFF0F5</color>
<color name="LawnGreen">#7CFC00</color>
<color name="LemonChiffon">#FFFACD</color>
<color name="LightBlue">#ADD8E6</color>
<color name="LightCoral">#F08080</color>
<color name="LightCyan">#E0FFFF</color>
<color name="LightGoldenRodYellow">#FAFAD2</color>
<color name="LightGray">#D3D3D3</color>
<color name="LightGrey">#D3D3D3</color>
<color name="LightGreen">#90EE90</color>
<color name="LightPink">#FFB6C1</color>
<color name="LightSalmon">#FFA07A</color>
<color name="LightSeaGreen">#20B2AA</color>
<color name="LightSkyBlue">#87CEFA</color>
<color name="LightSlateGray">#778899</color>
<color name="LightSlateGrey">#778899</color>
<color name="LightSteelBlue">#B0C4DE</color>
<color name="LightYellow">#FFFFE0</color>
<color name="Lime">#00FF00</color>
<color name="LimeGreen">#32CD32</color>
<color name="Linen">#FAF0E6</color>
<color name="Magenta">#FF00FF</color>
<color name="Maroon">#800000</color>
<color name="MediumAquaMarine">#66CDAA</color>
<color name="MediumBlue">#0000CD</color>
<color name="MediumOrchid">#BA55D3</color>
<color name="MediumPurple">#9370D8</color>
<color name="MediumSeaGreen">#3CB371</color>
<color name="MediumSlateBlue">#7B68EE</color>
<color name="MediumSpringGreen">#00FA9A</color>
<color name="MediumTurquoise">#48D1CC</color>
<color name="MediumVioletRed">#C71585</color>
<color name="MidnightBlue">#191970</color>
<color name="MintCream">#F5FFFA</color>
<color name="MistyRose">#FFE4E1</color>
<color name="Moccasin">#FFE4B5</color>
<color name="NavajoWhite">#FFDEAD</color>
<color name="Navy">#000080</color>
<color name="OldLace">#FDF5E6</color>
<color name="Olive">#808000</color>
<color name="OliveDrab">#6B8E23</color>
<color name="Orange">#FFA500</color>
<color name="OrangeRed">#FF4500</color>
<color name="Orchid">#DA70D6</color>
<color name="PaleGoldenRod">#EEE8AA</color>
<color name="PaleGreen">#98FB98</color>
<color name="PaleTurquoise">#AFEEEE</color>
<color name="PaleVioletRed">#D87093</color>
<color name="PapayaWhip">#FFEFD5</color>
<color name="PeachPuff">#FFDAB9</color>
<color name="Peru">#CD853F</color>
<color name="Pink">#FFC0CB</color>
<color name="Plum">#DDA0DD</color>
<color name="PowderBlue">#B0E0E6</color>
<color name="Purple">#800080</color>
<color name="Red">#FF0000</color>
<color name="RosyBrown">#BC8F8F</color>
<color name="RoyalBlue">#4169E1</color>
<color name="SaddleBrown">#8B4513</color>
<color name="Salmon">#FA8072</color>
<color name="SandyBrown">#F4A460</color>
<color name="SeaGreen">#2E8B57</color>
<color name="SeaShell">#FFF5EE</color>
<color name="Sienna">#A0522D</color>
<color name="Silver">#C0C0C0</color>
<color name="SkyBlue">#87CEEB</color>
<color name="SlateBlue">#6A5ACD</color>
<color name="SlateGray">#708090</color>
<color name="SlateGrey">#708090</color>
<color name="Snow">#FFFAFA</color>
<color name="SpringGreen">#00FF7F</color>
<color name="SteelBlue">#4682B4</color>
<color name="Tan">#D2B48C</color>
<color name="Teal">#008080</color>
<color name="Thistle">#D8BFD8</color>
<color name="Tomato">#FF6347</color>
<color name="Turquoise">#40E0D0</color>
<color name="Violet">#EE82EE</color>
<color name="Wheat">#F5DEB3</color>
<color name="White">#FFFFFF</color>
<color name="WhiteSmoke">#F5F5F5</color>
<color name="Yellow">#FFFF00</color>
<color name="YellowGreen">#9ACD32</color>
</resources>

Tutoriale Android 02


SI TE GJENEROSH MD5
Per te gjeneruar MD5 e cila do perdoret me vone ne android maps.

 

Si fillim shkohet te folderi ku eshte ruajtur debug.keystore me ane te comandpromt.
Zakonisht ndodhet ne C/Users/Username/.android/debug.keystore
Per te vajture ne kete folder me ane te command promt navigohet kshu:
Nese ne CMD jemi ne pathin C:\ ateher per te naviguar ne pathin e duhur shkruajme
Username zakonisht eshte Emri i kompjuterit tuaj pershembull imi Erion “C/Users/Erion/.android/debug.keystore”
C:\cd users

->C:\Users\cd Username 

->C:\Users\Username\cd .android 

->C:\Users\Username\ .android 

Ne momentin qe kemi arritur ne kete path hapi I dyte eshte :

Shkojme te

C:\Program Files\Java\jre6\bin

dhe marim me mouse keytool.exe dhe e bejme drop direct ne pathin qe kemi shkruar ne cmd dhe duhet te dali nje gje e tille
C:\Users\Username\ .android >”C:\Program Files\Java\jre6\bin\keytool.exe”

Me pas shkruajme comanden e fundit direkt te pathi qe kemi hapur :
-list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass
android -keypass android

Me pas per te mare api key i cili do perdoret ne googlemap ne android e gjenerojme te ky link :

https://developers.google.com/android/maps-api-signup?hl=it-IT

Link :

https://developers.google.com/maps/documentation/android/mapkey?hl=it-IT

 

 

KUJDES : gjenerimi i MD5 dhe i celsit qe me vone perdoret ne goolge map eshte default i sistemit qe perdoret per debug ne android.

Me pak fjale me kete celes nuk mund te publikoni nje aplikacion ne market pasi nuk punon.Ky celes perdoret vetem ne raste kur jeni duke punuar ne “Debug Mode” 😀

Gjithsesi per te gjeneruar celsin e duhur,duhet thjesht qe te gjeneroni nje Certifikate nga Eclipse dhe me pas : ose ta aksesoni sic aksesuat debug.keystore ose ta hidhni ne te njejtin folder ku ndodhesh debug.keystore dhe te kryeni te njejten procedure por duke perdorur keystorin tuaj ne vend te atij debug.

prsh : C/Users/Username/.android/android_aplikacion (ne kete rast android_aplikacion eshte certifikata e krijuar nga ju dhe e hedhur ne pathin e mesiperm)

 


Tutoriale Android 01


Tutoriale Android 01.

Hyrje ne Android.

1.Hapi i pare.

Shkarkoni Eclipse Classic 3.7.2 nese nuk e keni te instaluar ne kompjuterin tuaj pasi eshte softweri i cili nevojitet per te programuar.

2.Hapi i dyte.

Pasi te keni shkarkuar Eclipse shkoni ne faqen kryesore te Androi developer.Normalisht aty udhezimet jan te shpjeguara shume mire,por duke mare parasysh faktin qe nje person mund te humb ne ate faqe ateher po ju jap nje ndihme 🙂 .

Shkarkoni versionin e keshilluar nga google

“installer_r18-windows.exe (Recommended)”

Pasi ta keni instaluar normalisht e Android SDK e gjeni ne pathin standart  :

C:Program Files (x86)Androidandroid-sdk

Pasi te keni hapur pathin ku eshte i instaluar Android SDK ,klikoni mbi ikonen “SDK Manager” e cila te shfaq nderfaqen ku te jepet mundesia per te shkaruar te gjitha paketat API e duhura te Android te cilat do perdoren me vone per ndertiminin e nje aplikacioni Android.

Keshillohet qe te shkarkoni ato paketa me API level qe perdoren me shume ne treg.

Keshilloj :

Android 2.2 API 8  (Nje pjse e madhe e smartphoneve ne treg vin me kete version)

Android 2.3.x API 9-10 (Kohet e fundit ka filluar te ritet perqindja dhe e ketij versioni,pasi dhe disa smartphone lowcost po dalin me firmware  2.3)

Android 3.0.x API 11  Zakonisht perdoret per tablet HoneyComb (Opsional nese te duhet te ndertosh applikacione dhe per tablet)

Android 4.0.x API 12 (ende per tu eskploruar 😀 )

E detyrueshme eshte qe te shkarkohet e gjithe paketa Extras 

3.Hapi i trete.

Pasi te keni instaluar Eclipse Classic dhe te keni instaluar dhe bere te gjitha updatet e duhura te Android SDK, ju nevojitet qe te kryeni veprimet e fundit per konfigurimin e plote te Eclipse.

Nevojitet qe te shkarkoni pluginet e duhura Android ne eclipse.

  • Pasi ta keni istaluar pluginet,hapi i fundit eshte konfigurimi i pathit Android(pathi ku eshte instaluar Android SDK ne hapin e dyte) ne eclipse.
  • Windows – > Preferences – > Android

PS : Nese keni ndjekur ne menyre te sakte hapin e dyte,duhet te dalin te gjitha versionet e shkarkuara te lista SDK.

Dhe me kete hap te fundit mbyllim kete tutorial hyres.

Per cdo problem dhe paqartesi ,mund te shkruani 🙂


Tutorial Android Hyrje


Pershendetje te gjitheve.

Ne radhe te pare dua te falenderoj te gjith ata persona qe jan duke ndjekur blogun WildAlbSot Android Tutorial.

Ideja e krijimit te ketyre tutorialeve erdhi per shkakun e vetem sepse ne fillimet e mija kur hyra ne boten e programimit te aplikacioneve android,jo vetem qe nuk kishte asnje manual ndihme ne shqip,por edhe ne gjuhe te huaja.

Pas gjithe blogeve ,siteve dhe vete sitin zyrtar Android Developer kam vene re se jo te gjitha menyrat apo metodat e perdorura jan te shpjeguara.

Me kete rast mora iniciativen per te kontribuar sadopak me njohurit e mia ne kete fushe duke krijuar nje seri tutorialesh.

Ju falenderoj per vemendjen.

🙂 Android Rock


Android Work 03


This slideshow requires JavaScript.