‏إظهار الرسائل ذات التسميات how to. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات how to. إظهار كافة الرسائل

الجمعة، 16 سبتمبر 2016

Audio in background su Youtube con Chrome 54 Beta


In un articolo precedente, vi abbiamo spiegato come attivare l'audio con Firefox, attraverso l'utilizzo di un utile trucchetto. Oggi invece, vi introduciamo l'ultima beta del famoso browser di Google, il quale permetterà di riprodurre streaming audio sul vostro dispositivo ... uscendo dall'applicazione.


Chrome 53 ha rilasciato numerosi cambiamenti a partire dall'aspetto, introducendo il material design ovunque (in Chrome OS). Ma Chrome 54 per mobile, disponibile oggi sul canale beta in download, promulga diversi cambiamenti tra cui lo streaming audio sulla propria piattaforma. Un esempio di questo si può vedere nel video di seguito:

 

Il video si mette in pausa una volta uscito da Chrome, ma dalla tendina delle notifiche può essere comodamente riavviato grazie al pulsante play. Inoltre vi sarà l'addio definito del plugin Flash per Youtube, grazie all'arrivo di HTML 5. I programmatori hanno riscritto il codice del famoso sito di streaming video, introducendo molti cambiamenti sul lato della sicurezza e delle performance. A breve il rilascio ufficiale, ma quando questa miglioria verrà ampliata sull'applicazione di YouTube?

 

الجمعة، 13 يونيو 2014

الثلاثاء، 20 مايو 2014

How to Create a Basic Integrated Gear Application

The tutorial, by Samsung Developers, teaches developers how to build a basic sample application for SAP. This is a three-part series. It also teaches how to test the applications using the Emulator.
  • Part 1 is all about the development on the Android side.
  • Part 2 deals with the development on the Tizen side.
  • Part 3 is about the complete application for SAP, which is basically packaging of the Android part and the Tizen part.
    It also teaches how to test the applications using the Emulator.

الأحد، 11 مايو 2014

"the import android.support.v7.app cannot be resolved" after updated

If you have the error of "the import android.support.v7.app cannot be resolved" after Android SDK and ADT updated in Eclipse. Try to Clean all projects, include appcompat_... libs.

Project (on Eclipse menu) -> Clean... -> select Clean all projects... then OK.


الخميس، 8 مايو 2014

ic_launcher cannot be resolved or is not a field

Sometimes you will face with error of "ic_launcher cannot be resolved or is not a field", one of the possible reason is import android.R incorrectly.

Note: Eclipse sometimes likes to add an import android.R statement at the top of your files that use resources, especially when you ask eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.
~ http://source.android.com/source/using-eclipse.html

How to generate APK in Eclipse of Android-adt

To generate APK using Eclipse of Android-adt:

Right click your project -> Android Tools -> Export Signed Application Package...

follow the video:


Please keep (strongly recommand to make a copy) the keystore file. If you publish your apps in Google Play, and you have to update it, you need to update APK using original keystore.

الثلاثاء، 1 أبريل 2014

Step-by-step to create a simple Android App

The video show the steps to build a simple Android App using Android-ADT (Eclipse), in 7 minutes. In the app, clicking on the button to show a photo, and clicking on the photo to remove itself. In the end of the video show how it in working.

  • The app generated using the Project Wizard of Android SDK Tools 22.6.2, ActionBarActivity created with Fragment. So we have to modify fragment_main.xml for layout, and handle our ui elements in onCreateView() of PlaceholderFragment class.
  • The photo is stored inside the app /res/drawable/spiderman.jpg, its name must be in lowercase letter.

/res/layout/fragment_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.showmyphoto.MainActivity$PlaceholderFragment" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

<Button
android:id="@+id/mybutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show my photo" />

<ImageView
android:id="@+id/myimageview"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</LinearLayout>

/src/com/example/showmyphoto/MainActivity.java
package com.example.showmyphoto;

import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.os.Build;

public class MainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {

// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {

Button myButton;
ImageView myImageView;

public PlaceholderFragment() {
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);

myButton = (Button)rootView.findViewById(R.id.mybutton);
myImageView = (ImageView)rootView.findViewById(R.id.myimageview);

myButton.setOnClickListener(new OnClickListener(){

@Override
public void onClick(View v) {
myImageView.setImageResource(R.drawable.spiderman);
}});

myImageView.setOnClickListener(new OnClickListener(){

@Override
public void onClick(View v) {
myImageView.setImageBitmap(null);
}});

return rootView;
}
}

}


الخميس، 6 مارس 2014

Nexus 7 recognized as unknown Serial Number (Solved)

If your device cannot be recognized by ADT (or adb), ???????????? shown on Serial number.



In my case, solve it by setting USB computer connection to either Media device (MTP) or Camera (PTP). Don't disable both.
  • Setting
  • select Storage
  • click on the menu icon on upper right corner, and click the USB computer connection
  • Enable either Media device (MTP) or Camera (PTP)





Related: To enable developer options on KitKat (Android 4.4), refer to the post.