<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4682479197700935041</id><updated>2024-09-06T00:57:31.737-03:00</updated><category term="android"/><category term="java"/><category term="poli-android"/><category term="windows phone"/><category term="videopost"/><title type='text'>Debug de Códigos</title><subtitle type='html'>Guia do desenvolvedor</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-4975787117185837710</id><published>2013-12-05T00:31:00.001-03:00</published><updated>2013-12-05T00:31:18.656-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Services vs IntentServices - Android</title><content type='html'>&lt;article&gt;
 &lt;section id=&quot;introducao&quot;&gt;
  &lt;p&gt;A arquitetura Android possui várias &lt;i&gt;&quot;maravilhas&quot;&lt;/i&gt; e facilidades que auxiliam os desenvolvedores na hora de criar aplicativos robustos e versáteis. Duas dessas &lt;i&gt;&quot;maravilhas&quot;&lt;/i&gt; são as classes Service e IntentService, onde cada uma possui sua particulariedade, vantagens e metodologias de implementação.&lt;/p&gt;
  &lt;p&gt;Para tanto, é necessário saber quando devemos utilizar uma classe ou outra a fim de não fazer uma escolha errônea, afinal, quanto menos manutenção em nosso código fizermos, MENOS DOR DE CABEÇA! :-)&lt;/p&gt;
 &lt;/section&gt;

 &lt;section id=&quot;corpo&quot;&gt;
  &lt;p&gt;Para exemplificarmos melhor, trago abaixo uma pequena tabela compartiva para que vocês analisem e escolham qual classe implementar em seu projeto.&lt;/p&gt;

  &lt;table border=&quot;1&quot;&gt;
   &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;th&gt;Service.class&lt;/th&gt;
    &lt;th&gt;IntentService.class&lt;/th&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;Quando usar?&lt;/td&gt;
    &lt;td&gt;Tarefas sem conteúdos visuais (UI), mas sem excesso de tempo de execução. Caso for utilizar em longos processos, utilize em conjunto com Threads.&lt;/td&gt;
    &lt;td&gt;Geralmente, efetua longos processos sem comunicação com a UIThread. Caso seja necessário, recomendo utilizar Handlers ou Broadcast Intents.&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;Como usar?&lt;/td&gt;
    &lt;td&gt;Utilizando a chamada para startService(...), bindService(...) através do método onStartCommand(...).&lt;/td&gt;
    &lt;td&gt;Utilizando Intent apenas.&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;Executada a partir de qual Thread?&lt;/td&gt;
    &lt;td&gt;Qualquer Thread - com Context.&lt;/td&gt;
    &lt;td&gt;Apenas na UIThread uma vez que Intent&#39;s são utilizadas na UIThread, mas geram outras WorkerThreads.&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;Funciona em qual Thread?&lt;/td&gt;
    &lt;td&gt;UIThread ou Remote (Implementando o AIDL).&lt;/td&gt;
    &lt;td&gt;Em uma WorkerThread separada.&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;Desvantagens&lt;/td&gt;
    &lt;td&gt;Pode travar a UIThread, se mal implementada.&lt;/td&gt;
    &lt;td&gt;Não executa tarefas paralelas e caso seja necessário rodar múltiplas instâncias do IntentService, será gerado uma Fila - Queue - na mesma WorkerThread.&lt;/td&gt;
   &lt;/tr&gt;
  &lt;/table&gt;
 &lt;/section&gt;

 &lt;section id=&quot;demo&quot;&gt;
  &lt;header&gt;
   &lt;p&gt;&lt;strong&gt;Service.class&lt;/strong&gt;&lt;/p&gt;
  &lt;/header&gt;
  &lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
   public class MyService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
     return new MyServiceBinder();
    }

    ...

    public int onStartCommand(Intent intent, int flags, int startId) {
     Log.d(&quot;Tag&quot;, &quot;Service executado com sucesso!&quot;);
     return super.onStartCommand(intent, flags, startId);
    }

    private class MyServiceBinder extends Binder {

     public MyService getService() {
      return MyService.this;
     }

    }

   }
  &lt;/textarea&gt;

  &lt;header&gt;
   &lt;p&gt;&lt;strong&gt;IntentService.class&lt;/strong&gt;&lt;/p&gt;
  &lt;/header&gt;
  &lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
   public class MyIntentService extends IntentService {

    private static final String TAG = &quot;myIntentServiceTag&quot;;

    public MyIntentService() {
     super(TAG);
    }

    ...

    public void onHandleIntent(Intent intent) {
     Bundle extras = intent.getExtras();
     if (extras.containsKey(&quot;pergunta&quot;)) {
      String pergunta = extras.getString(&quot;pergunta&quot;);
      Log.d(&quot;Tag-IntentService&quot;, &quot;A pergunta foi: &quot; + pergunta);
     }
    }

   }
  &lt;/textarea&gt;

  &lt;p&gt;&lt;strong&gt;Activity&lt;/strong&gt;&lt;/p&gt;
  &lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
   public class MainActivity extends Activity {

    ...

    private ConnectionService mConn;

    ...

    public void startService() {
      // Executando um Service...
      Intent intent = new Intent(this, MyService.class);
      startService(intent);
    }

    public void bindService() {
     if (mConn == null) {
      mConn = new ServiceConnection() {

       @Override
       public void onServiceConnected(ComponentName name, IBinder service) {
        MyService myService = ((MyService) service).getService();
        // Você pode chamar o método manualmente!
        myService.onStartCommand(...);
       }

       @Override
       public void onServiceDisconnected (ComponentName name) {
        // unbind(...) foi chamado! :-)
       }

      };
     }

     Intent intent = new Intent(this, MyService.class);
     bindService(intent, mConn, Context.BIND_AUTO_CREATE);
    }

    public void startIntentService() {
     Intent intent = new Intent(this, MyIntentService.class);
     intent.putExtra(&quot;pergunta&quot;, &quot;IntentService foi executado?&quot;);
     startService(intent);
    }

    @Override
    public void onDestroy() {
     super.onDestroy();

     // Não esqueça!
     if (mConn != null) {
      unbindService(mConn);
     }
    }

   }
  &lt;/textarea&gt;
 &lt;/section&gt;

 &lt;section id=&quot;conclusão&quot;&gt;
  &lt;p&gt;Pense direito antes de implementar o tipo de Service que você deseja, ambos possuem suas vantagens e desvantagens!&lt;/p&gt;
  &lt;p&gt;Espero que ajude, abraço.&lt;/p&gt;
 &lt;/section&gt;
&lt;/article&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/4975787117185837710/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/12/services-vs-intentservices-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4975787117185837710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4975787117185837710'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/12/services-vs-intentservices-android.html' title='Services vs IntentServices - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Recife - Pernambuco, Brazil</georss:featurename><georss:point>-8.0542775 -34.881256099999973</georss:point><georss:box>-8.305836 -35.203979599999975 -7.802719 -34.558532599999971</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-7885157389795751409</id><published>2013-11-29T01:36:00.000-03:00</published><updated>2013-11-29T01:36:01.024-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Desenhando na Tela através do Touch (DrawingBoard) - Android</title><content type='html'>&lt;article&gt;
 &lt;section id=&quot;introducao&quot;&gt;
  &lt;p&gt;Ao desenvolver uma aplicativo na empresa em que trabalho, uma de minhas necessidades foi a criação de um componente visual (i.e. View) responsável por tratar eventos de touch screen e que o mesmo desenha-se o pontos em que o dedo passava.&lt;/p&gt;
  &lt;p&gt;Para isso, criei uma classe chamada DrawingBoard que possui algumas peculiaridades como limpeza do que foi desenhado e pré-desenho de um texto para que o usuário saiba que ele pode desenhar na respectiva área.&lt;/p&gt;
 &lt;/section&gt;

 &lt;section id=&quot;corpo&quot;&gt;
  &lt;p&gt;Antes de mais nada, vou falar uma pouco sobre a classe View. Ela é responsável por todos os componentes visuais do Android, afinal, como o Java utiliza os conceitos de henrança dizemos que a classe View é &lt;italic&gt;pai&lt;/italic&gt; (i.e. Super Class) de todos os componentes visuais no Android.&lt;/p&gt;
  &lt;p&gt;Com isso, nossa DrawingBoard também herdará de View para que a mesma possua suas propriedades. Em especial, utilizaremos os métodos &lt;strong&gt;onDraw()&lt;/strong&gt; - responsável por renderizar na tela os traços baseado em coordenadas passadas pelo touch do usuário - e &lt;strong&gt;onTouchEvent&lt;/strong&gt; - responsável por analisar as ações de movimentos do dedo do usuário.&lt;/p&gt;
 &lt;/section&gt;

 &lt;section id=&quot;demo&quot;&gt;
  &lt;header&gt;
   &lt;p&gt;&lt;strong&gt;DrawingBoard:&lt;/strong&gt;&lt;/p&gt;
  &lt;/header&gt;

  &lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
package br.com.infocusweb.flexpag.models.views;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.EmbossMaskFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.os.Environment;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import br.com.infocusweb.flexpag.R;

/**
 * View responsável por desenhar na tela atravás do touch.
 * 
 * @author Felipe Bonezi -&gt; felipebonezi@gmail.com
 * @version 1.0.0
 * @category View
 * 
 */
public class DrawingBoard extends View {

 private static final float  TOUCH_TOLERANCE = 4;
 private static final String DIR_ROOT_NAME = &quot;FlexPag&quot;;
 private static final String DIR_SIGNATURE_NAME = &quot;Signatures&quot;;
 public static final String EXTRA_SIGNATURE = &quot;SIGNATURE_EXTRA&quot;;
 
 private int   mWidth;
 private int   mHeight;
 private int   mPaintColor;
 private int   mBoardColor;
 private float mStrokeSize;
 private float mX, mY;
 private boolean mIsEnable = true;
 private boolean mIsSigned = false;
 
 private Bitmap mBitmap;
 private Canvas mCanvas;
 private Path   mPath;
 private Paint  mPaint;
 private final Paint  mBitmapPaint;
 private final EmbossMaskFilter mEmboss;
 private String mFullName = null;
 private Paint mPaint2;
 private Rect mBoundsName;
 private Paint mTextPaint;

 public DrawingBoard(final Context context) {
  super(context);
  mPath = new Path();
  mBitmapPaint = new Paint(Paint.DITHER_FLAG);
  mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
  mPaintColor = Color.BLACK;
  mBoardColor = Color.TRANSPARENT;
 }

 public DrawingBoard(final Context context, final AttributeSet attrs, final int defStyle) {
  super(context, attrs, defStyle);
  mPath = new Path();
  mBitmapPaint = new Paint(Paint.DITHER_FLAG);
  mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
  mPaintColor = Color.BLACK;
  mBoardColor = Color.TRANSPARENT;
 }

 public DrawingBoard(final Context context, final AttributeSet attrs) {
  super(context, attrs);
  mPath = new Path();
  mBitmapPaint = new Paint(Paint.DITHER_FLAG);
  mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
  mPaintColor = Color.BLACK;
  mBoardColor = Color.TRANSPARENT;
 }
 
 @Override
 protected void onSizeChanged(final int width, final int height, final int oldWidth, final int oldHeight) {
  super.onSizeChanged(width, height, oldWidth, oldHeight);
  mWidth = width;
  mHeight = height;
  mBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888);
  mCanvas = new Canvas(mBitmap);
 }

 @Override
 protected void onDraw(final Canvas canvas) {
  canvas.drawColor(mBoardColor);
  canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
  if (mPaint == null) {
   final float dimen = Float.parseFloat(getContext().getString(R.dimen.text_stroke_signature).substring(0, 1));
   mStrokeSize = dimen;
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  canvas.drawPath(mPath, mPaint);
  
  if(!mIsSigned &amp;&amp; mIsEnable) {
   mPaint2 = new Paint();
            mPaint2.setColor(Color.BLACK);
            mPaint2.setTextSize(30f);
            final Rect bounds = new Rect();
   mPaint2.getTextBounds(&quot;Assine aqui...&quot;, 0, &quot;Assine aqui...&quot;.length(), bounds);
   canvas.drawText(&quot;Assine aqui...&quot;, (mWidth / 2) - bounds.centerX(), (mHeight - 100), mPaint2);
  }
  
  canvas.drawLine(25, (mHeight - 50), (mWidth - 25), (mHeight - 50), mPaint2);
  if (mBoundsName == null) {
   mBoundsName = new Rect();
   mTextPaint = new Paint();
   final float dimen = Float.parseFloat(getContext().getString(R.dimen.text_signature).substring(0, 2));
   if (isInEditMode()) {
    mTextPaint.setTextSize(18);
   } else {
    mTextPaint.setTextSize(dimen);
   }
  }
  if(mFullName != null) {
   mTextPaint.getTextBounds(mFullName, 0, mFullName.length(), mBoundsName);
   canvas.drawText(mFullName, (mWidth/2 - mBoundsName.centerX()), (mHeight - 25), mTextPaint);
  }
 }

 @Override
 public boolean onTouchEvent(final MotionEvent event) {
  if (mIsEnable) {
   draw(new Canvas());
   
   final float x = event.getX();
   final float y = event.getY();
 
   switch (event.getAction()) {
   case MotionEvent.ACTION_DOWN:
    touchStart(x, y);
    invalidate();
    break;
   case MotionEvent.ACTION_MOVE:
    touchMove(x, y);
    invalidate();
    break;
   case MotionEvent.ACTION_UP:
    touchUp();
    invalidate();
    mIsSigned = true;
    break;
   default:
    break;
   }
   return true;
  } else {
   return false;
  }
 }

 private Paint createNewPaint(final int color, final float strokeSize) {
  final Paint paint = new Paint();
  paint.setAntiAlias(true);
  paint.setDither(true);
  paint.setColor(color);
  paint.setStyle(Paint.Style.STROKE);
  paint.setStrokeJoin(Paint.Join.ROUND);
  paint.setStrokeCap(Paint.Cap.ROUND);
  paint.setStrokeWidth(strokeSize);
  return paint;
 }

 private void touchStart(final float x, final float y) {
  mPath.reset();
  mPath.moveTo(x, y);
  mX = x;
  mY = y;
 }

 private void touchMove(final float x, final float y) {
  final float dx = Math.abs(x - mX);
  final float dy = Math.abs(y - mY);
  if (dx &gt;= TOUCH_TOLERANCE || dy &gt;= TOUCH_TOLERANCE) {
   mPath.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);
   mX = x;
   mY = y;
  }
 }

 private void touchUp() {
  mPath.lineTo(mX, mY);
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  mCanvas.drawPath(mPath, mPaint);
  mPath.reset();
 }

 public void setPaint(final Paint paint) {
  mPaint = paint;
 }

 public void clearBoard() {
  mPath = new Path();
  mBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888);
  mCanvas = new Canvas(mBitmap);
  mIsSigned = false;
  invalidate();
 }

 private void createDir() {
  final File file = new File(Environment.getExternalStorageDirectory()
    .getAbsolutePath().concat(File.separator).concat(DIR_ROOT_NAME)
    .concat(File.separator).concat(DIR_SIGNATURE_NAME));
  file.mkdirs();
 }

 public boolean persistsSignatureAtCache() {
  final boolean canWrite = getContext().getCacheDir().canWrite();
  if (canWrite) {
   ByteArrayOutputStream byteArrayOutputStream = null;
   FileOutputStream fileOutputStream = null;
   File file = null;
   String outputDir = null;
   try {
    byteArrayOutputStream = new ByteArrayOutputStream();
    mBitmap.compress(Bitmap.CompressFormat.PNG, 60, byteArrayOutputStream);

    outputDir = getContext().getCacheDir().getAbsolutePath();
    file = new File(outputDir
      .concat(File.separator)
      .concat(&quot;signature&quot;).concat(&quot;.png&quot;));
    file.createNewFile();

    fileOutputStream = new FileOutputStream(file);
    fileOutputStream.write(byteArrayOutputStream.toByteArray());
   } catch (IOException e) {
    e.printStackTrace();
   }
  }
  return canWrite;
 }
 
 public boolean deleteTemporarySignature() {
  return false;
 }
 
 @Deprecated
 public boolean persistSignatureAtSDCard() {
  final boolean canWrite = Environment.getExternalStorageDirectory().canWrite();
  if (canWrite) {
   createDir();

   Calendar date = null;
   ByteArrayOutputStream byteArrayOutputStream = null;
   FileOutputStream fileOutputStream = null;
   File file = null;
   try {
    byteArrayOutputStream = new ByteArrayOutputStream();
    mBitmap.compress(Bitmap.CompressFormat.PNG, 40, byteArrayOutputStream);

    date = Calendar.getInstance();
    file = new File(Environment
      .getExternalStorageDirectory()
      .getAbsolutePath()
      .concat(File.separator)
      .concat(DIR_ROOT_NAME)
      .concat(File.separator)
      .concat(DIR_SIGNATURE_NAME)
      .concat(File.separator)
      .concat(date.get(Calendar.DAY_OF_MONTH) + &quot;-&quot;
        + date.get(Calendar.MONTH) + &quot;-&quot;
        + date.get(Calendar.YEAR) + &quot;-&quot;
        + date.get(Calendar.HOUR_OF_DAY) + &quot;-&quot;
        + date.get(Calendar.MINUTE) + &quot;-&quot;
        + date.get(Calendar.MILLISECOND))
      .concat(&quot;.png&quot;));
    file.createNewFile();

    fileOutputStream = new FileOutputStream(file);
    fileOutputStream.write(byteArrayOutputStream.toByteArray());
   } catch (IOException e) {
    e.printStackTrace();
   }
  }
  return canWrite;
 }
 
 public boolean temporarySignature() {
  return Environment.getExternalStorageDirectory().canWrite();
 }
 
 public void setColor(final int mColor) {
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  
  this.mPaintColor = mColor;
  mPaint.setColor(mColor);
 }
 
 public void setBoardColor(final int mColor) {
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  
  this.mBoardColor = mColor;
  clearBoard();
 }
 
 public void setStrokeSize(final float strokeSize) {
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  
  this.mStrokeSize = strokeSize;
  mPaint.setStrokeWidth(strokeSize);
 }
 
 public void setEraseMode(boolean eraseMode) {
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  
  if(eraseMode) {
   mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
  } else {
   mPaint.setXfermode(null);
   mPaint.setColor(mPaintColor);
  }
 }
 
 public void setEmbossMode(final boolean embossMode) {
  if (mPaint == null) {
   mPaint = createNewPaint(mPaintColor, mStrokeSize);
  }
  
  if(embossMode) {
   if(mPaint.getMaskFilter() != mEmboss) {
    mPaint.setMaskFilter(mEmboss);
   }
  } else {
   mPaint.setMaskFilter(null);
  }
 }
 
 public Bitmap getSignature() {
  return mBitmap;
 }
 
 public void setFullName(final String name) {
  this.mFullName = name;
 }
 
 public boolean isSigned() {
  return mIsSigned;
 }
 
 public void disable() {
  mIsEnable = false;
  clearBoard();
 }
 
 public void enable() {
  mIsEnable = true;
  clearBoard();
 }
 
}
  &lt;/textarea&gt;
 &lt;/section&gt;

 &lt;section id=&quot;conclusão&quot;&gt;
  &lt;p&gt;Note que o nosso DrawingBoard também nos dá a possibilidade de persistir a imagem de &quot;assinatura&quot; do usuário em seu cartão de memória SD ou na pasta cache do aplicativo. Para tanto, é necessário utilizar os métodos &lt;strong&gt;persistSignatureAtCache()&lt;/strong&gt; ou &lt;strong&gt;persistSignatureAtSDCard()&lt;/strong&gt; - lembre de colocar a permissão no AndroidManifest.xml para que o aplicativo possa escrever no SDCard.&lt;/p&gt;

  &lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
   &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt; 
  &lt;/textarea&gt;

  &lt;p&gt;Espero que ajude, abraço.&lt;/p&gt;
 &lt;/section&gt;
&lt;/article&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/7885157389795751409/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/11/desenhando-na-tela-atraves-do-touch.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7885157389795751409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7885157389795751409'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/11/desenhando-na-tela-atraves-do-touch.html' title='Desenhando na Tela através do Touch (DrawingBoard) - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Recife - Pernambuco, Brazil</georss:featurename><georss:point>-8.0542775 -34.881256099999973</georss:point><georss:box>-8.305836 -35.203979599999975 -7.802719 -34.558532599999971</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-6742397737966259017</id><published>2013-04-10T16:21:00.002-03:00</published><updated>2013-04-10T16:22:25.338-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Para nunca mais esquecer [5] - Android</title><content type='html'>Mais uma leva de dicas legais para desenvolvedores Android. :)

&lt;b&gt;Modelo do aparelho:&lt;/b&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
String PhoneModel = android.os.Build.MODEL;
&lt;/textarea&gt;

&lt;b&gt;Versão do Android no aparelho:&lt;/b&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
String AndroidVersion = android.os.Build.VERSION.RELEASE;
&lt;/textarea&gt;

&lt;b&gt;Nome do produtor do aparelho:&lt;/b&gt;
&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
String manufacturer = android.os.Build.MANUFACTURER
&lt;/textarea&gt;

&lt;b&gt;Envio de SMS por Intent:&lt;/b&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
Uri smsNumber = Uri.parse(&quot;sms:8188888888&quot;);
Intent it = new Intent(Intent.ACTION_VIEW);
it.setData(smsNumber);
it.putExtra(Intent.EXTRA_TEXT, &quot;Texto aqui&quot;);
startActivity(it);
&lt;/textarea&gt;

&lt;b&gt;Qual o versionName/versionCode descrito no AndroidManifest.xml:&lt;/b&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
PackageInfo pInfo;
try {
 pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
 String versionName = pInfo.versionName;
 int versionCode = pInfo.versionCode;
} catch (NameNotFoundException e) {
 e.printStackTrace();
}
&lt;/textarea&gt;

Espero que ajude!
Att,</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/6742397737966259017/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/04/para-nunca-mais-esquecer-5-android.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6742397737966259017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6742397737966259017'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/04/para-nunca-mais-esquecer-5-android.html' title='Para nunca mais esquecer [5] - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-5007750460348155379</id><published>2013-03-20T23:44:00.002-03:00</published><updated>2013-03-20T23:45:39.292-03:00</updated><title type='text'>[Fuctura] I Minicurso de Android</title><content type='html'>Bem, na última segunda-feira tive o prazer de ministrar um mini-curso na Fuctura Escola de Software Livre onde &#39;tentamos&#39; desenvolver um simples app em 3 horas. &lt;br/&gt;
Claro que não conseguimos &#39;termina-lo&#39;, mas deu para todos verem como desenvolver para a plataforma Android é simples, basta você entender toda a complexidade da arquitetura.&lt;br/&gt;&lt;br/&gt;

Como muitos pediram, estou disponibilizando o projeto que fizemos na aula que está na url abaixo:
&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
// Nome do arquivo = FucturaApp.zip
Uri uri = Uri.parse(&quot;http://felipebonezi.com.br/downloads&quot;);

Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
&lt;/textarea&gt;

&lt;br/&gt;
Espero que tenham gostado e amanhã tem mais um mini-curso lá na Fuctura, espero todos lá!&lt;br/&gt;
Att,</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/5007750460348155379/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/fuctura-i-minicurso-de-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/5007750460348155379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/5007750460348155379'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/fuctura-i-minicurso-de-android.html' title='[Fuctura] I Minicurso de Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-3206934684386591955</id><published>2013-03-06T16:32:00.001-03:00</published><updated>2013-03-06T16:32:34.859-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Para nunca mais esquecer [4] - Android</title><content type='html'>&lt;strong&gt;1. Obter o atual código de área do aparelho:&lt;/strong&gt;
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
if (tel.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
    GsmCellLocation location = (GsmCellLocation) tel.getCellLocation();
    if (location != null) {
        msg.setText(&quot;Código de Área: &quot; + location.getLac());
    }
}
&lt;/textarea&gt;

OBS: Não esqueça da respectiva permissão em seu AndroidManifest.xml ou uma exceção SecurityException será lançada.
&lt;br /&gt;
&lt;textarea class=&quot;xml&quot; name=&quot;code&quot;&gt;&lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
&lt;/textarea&gt;
&lt;br /&gt;
&lt;strong&gt;2. Como obter o IMEI do aparelho:&lt;/strong&gt;
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String IMEI = tel.getDeviceId();
&lt;/textarea&gt;

OBS: Não esqueça da respectiva permissão em seu AndroidManifest.xml ou uma exceção SecurityException será lançada.
&lt;br /&gt;
&lt;textarea class=&quot;xml&quot; name=&quot;code&quot;&gt;&lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot; /&gt;
&lt;/textarea&gt;
&lt;br /&gt;

&lt;strong&gt;3. Efetuar uma requisição &lt;em&gt;HTTPS&lt;/em&gt; POST:&lt;/strong&gt;
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;String url = &quot;http://SUA_URL&quot;;

HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
try {
    List&lt;namepairvalue&gt; pairs = new ArrayList&lt;namepairvalue&gt;();
    pairs.add(new BasicNamePairValue(&quot;key&quot;, &quot;value&quot;));    
    post.setEntity(new UrlEncodedFormEntity(pairs));

    ResponseHandler&lt;string&gt; responseHandler = new BasicResponseHandler();
    String response = client.execute(post, responseHandler)

    Log.d(&quot;Debug&quot;, &quot;Resposta: &quot; + response);
} catch (Exception e) {
    e.printStackTrance();
}
&lt;/textarea&gt;

OBS: Não esqueça da respectiva permissão em seu AndroidManifest.xml ou uma exceção SecurityException será lançada. Perceba também que para que a UI do app não seja comprometida, você deve fazer essa requisição em uma AsyncTask ou Thread diferente da UI Thread.
&lt;br /&gt;
&lt;textarea class=&quot;xml&quot; name=&quot;code&quot;&gt;&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
&lt;/textarea&gt;

&lt;br /&gt;
&lt;strong&gt;4. Salvar conteúdo no SharedPreference:&lt;/strong&gt;
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;
final String PREF_NAME = &quot;MyPreferences&quot;;
SharedPreference preferences = getSharedPreference(PREF_NAME, MODE_PRIVATE);
Editor editor = preferences.edit();

editor.putString(&quot;key&quot;, &quot;value&quot;);
editor.putInt(&quot;keyInt&quot;, 99);
editor.commit();
&lt;/textarea&gt;

&lt;br /&gt;
&lt;strong&gt;5. Recuperar conteúdo no SharedPreference:&lt;/strong&gt;
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;
final String PREF_NAME = &quot;MyPreferences&quot;;
SharedPreference preferences = getSharedPreference(PREF_NAME, MODE_PRIVATE);

boolean contains = preferences.contains(&quot;key&quot;);
if (contains) {
    String value = preferences.getString(&quot;key&quot;);
    int valueInt = preferences.getInt(&quot;keyInt&quot;);
}
&lt;/textarea&gt;

&lt;br /&gt;
&lt;br /&gt;
Esses são alguns trechos que acho importante não esquecer! :)

Att,</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/3206934684386591955/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/para-nunca-mais-esquecer-4-android.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/3206934684386591955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/3206934684386591955'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/para-nunca-mais-esquecer-4-android.html' title='Para nunca mais esquecer [4] - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Recife - Pernambuco, Brazil</georss:featurename><georss:point>-8.0542775 -34.881256099999973</georss:point><georss:box>-8.305836 -35.203979599999975 -7.802719 -34.558532599999971</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-149436372715100951</id><published>2013-03-05T22:15:00.002-03:00</published><updated>2013-03-05T22:15:52.756-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Signin with Google+ API - Android</title><content type='html'>Uma das apostas do Google neste semestre será a utilização da API do Google+ disponibilizada na API do Google Services.
Antes de tudo, para utilizarmos a API do Google+, precisamos baixar em nosso SDK Manager o Google Play Services que nada mais é do que uma library contendo diversas API criadas pelo pessoal do Google. Depois de baixar, tudo que precisamos fazer é importa-lo para o nosso workspace do Eclipse (O projeto do Google Play Services estará na pasta do SDK do Android).
&lt;br /&gt;
&lt;br /&gt;
O que precisamos fazer agora? Cada usuário desenvolvedor Google possui um painel onde são listados os serviços disponíveis para aquela respectiva conta chamado de &lt;a href=&quot;https://code.google.com/apis/console/&quot;&gt;Google APIs Console&lt;/a&gt;. Ao entrar, tenha certeza de ativar a opção do &lt;em&gt;&lt;strong&gt;Google+ API&lt;/strong&gt;&lt;/em&gt;.
&lt;br /&gt;
Depois disso, precisamos criar a sua autenticação &lt;em&gt;OAuth 2.0 Client&lt;/em&gt; e selecionar que iremos utiliza-lo através da plataforma Android. Também necessitamos de um &lt;em&gt;SHA-1 Fingerprint&lt;/em&gt; que é gerado através do command line:
&lt;br /&gt;
&lt;textarea class=&quot;java&quot; name=&quot;code&quot;&gt;// O executável do &#39;keytool&#39; está na pasta do SDK do ANDROID.
keytool -exportcert -alias androiddebugkey -keystore &quot;dir_sdk_android/debug.keystore&quot; -list -v
&lt;/textarea&gt;

Pronto, agora podemos partir para a doideira, haha! :)
&lt;br /&gt;
Para o nosso layout, precisamos apenas de um botão que será o responsável por executar o signin no Google+. Não é segredo que através do nosso Button iremos captar o evento de click realizado pelo usuário.
&lt;br /&gt;
&lt;textarea class=&quot;xml&quot; name=&quot;code&quot;&gt;&lt;RelativeLayout
    xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot; &gt;

    &lt;Button
        android:id=&quot;@+id/sign_in_button&quot;
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;wrap_content&quot;
        android:layout_centerInParent=&quot;true&quot;
        android:text=&quot;Signin Google+&quot; /&gt;

&lt;/RelativeLayout&gt;
&lt;/textarea&gt;

Agora que temos nosso layout criado, precisamos inicializar em nossa Activity a classe PlusClient, disponibilizada na library do Google Play Services.
&lt;br /&gt;
Basicamente utilizaremos a classe PlusClient para efetuar a comunicação entre nosso app com o Google+ API através de uma conexão que será estabelecida de modo assíncrono.
&lt;br /&gt;
&lt;br /&gt;
Também podemos efetuar essa inicialização utilizando o conceito de &lt;strong&gt;&lt;em&gt;Ciclo de Vida&lt;/em&gt;&lt;/strong&gt; de uma Activity.
&lt;br /&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;onCreate&lt;/strong&gt;: Inicializamos o objeto PlusClient através do padrão &lt;em&gt;Builder&lt;/em&gt;;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;onResume&lt;/strong&gt;: Executamos a conexão através do método &lt;em&gt;connect()&lt;/em&gt; contido no PlusClient;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;onPause&lt;/strong&gt;: Desconectamos através do método &lt;em&gt;disconnect()&lt;/em&gt; contido no PlusClient.&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;
Mas como dito anteriormente, neste exemplo iremos utilizar o evento de click para efetuar a conexão!
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class MainActivity extends Activity implements ConnectionCallbacks, OnConnectionFailedListener, OnClickListener {

 // Intent Error Code
 private static final int INTENT_ERROR = 9000;

 private PlusClient mPlusClient;
 private ConnectionResult mConnectionResult;

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

  // Verificação de disponibilidade do Google+ no aparelho
  int errorCode = GooglePlusUtil.checkGooglePlusApp(this);
  if (errorCode != GooglePlusUtil.SUCCESS) {
   // O aparelho não possui o app do Google+
   GooglePlusUtil.getErrorDialog(errorCode, this, 0).show();
  }

  // Todos os observers estão implementados pela Activity
  PlusClient.Builder builder = new PlusClient.Builder(this, this, this);

  // O Scope LOGIN nos dá capacidade de obter informações da conta
  builder.setScopes(Scopes.PLUS_LOGIN);
  mPlusClient = builder.build();

  findViewById(R.id.sign_in_button).setOnClickListener(this);
 }

 @Override
 public void onClick(View view) {
  if (view.getId() == R.id.sign_in_button) {
   if (!mPlusClient.isConnected()) {
    if (mConnectionResult == null) {
     // Chamada para efetuar conexão
     mPlusClient.connect();
    } else {
     if (mConnectionResult.hasResolution()) {
      try {
       // Recupera as informações da conexão
       mConnectionResult.startResolutionForResult(this, INTENT_ERROR);
      } catch (SendIntentException e) {
       // Nova tentativa de conexão
       mConnectionResult = null;
       mPlusClient.connect();
      }
     }
    }
   } else {
    Toast.makeText(this, &quot;Você já está connectado!&quot;,
      Toast.LENGTH_SHORT).show();
   }
  }
 }

 @Override
 protected void onDestroy() {
  super.onDestroy();
  // Chamada para desconectar o PlusClient.
  mPlusClient.disconnect();
 }

 @Override
 public void onConnected() {
  final String accountName = mPlusClient.getAccountName();
  Person me = mPlusClient.getCurrentPerson();
  String aboutMe = me != null ? me.getAboutMe() : &quot;null&quot;;
  mPlusClient.loadMoments(new OnMomentsLoadedListener() {

   @Override
   public void onMomentsLoaded(ConnectionResult status,
     MomentBuffer momentBuffer, String nextPageToken,
     String updated) {
    if (status.isSuccess()) {
     for (int i = 0;i &lt; momentBuffer.getCount();i++) {
      Moment moment = momentBuffer.get(i);
      ItemScope item = moment.getResult();
      String description = item.getDescription();
      Log.d(&quot;Google+&quot;, &quot;Descrição: &quot; + description);
     }
    }
   }
  });
  Toast.makeText(this, accountName + &quot;, sobre você: &quot;
      + aboutMe, Toast.LENGTH_LONG).show();
 }

 @Override
 public void onDisconnected() {
  Toast.makeText(this, &quot;Desconectou do Google+!&quot;,
      Toast.LENGTH_LONG).show();
 }

 @Override
 public void onConnectionFailed(ConnectionResult result) {
  if (result.hasResolution()) {
   try {
    // Recupera as informações da falha na conexão
    result.startResolutionForResult(this, INTENT_ERROR);
   } catch (SendIntentException e) {
    // Nova tentativa de conexão
    mPlusClient.connect();
   }
  }
 }

 protected void onActivityResult(int requestCode, int responseCode,
   Intent intent) {
  if (requestCode == INTENT_ERROR
     &amp;&amp; responseCode == RESULT_OK) {
   // Nova tentativa de conexão
   mConnectionResult = null;
   mPlusClient.connect();
  }
 }
&lt;/textarea&gt;

Lembrando que devemos apenas utilizar o Google+ API a partir do Android 2.x, ou seja, precisamos verificar qual é a versão do S.O. em que o app está sendo rodado. Como podemos fazer isso? SIMPLES!
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.FROYO) {
    // Execute seu código neste trecho...
}
&lt;/textarea&gt;

Espero que ajudem todos!
Dúvidas é só entrar em contato,

Abraço.</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/149436372715100951/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/signin-with-google-api-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/149436372715100951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/149436372715100951'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/03/signin-with-google-api-android.html' title='Signin with Google+ API - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-5309781628219591919</id><published>2013-02-04T22:56:00.001-03:00</published><updated>2013-03-05T12:26:01.126-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Ferramentas ESSENCIAIS para desenvolvedores Android</title><content type='html'>Um dos maiores aprendizados que tive neste ano que passou foi conhecer algumas ferramentas úteis para desenvolvedores de aplicativos para a plataforma Google Android.&lt;br /&gt;
&lt;div&gt;
As vezes, a modelagem/teste de um aplicativo fica muito mais fácil depois de se utilizar essas ferramentas.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Abaixo irei falar sobre as seguintes ferramentas que venho utilizando em minha jornada como desenvolvedor Google Android e também recomendo para os designer&#39;s no qual trabalho em conjunto.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Ferramentas&lt;/b&gt;:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;ZipAlign (&lt;a href=&quot;http://developer.android.com/tools/help/zipalign.html&quot; target=&quot;_blank&quot;&gt;Android Developer&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Monkey (&lt;a href=&quot;http://developer.android.com/tools/help/monkey.html&quot; target=&quot;_blank&quot;&gt;Android Developer&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
Cada ferramenta tem sua respectiva funcionalidade e importancia no processo de desenvolvimento do conceito do app.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Para exemplificar melhor, irei falar um pouco sobre cada ferramenta e como utiliza-la.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;ZipAlign:&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Segundo o Android Developers, o Zip Align é uma poderosa ferramenta responsável por otimizar os resources do apk da sua aplicação. Ele tem o preceito que todos os arquivos não comprimidos começam com um certo valor para alinhamento. Utilizando esta ferramenta teremos o benefício de ter uma redução considerável do processamento do nosso aplicativo com a RAM durante sua execução.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Perceba que devemos apenas utilizar essa ferramenta depois que você exportar seu .apk assinado (i.e. pronto para ser publicado), caso contrário, não terá efeito algum pois todo o processo de alinhamento dos arquivos será desfeito.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Como utilizar&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Abra o seu prompt e navegue até a pasta do SDK do Android e dentro da pasta &lt;i&gt;&quot;tools&quot;&lt;/i&gt;&amp;nbsp;utilize o segundo comando:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
// Exemplo:
// zipalign -f -v 4 &quot;/Users/felipebonezi/myApp.apk&quot; &quot;myAppAlignment.apk&quot;
zipalign [FLAGS] &amp;lt;ALIGNMENT&amp;gt; &quot;dir_pasta_apk/myApp.apk&quot; &quot;novo_app.apk&quot;

// Se você utilizar UNIX, digite ./ junto com o comando.
&lt;/textarea&gt;

&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
Note que temos uma área para as FLAGS que são -f, -v e -c onde -f é reponsável por sobreescrever em um arquivo .zip do apk, -v é responsável por dar um verbose log do processo de alinhamento e o -c é para confirmar o alinhamento no respectivo arquivo (e.g. recomendo utilizar o [-f] [-v] liberando outro apk alinhado).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Monkey:&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Essa é uma ferramenta utilizada tanto nos dispositivos móveis quanto no emulador para simular uma lista de pseudo-eventos randômicos a procura de bug&#39;s em seu aplicativo. Ele é utilizado para ambiente de &lt;i&gt;&quot;stress-test&quot; &lt;/i&gt;com eventos randômicos, podendo configurar para que não sejam repetidos em testes distintos.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
O site do Android Developers diz que podemos classificar o monkey com as respectivas categorias primárias:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Manipulação de configuração para opcões básicas, como descricão de números e textos;&lt;/li&gt;
&lt;li&gt;Exceções de operações, como a restrição para pacotes únicos de aplicações;&lt;/li&gt;
&lt;li&gt;Frequencias e eventos;&lt;/li&gt;
&lt;li&gt;Opções de debug;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
O mais legal dessa ferramenta é que se algum problema é encontrado, como o travamento da aplicação, o monkey avisa ao desenvolvedor para o teste com seu respectivo erro em log.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Como utilizar&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Tudo que precisamos fazer é navegar até a pasta do SDK do ANDROID, e entrar na pasta &lt;i&gt;&quot;plataform-tools&quot;&lt;/i&gt;, nele está contido o programa do &lt;i&gt;&lt;b&gt;adb.&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
Feito isso, apenas necessitamos utilizar a seguinte linha de comando:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
// Exemplo:
// adb shell monkey -p &quot;fugb.test.myapp&quot; -v 100
adb shell monkey -p &quot;package_do_app&quot; -v &quot;num_de_niveis&quot;

// Se você utilizar UNIX, digite ./ junto com o comando.
&lt;/textarea&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Como qualquer ferramenta, ele utiliza de opções que são -p e -v, onde -p refere-se ao nome do pacote da sua aplicação que está rodando, e -v é o valor do nível máximo de eventos que ele irá executar de forma randômica iniciando no nível default 0.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
-&lt;/div&gt;
&lt;div&gt;
Acho as duas ferramentas de extrema usabilidade para os desenvolvedores Android, uma vez que por falta de descuido perdemos a atenção para pequenos problemas, na qual essas ferramentas podem nos auxiliar e MUITO!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Espero que utilizem algum dia,&lt;/div&gt;
&lt;div&gt;
Abraço.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/5309781628219591919/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/02/ferramentas-essenciais-para.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/5309781628219591919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/5309781628219591919'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/02/ferramentas-essenciais-para.html' title='Ferramentas ESSENCIAIS para desenvolvedores Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-4829521590694766425</id><published>2013-01-15T12:54:00.000-03:00</published><updated>2013-03-01T14:26:24.362-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Listar aparelhos disponíveis no Bluetooth - Android</title><content type='html'>Antes de querer desenvolver qualquer aplicativo que necessite da tecnologia do Bluetooth, você precisa primeiro listar os aparelhos disponíveis na redondeza e guardar algumas informações importantes como o nome do aparelho encontrado e seu respectivo Mac Address para que uma conexão seja efetuada futuramente.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Diferente do que se imagina, para se listar os aparelhos que estão ligados no recurso do Bluetooth, não existe nenhuma complicação. O próprio Google Android nos facilita muito através da classe BluetoothAdapter que encapsula toda a complicação que se pode ter no gerenciamento desse processo.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Basicamente, para listarmos os aparelhos, precisamos dizer ao BluetoothAdapter que inicialize a busca por aparelhos. O BluetoothAdapter quando inicializar a busca irá lançar um BroadcastReceiver com uma Intent com a respectiva action &lt;b&gt;&lt;i&gt;BluetoothAdapter.ACTION_STARTED_DISCOVERY&lt;/i&gt;&lt;/b&gt;, e outro BroadcastReceiver quando a busca for finalizada com a action &lt;i&gt;&lt;b&gt;BluetoothAdapter.ACTION_FINISHED_DISCOVERY&lt;/b&gt;&lt;/i&gt;, e por final, quando algum aparelho for encontrado será lançado outro Broadcast com a action &lt;b&gt;&lt;i&gt;BluetoothDevice.ACTION_FOUND&lt;/i&gt;&lt;/b&gt;!&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class BluetoothActivity extends Activity {

   private String STARTED = BluetoothAdapter.ACTION_DISCOVERY_STARTED;
   private String FINISHED = BluetoothAdapter.ACTION_DISCOVERY_FINISHED;
   private String FOUND = BluetoothDevice.ACTION_FOUND;

   private BluetoothAdapter mBTAdapter;
   private BluetoothReceiver mReceiver;
   private List&lt;BluetoothDevice&gt; mDevices;

   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      
      mBTAdapter = BluetoothAdapter.getDefaultAdapter();
      mReceiver = new BluetoothReceiver();
   }

   @Override
   public void onResume() {
      super.onResume();
      registerReceiver(mReceiver, new IntentFilter(STARTED));
      registerReceiver(mReceiver, new IntentFilter(FINISHED));
      registerReceiver(mReceiver, new IntentFilter(FOUND));
      mBTAdapter.startDiscovery();
   }

   @Override
   public void onPause() {
      super.onPause();
      if (mDevices != null) {
         mDevices.clear();
      }
      mBTAdapter.cancelDiscovery();
      unregisterReceiver(mReceiver);
   }

   private class BluetoothReceiver extends BroadcastReceiver {
      
      @Override
      public void onReceiver(Context context, Intent intent) {
         String action = intent.getAction();
         if (action.equals(STARTED) {
            // Começou a procurar os aparelhos com bluetooth...
         } else if (action.equals(FINISHED)) {
            // Terminou a procura por aparelhos...
         } else if (action.equals(FOUND)) {
            // Aparelho encontrado...
            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
            short rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, Short.MIN_VALUE);

            String deviceName = device.getName();
            String deviceAddress = device.getAddress();

            Log.d(&quot;Bluetooth&quot;, &quot;Nome = &quot; + deviceName + &quot; - MAC: &quot; + deviceAddress);

            if (mDevices == null) {
               mDevices = new ArrayList&lt;BluetoothDevice&gt;();
            }

            if (!mDevices.contains(device)) {
               mDevices.add(device);
            }
         }
      }

   }

}
&lt;/textarea&gt;

&lt;div style=&quot;font-family: Monaco; font-size: 11px;&quot;&gt;
&lt;span style=&quot;font-family: Times; font-size: small;&quot;&gt;Espero que ajude vocês,&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Att,&lt;br /&gt;
Felipe Bonezi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/4829521590694766425/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2013/01/listar-aparelhos-disponiveis-no.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4829521590694766425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4829521590694766425'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2013/01/listar-aparelhos-disponiveis-no.html' title='Listar aparelhos disponíveis no Bluetooth - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-6119920518671841102</id><published>2012-10-23T17:10:00.001-03:00</published><updated>2013-03-01T14:08:22.051-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Criando um ProgressBar indeterminado</title><content type='html'>A linguagem do Google Android nos permite a manipulação de componentes visuais de forma fácil e prática. Utilizando alguns conceitos de animação, resources e fé, podemos criar um ProgressBar que fique executando de forma indeterminada, ou seja, sem fim.&lt;br /&gt;
&lt;br /&gt;
Geralmente, utilizamos estes ProgressBar&#39;s como forma de feedback para o usuário em operações que custam tempo, diminuindo o fator &quot;estressante&quot; do usuário com o aplicativo. Deste jeito, a experiência para com o aplicativo se eleva.&lt;br /&gt;
&lt;br /&gt;
Irei exemplificar um ProgressBar, onde algum processando está sendo feito em background, enquanto este ProgressBar é exibido. Para isto, utilizaremos de uma classe e dois arquivos XML, que serão nossos &quot;shapes&quot; onde será feito uma animação de transposição das imagens.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;shape_white.xml&lt;/b&gt;:&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;?xml version=&quot;1&quot; encoding=&quot;utf-8&quot;&gt;
&lt;layer-list
   xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; &gt;

   &lt;item&gt;
      &lt;shape android:shape=&quot;rectangle&quot; &gt;
         &lt;solid android:color=&quot;#FFFFFF&quot;&gt;
      &lt;/shape&gt;
   &lt;/item&gt;

&lt;/layer-list&gt;
&lt;/textarea&gt;

&lt;div&gt;
&lt;b&gt;shape_orange.xml&lt;/b&gt;:&lt;/div&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;?xml version=&quot;1&quot; encoding=&quot;utf-8&quot;&gt;
&lt;layer-list
   xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; &gt;

   &lt;item&gt;
      &lt;shape android:shape=&quot;rectangle&quot; &gt;
         &lt;solid android:color=&quot;#FF6600&quot;&gt;
      &lt;/shape&gt;
   &lt;/item&gt;

&lt;/layer-list&gt;
&lt;/textarea&gt;

&lt;div&gt;
Esses dois shapes serão utilizados para termos o efeito de animação visível ao usuário. A única coisa que faremos será a transposição dessas duas imagens pelas ImageViews correspondentes do layout abaixo.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;layout.xml&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;?xml version=&quot;1&quot; encoding=&quot;utf-8&quot;&gt;
&lt;RelativeLayout
   xmlns:android=&quot;http://schamas.android.com/apk/res/android&quot;
   android:id=&quot;@+id/relativeLayout01&quot;
   android:layout_width=&quot;wrap_content&quot;
   android:layout_height=&quot;wrap_content&quot;
   android:gravity=&quot;center&quot;
   android:ignoreGravity=&quot;@+id/txtProcessando&quot; &gt;

   &lt;TextView 
      android:id=&quot;@+id/txtProcessando&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_centerHorizontal=&quot;true&quot;
      android:layout_marginTop=&quot;30dp&quot;
      android:text=&quot;Processando...&quot;
      android:textColor=&quot;#FFFFFF&quot; /&gt;

   &lt;ImageView 
      android:id=&quot;@+id/imgThree&quot;
      android:layout_width=&quot;20dp&quot;
      android:layout_height=&quot;55dp&quot;
      android:layout_below=&quot;@+id/txtProcessando&quot;
      android:layout_marginLeft=&quot;5dp&quot;
      android:layout_marginRight=&quot;5dp&quot;
      android:layout_toRightOf=&quot;@+id/imgThree&quot;
      android:src=&quot;@drawable/shape_white&quot;
      android:tag=&quot;3&quot; /&gt;

   &lt;ImageView 
      android:id=&quot;@+id/imgTwo&quot;
      android:layout_width=&quot;20dp&quot;
      android:layout_height=&quot;55dp&quot;
      android:layout_below=&quot;@+id/txtProcessando&quot;
      android:layout_marginLeft=&quot;5dp&quot;
      android:layout_toRightOf=&quot;@+id/imgFour&quot;
      android:src=&quot;@drawable/shape_white&quot;
      android:tag=&quot;2&quot; /&gt;

   &lt;ImageView 
      android:id=&quot;@+id/imgOne&quot;
      android:layout_width=&quot;20dp&quot;
      android:layout_height=&quot;55dp&quot;
      android:layout_alignTop=&quot;@+id/imgTwo&quot;
      android:layout_marginRight=&quot;5dp&quot;
      android:layout_toRightOf=&quot;@+id/imgTow&quot;
      android:src=&quot;@drawable/shape_white&quot;
      android:tag=&quot;1&quot; /&gt;

   &lt;ImageView 
      android:id=&quot;@+id/imgFive&quot;
      android:layout_width=&quot;20dp&quot;
      android:layout_height=&quot;55dp&quot;
      android:layout_alignBottom=&quot;@+id/imgOne&quot;
      android:layout_marginRight=&quot;5dp&quot;
      android:layout_toRightOf=&quot;@+id/imgOne&quot;
      android:src=&quot;@drawable/shape_white&quot;
      android:tag=&quot;5&quot; /&gt;

   &lt;ImageView 
      android:id=&quot;@+id/imgFour&quot;
      android:layout_width=&quot;20dp&quot;
      android:layout_height=&quot;55dp&quot;
      android:layout_alignLeft=&quot;@+id/txtProcessando&quot;
      android:layout_below=&quot;@+id/txtProcessando&quot;
      android:layout_marginLeft=&quot;10dp&quot;
      android:layout_toRightOf=&quot;@+id/imgTow&quot;
      android:src=&quot;@drawable/shape_orange&quot;
      android:tag=&quot;4&quot; /&gt;

&lt;/RelativeLayout&gt;
&lt;/textarea&gt;

&lt;/div&gt;
&lt;div&gt;
Com nossos shapes inseridos em seu determinado layout, agora precisamos criar nossa classe responsável por carregar esta view e efetuar a animação de transposição.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;ProcessingBar.java&lt;/b&gt;:&lt;/div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class ProcessingBar extends LinearLayout implements Runnable {

   private Context mContext;
   private List&lt;ImageView&gt; mImageHolders;
   private List&lt;String&gt; mImages;
   private Thread mAnimationThread;
   private Handler mHandler;
   private boolean isAnimating;

   public ProcessingBar(Context context) {
      super(context);
      mContext = context;
      prepareLayout();

      mImageHolders = new ArrayList&lt;ImageView&gt;();
      mImageHolders.add((ImageView)view.findViewById(R.id.imgFour));
      mImageHolders.add((ImageView)view.findViewById(R.id.imgThree));
      mImageHolders.add((ImageView)view.findViewById(R.id.imgTwo));
      mImageHolders.add((ImageView)view.findViewById(R.id.imgOne));
      mImageHolders.add((ImageView)view.findViewById(R.id.imgFive));

      mImages = new ArrayList&lt;String&gt;();
      mImages.add(&quot;shape_white&quot;);
      mImages.add(&quot;shape_white&quot;);
      mImages.add(&quot;shape_white&quot;);
      mImages.add(&quot;shape_orange&quot;);

      mHandler = new Handler() {
         
         @Override
         public void handleMessage(Message m) {
            int currentImg = 0;
            int nextImage = 0;
            
            for (ImageView img : mImageHolders) {
               currentImg = Integer.parseInt(img.getTag().toString());
               if (currentImg &lt; 5) {
                  nextImage = currentImg + 1;
               } else {
                  nextImage = 1;
               }

               int resource = (getResources().getIdentifier(mImages.get(nextImage - 1), &quot;drawable&quot;, &quot;NOME_DO_PACOTE_DO_PROJETO&quot;));
               imageView.setTag(String.valueOf(nextImage));
               imageView.setImageResource(resource);
            }

            super.handleMessage(msg);
         }

      };


      startAnimation();
   }

   private void prepareLayout() {
      LayoutInflater inflater = LayoutInflater.from(mContext);
      View view = inflater.inflate(R.layout.processing_dialog, null);
      addView(view);
   }

   private void startAnimation() {
      clear();
      mAnimationThread = new Thread(this);
      mAnimationThread.start();
   }

   public void clear() {
      if (!isAnimating) {
         removeAllViewsInLayout();
         prepareLayout();
      }
   }

   @Override
   public void run() {
      isAnimating = true;
      while (isAnimating) {
         Thread.sleep(300);
         mHandler.sendEmptyMessage(0);
      }
   }

}
&lt;/textarea&gt;

&lt;div&gt;
Lendo o código acima, percebemos que ao instanciarmos o construtor da classe ProcessingBar, os métodos prepareLayout() e startAnimation() são chamados, onde o primeiro é responsável por dar um inflate no layout que definimos acima, depois todas as imagens são instanciadas baseado em suas identificações e um ArrayList com o nome dos arquivos dos shapes (e.g. shape_white , shape_orange) é criado. Já o segundo método é responsável por iniciar a Thread responsável pela animação de transposição das ImageViews, basicamente a cada 300 milisegundos uma mensagem é enviada para nosso Handler, que ao capta-las executa um trecho de código modificando cada imagem das ImageView&#39;s baseado no nome dos shapes que estão contidas no ArrayList que criamos no método prepareLayout().&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Simples, correto?&lt;/div&gt;
&lt;div&gt;
O resultado pode ser visto abaixo:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEXwO-nFh9IHGjcpo4DbvmsyObgoeUuKhdfkMD7ltlo15_mJeM5NfCIBtPVAaVe9QyM7MXVTjq7WfE8Tlc_SkTZiH1U6borQxBpg3UXTlA_XeVB8axesaHTQxru-XhyphenhyphenXvajlwH2g8hzvE/s1600/processing.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEXwO-nFh9IHGjcpo4DbvmsyObgoeUuKhdfkMD7ltlo15_mJeM5NfCIBtPVAaVe9QyM7MXVTjq7WfE8Tlc_SkTZiH1U6borQxBpg3UXTlA_XeVB8axesaHTQxru-XhyphenhyphenXvajlwH2g8hzvE/s1600/processing.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Espero que gostem do resultado.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/6119920518671841102/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/10/criando-um-progressbar-indeterminado.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6119920518671841102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6119920518671841102'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/10/criando-um-progressbar-indeterminado.html' title='Criando um ProgressBar indeterminado'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEXwO-nFh9IHGjcpo4DbvmsyObgoeUuKhdfkMD7ltlo15_mJeM5NfCIBtPVAaVe9QyM7MXVTjq7WfE8Tlc_SkTZiH1U6borQxBpg3UXTlA_XeVB8axesaHTQxru-XhyphenhyphenXvajlwH2g8hzvE/s72-c/processing.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-2904042359476779817</id><published>2012-05-22T20:37:00.004-03:00</published><updated>2013-03-01T13:33:29.533-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Download de uma Imagem com AsyncTask - Android</title><content type='html'>Pessoal, hoje irei deixar registrado uma coisa que muitos pensam ser complexo, mas de complexo não tem nada, download de uma imagem. Graças a santo Android que desenvolveu uma classe auxiliar, &quot;BitmapFactory&quot;, responsável pela criação do Bitmap que corresponde a imagem, não é trabalho nenhum fazer esta ação.&lt;br /&gt;
&lt;br /&gt;
Tudo que precisamos fazer o código abaixo em uma thread diferente da UI, ou seja, devemos utilizar o recurso de AsyncTask em nosso código fonte. Veremos como é simples mesclar esses dois recurso da linguagem Android.&lt;br /&gt;
&lt;br /&gt;
Para começarmos precisamos declarar um ImageView que será o responsável por exibir na tela a imagem que será baixada, uma String que será responsável por guardar o link da imagem que nós iremos baixar (coloquei uma qualquer) e a AsyncTask que será responsável por criar uma nova Thread para que o processamento de download da imagem não interfira na thread da UI, ocasionando um travamento do aplicativo.&lt;br /&gt;

&lt;div&gt;
Depois disso, tudo que precisamos fazer é chamar no nosso onCreate a nossa AsyncTask, não esquecendo de inicializar nosso ImageView, já que iremos modificar seu conteúdo quando nosso resultado for diferente de &#39;null&#39;.
&lt;/div&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class MainActivity extends Activity {

   private ImageView mImageView;
   private String IMG_URL = &quot;SUA_URL.png&quot;;

   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      mImageView = new ImageView(this);
      setContentView(mImageView);

      DownloadImage async = new DownloadImage();
      async.execute(IMG_URL);
   }

   private class DownloadImage extends AsyncTask&lt;String, Void, Bitmap&gt; {
      
      @Override
      protected Bitmap doInBackground(String... params) {
         String url = params[0];
         Bitmap bitmap = null;
         
         if (url != null) {
            try {
               final URL u = new URL(url);
               final URLConnection conn = u.openConnection();
               conn.connect();

               InputStream is = conn.getInputStream();
               final BufferedInputStream bis = new BufferedInputStream(is);
               bitmap = BitmapFactory.decodeStream(bis);
               
               bis.close();
            } catch (Exception e) {
               e.printStackTrance();
            }
         }

         return bitmap;
      }

      @Override
      protected void onPostExecute(Bitmap result) {
         if (result != null) {
            mImageView.setImageBitmap(result);
         }
      }

   }

}
&lt;/textarea&gt;

&lt;div&gt;
Simples, não é? =)&lt;br /&gt;
&lt;br /&gt;
Espero que ajude vocês! =)&lt;br /&gt;
Abraço.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/2904042359476779817/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/download-de-uma-imagem-com-asynctask.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2904042359476779817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2904042359476779817'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/download-de-uma-imagem-com-asynctask.html' title='Download de uma Imagem com AsyncTask - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-798935386980013808</id><published>2012-05-18T11:55:00.000-03:00</published><updated>2012-05-18T11:55:17.720-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="videopost"/><title type='text'>Adapter Eficiente - Android</title><content type='html'>Pessoal, hoje irei postar um vídeo post falando sobre como fazer um adapter eficiente.&lt;br /&gt;
Espero que vocês gostem.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;281&quot; mozallowfullscreen=&quot;&quot; src=&quot;http://player.vimeo.com/video/42396706&quot; webkitallowfullscreen=&quot;&quot; width=&quot;500&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
OBS: Quem sabe depois do vídeo vocês não refazem este exemplo que postei a muito tempo atrás?&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
LINK:&amp;nbsp;&lt;a href=&quot;http://debugcodigos.blogspot.com.br/2011/11/criando-adapterfile-browser-android.html&quot;&gt;http://debugcodigos.blogspot.com.br/2011/11/criando-adapterfile-browser-android.html&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Abraço.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/798935386980013808/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/adapter-eficiente-android.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/798935386980013808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/798935386980013808'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/adapter-eficiente-android.html' title='Adapter Eficiente - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-1109618413928095380</id><published>2012-05-15T21:15:00.004-03:00</published><updated>2016-02-04T10:42:08.786-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>EditText com máscara monetária - Android</title><content type='html'>Uma das facilidades que o android dá é a criação de máscaras para manipularmos entradas que são feitas no EditText. Uma máscara bastante conhecida é a monetária, onde ao inserirmos números é feito uma filtragem para que fique no formado R$0,00.&lt;br /&gt;
Ou seja, se digitarmos &#39;1&#39; ficará R$0,01 se digitarmos &#39;2&#39; ficará R$0,12 e se digitarmos &#39;3&#39; ficará R$1,23!&lt;br /&gt;
&lt;br /&gt;
Muito legal né? Mais legal é a implementação.&lt;br /&gt;
Tudo que devemos fazer é manipular o método &#39;addTextChangedListener(TextWatcher listener)&#39;!&lt;br /&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class MonetaryMask implements TextWatcher {

   private boolean mUpdating;
   private EditText mEditText;
   private NumberFormat mNF = NumberFormat.getCurrencyInstance();

   @Override
   public void onTextChanged(CharSequence cs, int start, int before, int after) {
      if (this.mUpdating) {
         this.mUpdating = false;
         return;
      }

      this.mUpdating = true;
      String formattedValue = cs.toString().replaceAll(&quot;[^\\d.]&quot;, &quot;&quot;);

      try {
         double value = (Double.parseDouble(str) / 100);
         formattedValue = this.mNF.format(value);
      } catch (Exception e) {
         e.printStackTrace();
         formattedValue = this.mNf.format(0.0D);
      }

      this.mEditText.setText(str);
      this.mEditText.setSelection(str.length());
   }

   @Override
   public void beforeTextChanged(CharSequence cs, int start, int count, int after) {
      // Não iremos utilizar...
   }

   @Override
   public void afterTextChanged(Editable e) {
      // Não iremos utilizar...
   }

}
&lt;/textarea&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;Espero que ajude vocês! =)&lt;br /&gt;
Abraço.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/1109618413928095380/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/edittext-com-mascara-monetaria-android.html#comment-form' title='7 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1109618413928095380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1109618413928095380'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/edittext-com-mascara-monetaria-android.html' title='EditText com máscara monetária - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-6239552655564043607</id><published>2012-05-05T10:42:00.001-03:00</published><updated>2012-05-05T10:42:37.581-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Validação de CPF em JAVA</title><content type='html'>Vira e volta uma validação de C.P.F. é muito perguntado a mim. Para sanar esta necessidade vou postar aqui o &quot;simples&quot; código que faz essa verificação.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Antes de tudo, temos que entender a lógica do algoritmo de validação. Para considerarmos um C.P.F. correto, devemos apenas verificar se o DÍGITO VERIFICADOR, os dois últimos dígitos, serão criados pelo nosso algoritmo&lt;/div&gt;
&lt;div&gt;
O cálculo é muito chato, mas vamos lá:&lt;/div&gt;
&lt;div&gt;
1º Guarde a soma da multiplicação do nove primeiros termos do C.P.F. por uma variável que incrementa, começando por 1.&lt;/div&gt;
&lt;div&gt;
2º O primeiro dígito será o resto da divisão por 11 (% 11).&lt;/div&gt;
&lt;div&gt;
3º Zere a soma.&lt;/div&gt;
&lt;div&gt;
4º Guarde a soma da multiplicação dos nove primeiros termos concatenado com o digito encontrado por uma variavel que incrementa, começando por 0.&lt;/div&gt;
&lt;div&gt;
5º O segundo dígito será o resto da divisão por 11 (%11).&lt;/div&gt;
&lt;div&gt;
6º Verifique se os dígitos encontrados são iguais aos digitos do cpf informado.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Fácil? Na verdade é chato!!!! Tanto que nem vou fazer o código, apenas irei disponibilizado. =)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol class=&quot;dp-j&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; font-family: Consolas, &#39;Courier New&#39;, Courier, mono, serif; font-size: 12px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 1px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;validaCPF(String&amp;nbsp;cpf)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;ret&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;base&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;000000000&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;digitos&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;00&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(cpf.length()&amp;nbsp;&amp;lt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(cpf.length()&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cpf&amp;nbsp;=&amp;nbsp;base.substring(&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;-&amp;nbsp;cpf.length())&amp;nbsp;+&amp;nbsp;cpf;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&amp;nbsp;=&amp;nbsp;cpf.substring(&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&amp;nbsp;=&amp;nbsp;cpf.substring(&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;digitos&amp;nbsp;=&amp;nbsp;cpf.substring(&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;soma&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;mult&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[]&amp;nbsp;var&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #008200; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Recebe&amp;nbsp;os&amp;nbsp;números&amp;nbsp;e&amp;nbsp;realiza&amp;nbsp;a&amp;nbsp;multiplicação&amp;nbsp;e&amp;nbsp;soma.&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;i++)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[i]&amp;nbsp;=&amp;nbsp;Integer.parseInt(&lt;span class=&quot;string&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;+&amp;nbsp;cpf.charAt(i));&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(i&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soma&amp;nbsp;+=&amp;nbsp;(var[i]&amp;nbsp;*&amp;nbsp;--mult);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #008200; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Cria&amp;nbsp;o&amp;nbsp;primeiro&amp;nbsp;dígito&amp;nbsp;verificador.&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;resto&amp;nbsp;=&amp;nbsp;soma&amp;nbsp;%&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(resto&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;-&amp;nbsp;resto;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #008200; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Reinicia&amp;nbsp;os&amp;nbsp;valores.&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soma&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mult&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #008200; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Realiza&amp;nbsp;a&amp;nbsp;multiplicação&amp;nbsp;e&amp;nbsp;soma&amp;nbsp;do&amp;nbsp;segundo&amp;nbsp;dígito.&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;i++)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soma&amp;nbsp;+=&amp;nbsp;var[i]&amp;nbsp;*&amp;nbsp;mult--;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #008200; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Cria&amp;nbsp;o&amp;nbsp;segundo&amp;nbsp;dígito&amp;nbsp;verificador.&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resto&amp;nbsp;=&amp;nbsp;soma&amp;nbsp;%&amp;nbsp;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;(resto&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;-&amp;nbsp;resto;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;((digitos.substring(&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;).equalsIgnoreCase(&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;Integer(var[&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;])&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.toString()))&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;(digitos.substring(&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;).equalsIgnoreCase(&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;Integer(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var[&lt;span class=&quot;number&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #c00000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]).toString())))&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ret&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: inherit; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #006699; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;ret;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; border-width: initial; color: #5c5c5c; line-height: 14px; list-style-image: initial !important; list-style-position: initial !important; list-style-type: none !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;background-color: inherit; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, mono, serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Consolas, &#39;Courier New&#39;, Courier, mono, serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Espero que tenham entendido,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Abraço.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/6239552655564043607/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/validacao-de-cpf-em-java.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6239552655564043607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6239552655564043607'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/05/validacao-de-cpf-em-java.html' title='Validação de CPF em JAVA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>R. Prof. Benedicto Monteiro - Madalena, Recife - PE, 50720-545, Brasil</georss:featurename><georss:point>-8.0597145 -34.9038773</georss:point><georss:box>-8.0754365 -34.9236183 -8.0439925 -34.884136299999994</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-2620530581025071090</id><published>2012-04-24T09:07:00.001-03:00</published><updated>2013-03-01T13:08:22.071-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Utilizando o GPS no Android</title><content type='html'>Um dos recursos mais utilizados no hardware de todos os smartphones é, com certeza, a geolocalização. Este recurso é tão utilizado que atualmente vários aplicativos utilizam dele, tanto em aplicativos sociais como Twitter até aplicativos de entretenimento como jogos.&lt;br /&gt;
&lt;br /&gt;
Não sabem vocês como é simples a utilização deste recurso. Uma vez implementada a interface responsável pelo monitoramento de requisições na mudança de coordenadas (latitude e longitude) e com suas devidas permissões no AndroidManifest.xml, tudo está feito.&lt;br /&gt;
&lt;br /&gt;
Então agora, basicamente precisamos implementar a interface &lt;b&gt;LocationListener&lt;/b&gt;&amp;nbsp;e criar algumas variáveis globais:&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class MainActivity extends Activity implements OnLocationListener {

   private double mLatitude, mLongitude;
   private LocationManager mLM;

   (...)

}
&lt;/textarea&gt;
Feito isto, seremos obrigados a implementar também todos os métodos dessa interface, que são eles:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;onLocationChanged(Location location):&lt;/b&gt; Toda vez que a posição no android sofrer modificações durante a consulta da requisição, este método é acionado. Perceba que recebemos como parâmetro uma Classe do tipo Location onde justamente nela contém nossa latitude e longitude.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
@Override
public void onLocationChanged(Location loc) {
   mLatitude = loc.getLatitude();
   mLongitude = loc.getLongitude();
}
&lt;/textarea&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;onProviderDisabled(String provider):&lt;/b&gt; Uma vez que é feita a requisição de atualização das coordenadas do android, se o nosso provedor, ou provider (GPS ou NETWORK) não estiver habilitado, este método é acionado. Geralmente, nele iremos disponibilizar algum alert com opção para abrir a tela de configurações do GPS para ativa-lo.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public void onProviderDisable(String provider) {
   if (provider.equals(LocationManager.GPS_PROVIDER)) {
      // GPS está desativado...
      Intent itGPS = new Intent(Settings.ACTION_SECURITY_SETTINGS);
      startActivity(itGPS);
   }
}
&lt;/textarea&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;onProviderEnabled(String provider):&lt;/b&gt; Preciso realmente explicar? =P&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;onStatusChanged(String provider, int status, Bundle extras):&lt;/b&gt; Se o provider de nossas requisições sofra alguma mudança em seu status em runtime, este método é acionado.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Nossa interface será a responsável pelo tratamento de eventos durante essas atualizações. E como faremos para iniciar ou parar essas atualizações? Muito fácil, iremos utilizar o conceito de &quot;Ciclo de Vida&quot; de uma Activity. Basicamente, no método onResume() iremos iniciar a requisição e no método onPause() iremos para-la. Entendeu? Não? Perceba que toda Activity possui um ciclo que vai do onCreate até o onDestroy, mas esses dois métodos apenas ocorrem uma vez e seu aplicativo pode sofrer pausas (como recebimento de ligações, msg&#39;s e etc) durante sua execução!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);

   (...)
   
   mLM = (LocationManager) getSystemService(Context.LOCATION_PROVIDER);
}

@Override
public void onResume() {
   super.onResume();
   mLM.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
}

@Override
public void onPause() {
   super.onPause();
   mLM.removeUpdates(this);
}
&lt;/textarea&gt;
Percebemos que nossa Activity agora está em perfeito ciclo de vida junto com nosso listener das atualizações de coordenadas. Não podemos esquecer de remover os updates das coordenadas pois o GPS é um dos fatores que mais gasta a bateria do aparelho.&lt;br /&gt;
&lt;br /&gt;
Em nosso próximo post iremos aprender à solicitar provider baseados em nossas necessidades, pois as vezes o GPS não é o melhor provider para fazermos as requisições de posição. Por isso, utilizares uma classe chamada Criteria...&lt;br /&gt;
&lt;br /&gt;
Abraço.</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/2620530581025071090/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/04/utilizando-o-gps-no-android-parte-1.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2620530581025071090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2620530581025071090'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/04/utilizando-o-gps-no-android-parte-1.html' title='Utilizando o GPS no Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-2370502595080504178</id><published>2012-02-17T21:03:00.003-03:00</published><updated>2013-03-01T12:08:56.108-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Para nunca mais esquecer [3] - Android</title><content type='html'>&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como redimensionar um Bitmap?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public Bitmap getBitmap(int width, int height) {
   Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.imagem);
   return Bitmap.createScaledBitmap(bitmap, width, height, false);
}
&lt;/textarea&gt;

&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como colocar bordas arredondadas em um Bitmap?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public Bitmap getRoundedCorner(Bitmap b, float roundPX) {
   int width = b.getWidth();
   int height = b.getHeight();
   
   Bitmap output = Bitmap.createBitmap(width, height, Config.ARG_8888);
   Canvas canvas = new Canvas(output);
   
   Rect rect = new Rect(0, 0, width, height);
   RectF rectF = new RectF(rect);

   Paint paint = new Paint();
   paint.setAntiAlias(true);
   canvas.drawRoundRect(rectF, roundPX, roundPX, paint);

   PorterDuffXfermode mode = new PorterDuffXfermode(Mode.SRC_IN);
   paint.setXfermode(mode);
   canvas.drawBitmap(b, rect, rect, paint);

   return output;
}
&lt;/textarea&gt;

&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como abrir o Chooser das Redes Sociais para Compartilhamento?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public void share(String subject, String text) {
   Intent it = new Intent(Intent.ACTION_SEND);
   it.setType(&quot;text/plain&quot;);
   it.putExtra(Intent.EXTRA_SUBJECT, subject);
   it.putExtra(Intent.EXTRA_TEXT, text);

   startActivity(Intent.createChooser(it, &quot;Compartilhe&quot;));
}
&lt;/textarea&gt;

&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como repetir um Bitmap em um background de layout?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;bitmap
   xmlns=&quot;http://schemas.android.com/apk/res/android&quot;
   android:src=&quot;@drawable/imagem&quot;
   android:tileMode=&quot;repeat&quot;
/&gt;
&lt;/textarea&gt;

&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/2370502595080504178/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/para-nunca-mais-esquecer-3-android.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2370502595080504178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2370502595080504178'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/para-nunca-mais-esquecer-3-android.html' title='Para nunca mais esquecer [3] - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-2397298094235857378</id><published>2012-02-05T14:58:00.001-03:00</published><updated>2013-03-01T11:40:52.481-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>UnZip Files - Java</title><content type='html'>Uma das ferramentas mais utilizadas no desktop é a compressão e descompressão de arquivos em um único arquivo, ou melhor, o zip desses arquivos. Podemos fazer um zip para obter informações dentro de um aplicativo Android, por exemplo imagens que contenham informações, oa invés de fazer toda vez uma requisição online (GET).&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Felizmente, podemos utilizar deste recurso no Android através de códigos Java, onde iremos introduzir nosso arquivo ZIP na pasta assets do projeto.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYdKOFC7cFFwgPxDsphHF-_os4c9ITpcbX8b9Lhua9oUS9wBjXBiG3Hjnh5C36YC0MGGGDOmLObiQlsGBoOYnXqxyIjJJ5x53PgDRBlxjzvPAv25s83lTH3MPbiU0eT7_-xsORsqBwV6s/s1600/assets.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYdKOFC7cFFwgPxDsphHF-_os4c9ITpcbX8b9Lhua9oUS9wBjXBiG3Hjnh5C36YC0MGGGDOmLObiQlsGBoOYnXqxyIjJJ5x53PgDRBlxjzvPAv25s83lTH3MPbiU0eT7_-xsORsqBwV6s/s1600/assets.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Para isso, devemos criar uma classe que nos auxiliará neste processo, seu construtor deve ter o parâmetro de todos os RESOURCES do projeto e ela deve herdar de Thread para que seja um processo assíncrono ao da Activity do aplicativo.&lt;/div&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class UnZipHelper extends Thread {

   private Resources mResources;

   public UnZipHelper(Resources resources) {
      mResources = resources;
   }

   @Override
   public void run() {
      this.unzip();
   }

   private void unzip() { 
      boolean isSdcardMounted = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
      if (isSdcardMounted) {
         String sdcardPath = Environment.getExternalStorageDirectory().getPath();
         String unzipDir = sdcardPath.concat(File.separtor).concat(&quot;Unziped&quot;);

         File dir = new File(unzipDir);
         if (!dir.exists()) {
            dir.mkdir();
         }

         InputStream is = null;
         ZipInputStream zis = null;
         try {
            is = this.mResources.getAssets().open(&quot;meu_arquivo.zip&quot;);
            zis = new ZipInputStream(is);
            
            String filePath = unzipPath.concat(File.separator);
            ZipEntry zipEntry = zipStream.getNextEntry();
            while (zipEntry != null) {
               String fileName = zipEntry.getName();
               File file = new File(filePath.concat(fileName));
               
               if (fileName.contains(&quot;.&quot;)) {
                  byte[] buffer = new byte[1024];
                  FileOutputSteam fos = new FileOutputStream(file);
                  int read = 0;
                  while ((read = zis.read(buffer, 0, 1024) &gt;= 0) {
                     fos.write(buffer, 0, i);
                  }

                  fos.close();
                  zis.closeEntry();
               } else {
                  file.mkdir();
               }
               
               zipEntry = zipStream.getNextEntry();
            }
            
            zis.close();
         } catch (Exception e) {
            e.printStackTrance();
         }
      }
   }

}
&lt;/textarea&gt;
&lt;/div&gt;
&lt;div&gt;
A primeira coisa que devemos fazer é declarar o caminho até a pasta onde salvaremos todos os arquivos do zip, e claro, devemos também verificar se ele existe, pois se ele não existir, devemos criar esse diretório no SD CARD do aparelho.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public void &lt;/span&gt;unzip() {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;private &lt;/span&gt;String path =&amp;nbsp;Environment.getExternalStorageDirectory().getAbsolutePath()+&lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;/Zip&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;private boolean &lt;/span&gt;mounted = &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment.getExternalStorageDirectory().equals(Environment.&lt;span style=&quot;color: #e69138;&quot;&gt;MEDIA_MOUNTED&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;File f = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; File(path);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;if&lt;/span&gt;(mounted) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if&lt;/span&gt;(!dir.exists()) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dir.mkdir();&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;InputStream is = &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.resources.getAssets().open(&lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;meuArquivo.zip&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] &lt;/span&gt;buffer&lt;span style=&quot;color: blue;&quot;&gt; = new byte&lt;/span&gt;[1024];&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;ZipInputStream zipStream = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; ZipInputStream(is);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;ZipEntry entry = zipStream.getNextEntry();&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while &lt;/span&gt;(entry != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; File(path +&lt;span style=&quot;color: #cc0000;&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;+ entry.getName());&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if&lt;/span&gt;(f.getAbsolutePath().contains(&lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;.&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// É um arquivo...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;FileOutputStream fos = &lt;span style=&quot;color: blue;&quot;&gt;new &lt;/span&gt;FileOutputStream(f);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; int&lt;/span&gt; i;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; while&lt;/span&gt;((i = zipStream.read(buffer, 0, 1024)) &amp;gt; -1) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fos.write(buffer, 0, i);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;fos.close();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; zipStream.closeEntry();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;span style=&quot;color: blue;&quot;&gt; else&lt;/span&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; // É um diretório...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt; f.mkdir();&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;entry = zipStream.getNextEntry();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;zipStream.close();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;span style=&quot;color: blue;&quot;&gt; catch &lt;/span&gt;(IOException e) {&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e.printStackTrance();&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Fácil né? :)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Agora é moleza, em sua activity a unica coisa que você precisa fazer é instanciar a nossa Thread e chamar o método run() dele.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;[]&#39;s&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;Felipe Bonezi&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/2397298094235857378/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/deszipar-arquivo-por-codigo-javaandroid.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2397298094235857378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2397298094235857378'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/deszipar-arquivo-por-codigo-javaandroid.html' title='UnZip Files - Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYdKOFC7cFFwgPxDsphHF-_os4c9ITpcbX8b9Lhua9oUS9wBjXBiG3Hjnh5C36YC0MGGGDOmLObiQlsGBoOYnXqxyIjJJ5x53PgDRBlxjzvPAv25s83lTH3MPbiU0eT7_-xsORsqBwV6s/s72-c/assets.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-4087692442168324647</id><published>2012-02-04T11:53:00.005-03:00</published><updated>2013-03-01T11:20:35.563-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Tirar/exibir fotos - Android (Camera)</title><content type='html'>Como muitos sabem, uma das classes fundamentais da linguagem Google Android é a classe Intent. Nela enviamos &quot;mensagens&quot; ao sistema operacional (Dalvik) na qual ele executa, ou não, algumas ações pré-determinadas.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Uma dessas ações nativas do Android é a utilização do aplicativo de câmera do aparelho e a captura da foto tirada através da Intent que lançamos. Ou seja, iremos lançar nossa Intent esperando algum resultado, que no caso é a foto tirada.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public void takePicture() {
   String action = MediaStore.ACTION_IMAGE_CAPTURE;
   Intent itCamera = new Intent(action);
   startActivityForResult(itCamera, 0);
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
   Bundle bundle = data.getExtras();
   if (bundle != null &amp;&amp; bundle.containsKey(&quot;data&quot;)) {
      Bitmap img = bundle.getExtra(&quot;data&quot;);
   }
}
&lt;/textarea&gt;

&lt;/div&gt;
&lt;div&gt;
Agora, se você quiser criar seu próprio aplicativo de câmera, encare esses artigos:&lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/reference/android/hardware/Camera.html&quot;&gt;http://developer.android.com/reference/android/hardware/Camera.html&lt;/a&gt;
&lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/reference/android/view/SurfaceView.html&quot;&gt;http://developer.android.com/reference/android/view/SurfaceView.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Abraços,&lt;br /&gt;
&lt;br /&gt;
Felipe Bonezi&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/4087692442168324647/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/tirarexibir-fotos-android-camera.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4087692442168324647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4087692442168324647'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/tirarexibir-fotos-android-camera.html' title='Tirar/exibir fotos - Android (Camera)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-7388730014370178559</id><published>2012-02-04T11:11:00.000-03:00</published><updated>2012-02-11T10:32:16.931-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows phone"/><title type='text'>Navegação entre Telas (PARTE 2) - Windows Phone 7</title><content type='html'>Bem, continuando nosso post&#39;s anterior. Vamos aprender como é simples a passagem de parâmetros no formato QueryString através do método NavigationService do Windows Phone? =)&lt;br /&gt;
&lt;br /&gt;
Para quem não sabe, QueryString significa um comando enviado no formato de string entre navegação de telas (Mais para WEB) onde passamos parâmetros entre as navegações. O formato da QueryString é do seguinte baseada do seguinte modo:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;www.site.com.br/index.html&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;u&gt;?login=felipebonezi&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Viu como é fácil? A única coisa que devemos fazer é utiliza-la na navegação. =)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;NavigationService.navigate(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #cc0000; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;&quot;Tela.xaml?login=debugcodigos&amp;amp;senha=123&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;, UriKind.RELATIVE);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Lembra quando falei sobre o método onNavigatedTo(), que corresponde ao primeiro método que o aplicativo vai depois do construtor da classe C#? Será nela que iremos pegar a QueryString, ou melhor, os parâmetros que passamos entre a navegação de tela.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;protected override void &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;OnNavigatedTo(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;NavigationEventArgs&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt; e) {&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;if&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;.NavigationContext.QueryString.ContainsKey(&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&quot;login&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;)) {&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;login =&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt; this&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;.NavigationContext.QueryString[&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&quot;login&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;];&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;senha =&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt; this&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;.NavigationContext.QueryString[&lt;/span&gt;&lt;span style=&quot;color: #cc0000; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&quot;senha&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;];&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Espero ter ficado claro como podemos passar parâmetros &quot;STRING&quot; entre a navegação de tela. Já para passar OBJETOS inteiros, podemos utilizar quatro modos:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Utilizando IsolatedStorage.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Utilizando SQL Compact Lite.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Utilizando o recurso de Serialização.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Utilizando o próprio QueryString, caso as variáveis da classe não sejam outras Classes.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;[]&#39;s&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, &#39;DejaVu Sans&#39;, Sans; font-size: x-small;&quot;&gt;Felipe Bonezi&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/7388730014370178559/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/navegacao-entre-telas-parte-2-windows.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7388730014370178559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7388730014370178559'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/navegacao-entre-telas-parte-2-windows.html' title='Navegação entre Telas (PARTE 2) - Windows Phone 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Av. Boa Viagem, 4856-5040 - Boa Viagem, Recife - PE, 51020-000, Brasil</georss:featurename><georss:point>-8.112255534618523 -34.888458251953125</georss:point><georss:box>-8.2380320346185236 -35.046386751953122 -7.9864790346185233 -34.730529751953128</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-1613763331091577679</id><published>2012-02-04T10:54:00.002-03:00</published><updated>2012-02-11T10:32:08.013-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows phone"/><title type='text'>Navegação entre Telas (PARTE 1) - Windows Phone 7</title><content type='html'>A navegação entre tela no Windows Phone ocorre através da classe NavigationService que está contida no namespace Microsoft.Phone! Ela é responsável pela navegação entre as telas, na qual consiste em telas em xaml onde cada tela contém seu arquivo C#. =)&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-style: none; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-right-style: none; border-top-style: none; border-width: initial; list-style-image: initial; list-style-position: outside !important; list-style-type: decimal-leading-zero; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px !important; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px !important;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;this.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;NavigationService.navigate(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;&quot;Tela.xaml&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, &#39;DejaVu Sans&#39;, Sans;&quot;&gt;, UriKind.RELATIVE);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Você deve estar se perguntando por que esse método chama um UriKind do tipo Relativo...&lt;br /&gt;
Por exemplo, &quot;/galinha / panela / torta.jpg&quot; seria relativa, porque é relativo ao diretório atual. Considerando algo como &quot;C :/ imagens / alimentação / galinha / panela / torta.jpg&quot; seria absoluta porque é ... em relação ... para a raiz da unidade.&lt;br /&gt;
&lt;br /&gt;
Outra coisa que devemos sabér é que quando saímos de uma tela, entramos no método da mesma chamada onNavigatedFrom(); da tela 1 e entramos no método onNavigatedTo(); da tela 2. Nesses métodos podemos adicionar QueryString&#39;s para que sejam passadas como parâmetros na navegação ou fazer operações antes que todos os elementos sejam evidênciados para o usuário.&lt;br /&gt;
&lt;br /&gt;
Isso irei postar na parte 2. =)&lt;br /&gt;
Abraço.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/1613763331091577679/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/navegacao-entre-telas-parte-1-windows.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1613763331091577679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1613763331091577679'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2012/02/navegacao-entre-telas-parte-1-windows.html' title='Navegação entre Telas (PARTE 1) - Windows Phone 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Av. Boa Viagem, 4044-4174 - Boa Viagem, Recife - PE, 51020-000, Brasil</georss:featurename><georss:point>-8.1190532229940438 -34.891204833984375</georss:point><georss:box>-8.2448062229940433 -35.049133333984372 -7.9933002229940442 -34.733276333984378</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-8165528674674957685</id><published>2012-01-06T13:42:00.000-03:00</published><updated>2013-03-01T11:14:10.101-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Verificar se existe conexão WIFI ou 3G - Android</title><content type='html'>Em alguns momentos, nossos aplicativos precisam saber se existe uma conexão acontecendo no respectivo aparelho. Para isso precisamos implementar um método que nos retornará se existe ou não uma conexão.&lt;br /&gt;
&lt;br /&gt;
Agora, você se pergunta, para que eu quero saber se existe uma conexão?&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Quando fazemos requisições à algum servidor, existe um delay de resposta (Totalmente normal), mas as podemos evitar esse delay simplemente verificando se existe uma conectividade no aparelho. Pois se não houver, o listener de espera da resposta do servidor será muito maior e a experiência de navegação do usuário irá por água-abaixo! =)&lt;br /&gt;
&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public static boolean isConnected(Context context) {
   try {
      ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);

      NetworkInfo mobile = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
      NetworkInfo wifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

      if (mobile.isConnected()) {
         return true;
      } else if (wifi.isConnected()) {
         return true;
      }
   } catch (Exception e) {
      e.printStackTrance();
   }

   return false;
}
&lt;/textarea&gt;

&lt;br /&gt;
&lt;b&gt;OBS: &lt;/b&gt;Esse método apenas nos garante que existe uma conectividade mas não garante a qualidade da banda em que estamos conectado. Até porque, quando estamos conectado em um WIFI ou 3G pode ocorrer da banda estar nula. &lt;u&gt;Conexão não significa necessariamente BANDA DE NAVEGAÇÃO BOA&lt;/u&gt;! Lembre-se disso...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Abraço.</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/8165528674674957685/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/existe-uma-conexao-wifi-ou-3g-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/8165528674674957685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/8165528674674957685'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/existe-uma-conexao-wifi-ou-3g-android.html' title='Verificar se existe conexão WIFI ou 3G - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Av. Conselheiro Aguiar, 3231-3487 - Boa Viagem, Recife - PE, 51020-021, Brasil</georss:featurename><georss:point>-8.1176936945201348 -34.89532470703125</georss:point><georss:box>-8.2434701945201354 -35.053253207031247 -7.991917194520135 -34.737396207031253</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-2486995843667906397</id><published>2011-12-09T18:14:00.000-03:00</published><updated>2013-03-01T11:08:31.602-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Para nunca mais esquecer [2] - Android</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como de costume, utilizo deste post para me lembrar de alguns recursos muito utilizados no Android.&amp;nbsp;É mais um post para consultas e estou compartilhando para ajudar! =)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como instalar uma fonte nova em uma aplicação Android?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Você deve, antes de tudo, fazer o download do arquivo .tff de sua fonte e colocar na pasta assets do seu projeto Android. Depois é só carrega-la via código.&lt;/span&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
Typeface typeface = Typeface.createFromAssets(getAssets(), &quot;nome_da_fonte_na_pasta_assets.ttf&quot;);
TextView textView = new TextView(this);
textView.setText(&quot;Testando a fonte!&quot;);
textView.setTypeface(typeface);
&lt;/textarea&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como transformar sua aplicação Android em Fullscreen?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
&lt;/textarea&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Como identificar a operadora do aparelho Android?&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String networkOperator = tm.getSimOperator();

if (networkOperator != null) {
   int mcc = Integer.parseInt(networkOperator.substring(0,3));
   int mnc = Integer.parseInt(networkOperator.substring(3));
}
&lt;/textarea&gt;

&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Com o código acima, estamos guardando nas variáveis &lt;b&gt;mcc (Código do País)&lt;/b&gt; e &lt;b&gt;mnc (Código da Operadora)&lt;/b&gt; os valores inteiros da operadora do celular. Com elas, podemos fazer várias implementações como personalizações específicas de layout a partir da operada. Basta você criar as pastas dos Resources (Substitua o &#39;NUMERO&#39; pelo número encontrado no mcc e mnc acima).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;res/drawable-mccNUMERO-mncNUMERO&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;res/values-mccNUMERO-mncNUMERO&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Exemplos de números são:
&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;mcc do Brasil = 724.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;mnc da TIM = 31.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;E por ai vai,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Abraço.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Felipe Bonezi&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/2486995843667906397/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/para-nunca-mais-esquecer-2-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2486995843667906397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/2486995843667906397'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/para-nunca-mais-esquecer-2-android.html' title='Para nunca mais esquecer [2] - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-1057149662244706692</id><published>2011-12-06T18:46:00.001-03:00</published><updated>2013-03-01T10:29:07.267-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Serializando Objetos - Java</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Serialização em Java é um dos recursos mais interessantes. Ela consiste em guardar todas as informações de um Objeto em formato de bytes. Ou seja, serializar nada mais é do que converter um Objeto qualquer (Não importa quantos métodos, atributos possua) em um arquivo em bytes.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Outro fato importante, é que quando serializamos um Objeto e os transformamos em bytes, temos a capacidade de envio dos mesmos através de Stream HTTP! Muito legal, né?&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Aqui irei exemplificar uma classe abstrata responsável pela serialização e deserialização de Objetos:&lt;/div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public abstract class Serializer {

   public static void serialize(Object obj, File filePath) {
      FileOutputStream fos = null;
      ObjectOutputStream oos = null;
      try {
         fos = new FileOutputStream(filePath);
         oos = new ObjectOutputStream(fos);
         oos.write(obj);

         fos.close();
         oos.close();
      } catch (Exception e) {
         e.printStackTrance();
      }
   }

   public static Object deserialize(File filePath) {
      FileInputStream fis = null;
      ObjectInputStream ois = null;
      Object obj = null;

      try {
         fis = new FileInputStream(filePath);
         ois = new ObjectInputStream(fis);
         obj = ois.readObject();

         fis.close();
         ois.close();
      } catch (Exception e) {
         e.printStackTrance();
      }

      return obj;
   } 

}
&lt;/textarea&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
No código acima, apenas criamos uma classe abstrata que será responsável pela serialização de objetos em um arquivo. No método serialize, passamos como parâmetro o objeto que será serializado e o arquivo que será gravado o objeto (Lembro que a extensão do arquivo deve ser &quot;.dat&quot; ou &quot;.ser&quot;).&lt;br /&gt;
Já o método deserialize será responsável pela deserealização do arquivo na qual retornará o objeto salvo anteriormente. Molezinha, não é? =)&lt;br /&gt;
&lt;br /&gt;
Esperto ter ajudado.&lt;br /&gt;
Abraço,&lt;br /&gt;
&lt;br /&gt;
Felipe Bonezi&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/1057149662244706692/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/serializando-um-objeto-em-java.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1057149662244706692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/1057149662244706692'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/12/serializando-um-objeto-em-java.html' title='Serializando Objetos - Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Recife - PE, Brasil</georss:featurename><georss:point>-8.0542775 -34.8812561</georss:point><georss:box>-8.180054 -35.0391846 -7.928501 -34.723327600000005</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-6896917011513965277</id><published>2011-11-16T15:36:00.000-03:00</published><updated>2013-03-01T10:11:33.313-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Criando Adapter/File Browser - Android</title><content type='html'>Um objeto ADAPTER atua como uma ponte entre um AdapterView e os dados subjacentes para esta visão. O adapter permite o acesso aos itens e também é responsável por fazer uma exibição de cada item do conjunto de dados. Ou seja, usamos adapter&#39;s quando queremos listar algo de forma personalizada com um layout definida pelo designer ou programador.&lt;br /&gt;
&lt;br /&gt;
O Android já pré-disponibiliza um adapter padrão para listagem, devemos apenas herdar nossa Activity de ListActivity e criar um ArrayAdaper para listar de forma simples mas muito eficiente alguns dados guardados em List ou Array&#39;s.&lt;br /&gt;
&lt;br /&gt;
Aqui irei disponibilizar um código feito por mim para listarmos todos as pastas e arquivos do SDCARD. Iremos englobar o ADAPTER e FILE BROWSER em um código apenas! &amp;nbsp;=)&lt;br /&gt;
&lt;br /&gt;
Primeiro devemos criar nosso arquivo de layout contendo um ListView dentro de um LinearLayout apenas.&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;LinearLayout
   xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
   android:layout_width=&quot;wrap_content&quot;
   android:layout_height=&quot;wrap_content&quot;
   android:orientation=&quot;vertical&quot; &gt;
   
   &lt;LinearLayout
      android:id=&quot;@+id/linearLayout&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:orientation=&quot;vertical&quot;
      android:layout_weightSum=&quot;2&quot; &gt;
 
      &lt;ListView
         android:id=&quot;@+id/listPastas&quot;
         android:layout_width=&quot;fill_parent&quot;
         android:layout_height=&quot;wrap_content&quot; /&gt;

   &lt;/LinearLayout&gt;

&lt;/LinearLayout
&lt;/textarea&gt;

Feito isso, devemos agorar criar um outro arquivo de layout que responderá por cada posição do listView, ou seja o que os itens do listView terá. Perceba que aqui é aonde criaremos como queremos nosso listView, seja com CheckBox, Spinner, TextView, ImageView, ProgressBar, (...). Fica a seu critério.&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;xml&quot;&gt;
&lt;LinearLayout
   xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
   android:layout_width=&quot;fill_parent&quot;
   android:layout_height=&quot;fill_parent&quot;
   android:orientation=&quot;vertical&quot; &gt;

   &lt;LinearLayout
      android:id=&quot;@+id/linearLayout2&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;wrap_content&quot; &gt;

      &lt;TextView
         android:id=&quot;@+id/txtNomePastas&quot;
         android:layout_width=&quot;fill_parent&quot;
         android:layout_height=&quot;wrap_content&quot;
         android:layout_gravity=&quot;center&quot;
         android:layout_marginLeft=&quot;10dp&quot;
         android:lines=&quot;1&quot;
         android:textSize=&quot;22sp&quot; /&gt;

   &lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
&lt;/textarea&gt;

Agora vamos para a nossa &lt;u style=&quot;font-weight: bold;&quot;&gt;Classe Java&lt;/u&gt;&amp;nbsp;que será o ADAPTER:&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class AnexarAdapter extends BaseAdapter {

   private Context mContext;
   private List&lt;String&gt; mArquivos;

   public AnexarAdapter(Context context, List&lt;String&gt; arquivos) {
      mContext = context;
      mArquivos = arquivos;
   }

   public int getCount() {
      return mArquivos.size(); // Retorna o número de linhas
   }

   public String getItem(int position) {
      return mArquivos.get(position); // Retorna o item daquela posição
   }

   public long getItemId(int position) {
      return position;
   }

   public View getView(int position, View convertView, ViewGroup p) {
      ViewHolder holder = null;
      String item = this.getItem(position);
      if (convertView == null) {
         convertView = LayoutInflater.from(mContext).inflate(R.layout.item_escolher_pasta, p, false);
         holder = new ViewHolder();
         holder.hTextView = (TextView)convertView.findItemById(R.id.txtNomePastas);
         convertView.setTag(holder);
      } else {
         holder = (ViewHolder)convertView.getTag();
      }

      holder.hTextView.setText(item);

      return convertView;
   }

   // Classe responsável por guardar a referência da View
   private static ViewHolder {
      TextView hTextView;
   }

}
&lt;/textarea&gt;


Perceba que devemos criar uma classe JAVA que herde da classe &lt;b&gt;BaseAdapter&lt;/b&gt; disponibilizada no sdk do Android.&amp;nbsp;Ela pedirá que nós implementemos todos os métodos que ela possui, no caso getCount(), getItem(), getItemId() e getView().&amp;nbsp;Você deve estar se perguntando agora &quot;Mas que diabos esses métodos fazem? =S&quot;. Muito simples, até porque o nome dos métodos já são bastante sugestivos.&lt;br /&gt;

Como dito acima, precisamos montar nossas &lt;b&gt;VIEW&lt;/b&gt;&#39;s que serão mostradas no ListView.&lt;br /&gt;
Primeiro, devemos criar nossos atributos e o construtor da classe onde iremos instanciar nossos atributos.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Veja que iremos guardar em um List com generics de &lt;b&gt;STRING&lt;/b&gt; (Lista apenas de String) os caminhos de todos os arquivos e pastas do SD CARD.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Já em nosso método &lt;b&gt;getView() &lt;/b&gt;devemos montar nosso adapter! Para isto, devemos intanciar que iremos fazer um &lt;b&gt;&lt;u&gt;INFLATE&lt;/u&gt;&lt;/b&gt; em um arquivo xml de LAYOUT.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Agora que temos guardado nossa &lt;b&gt;VIEW&lt;/b&gt;, ou seja, nosso ITEM. Devemos trata-lo para deixarmos como queremos. No caso, listar o nome dos arquivos/pasta do SD CARD.&lt;br /&gt;
&lt;br /&gt;
Em nosso código acima, instanciamos o nosso &lt;b&gt;TextView&lt;/b&gt; que criamos no arquivo de layout que demos um INFLATE, depois modificamos seu texto para o nome do arquivo/pasta do SD CARD e em seguida avisamos ao ListView que ele precisa dar um refresh para carregar a nova &lt;b&gt;VIEW&lt;/b&gt; utilizando o método &lt;b&gt;notifyDataSetChanged()&lt;/b&gt;.&lt;br /&gt;
PRONTO, TERMINAMOS NOSSO ADAPTER... Mas ainda falta criarmos nossa Activity que irá mostar para o usuário em um ListView todos os arquivos/pastas do SD CARD, correto? =)&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;java&quot;&gt;
public class AndroidFileBrowserActivity extends Activity {

   private ListView mListView;
   private List&lt;String&gt; mDiretorios;
   private File[] mListaDeArquivos;

   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_arquivos);
      
      String sdcardPath = Environment.getExternalStorageDirectory().getPath();
      File dir = new File(sdcardPath);
      mListaDeArquivos = new File[dir.length];
      mListaDeArquivos = dir.listFiles();

      mDiretorios = new ArrayList&lt;String&gt;();
      for (File file : mListaDeArquivos) {
         mDiretorios.add(file);
      }

      AnexarAdapter adapter = new AnexarAdapter(this, mDiretorios);
      mListView = (ListView)findViewById(R.id.listPastas);
      mListView.setAdapter(adapter);
   }

}
&lt;/textarea&gt;

Pode rodar, que ele irá listar todos os arquivos do SD CARD. Pelo menos, é pra funcionar! =) Caso não funcionem, postem os erros para que eu corrija por favor!&lt;br /&gt;
&lt;br /&gt;
Abraço.</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/6896917011513965277/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/criando-adapterfile-browser-android.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6896917011513965277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/6896917011513965277'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/criando-adapterfile-browser-android.html' title='Criando Adapter/File Browser - Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total><georss:featurename>Recife - PE, Brasil</georss:featurename><georss:point>-8.0542775 -34.8812561</georss:point><georss:box>-8.180054 -35.0391846 -7.928501 -34.723327600000005</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-4951930953856342352</id><published>2011-11-11T08:54:00.001-03:00</published><updated>2011-11-11T14:00:30.499-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows phone"/><title type='text'>Guia de batizado - Windows Phone 7</title><content type='html'>Uma das plataformas Mobile que chegaram para desbancar o grande sucesso do Google Android é o Windows Phone 7. O conceito dessa plataforma coloca as &#39;pessoas&#39; em primeiro lugar pois o Windows pensa que o futuro se resume na integração das redes sociais e na facilidade de comunicação entre seus contatos. Eu acho que foi uma aposta bastante inteligente até porque eu duvido que você não olhe sua rede social no mínimo cinco vezes ao dia! EU OLHO VINTE VEZES. =)&lt;br /&gt;
&lt;br /&gt;
Outra coisas que eles querem &#39;inovar&#39; é o sistema de navegação. No Google Android e no iOS, temos uma navegação HORIZONTAL e baseada em atalhos para nossos aplicativos. No WP7 a navegação é VERTICAL, com atalhos para seus contatos mais próximos, notícias, games e redes sociais!&lt;br /&gt;
&lt;br /&gt;
Uma coisa que o WP7 deixa a desejar é o seu site para desenvolvedores. Não chega nem aos pés do Android Developers, mas também não deixa a desejar no quesito de explicação de como começar a programar em WP7. Para programar em WP7, os requisitos mínimos dependem das suas necessidades no aplicativo. Se você quer produzir jogos, prepara-te e tenha uma boa placa de vídeo dependendo do jogo. Caso contrário, qualquer você precisa de um PC com no mínimo 3GB de RAM!&lt;br /&gt;
&lt;br /&gt;
Quem tá afim de programar pra WP7 além de mim? É só seguir esse tutorial que vou falar para vocês, pense como é complicado! =)&lt;br /&gt;
&lt;br /&gt;
Apenas baixe esse link, aceite todos os termos e de NEXT, NEXT, NEXT... Difícil né?&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=27570&quot; target=&quot;_blank&quot;&gt;Instalador do SDK do Windows Phone 7&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.invasao.com.br/wp-content/uploads/2011/04/windows-phone-7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://www.invasao.com.br/wp-content/uploads/2011/04/windows-phone-7.jpg&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Instalado, você já está apto a programar em WP7.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;u&gt;OBS&lt;/u&gt;&lt;/b&gt;: Futuramente postarei algumas dicas de aplicativos e seus códigos aqui.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Abraço!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/4951930953856342352/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/guia-de-batizado-windows-phone-7.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4951930953856342352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/4951930953856342352'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/guia-de-batizado-windows-phone-7.html' title='Guia de batizado - Windows Phone 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4682479197700935041.post-7118884385816725657</id><published>2011-11-08T14:43:00.000-03:00</published><updated>2011-11-09T12:08:58.270-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="poli-android"/><title type='text'>Palestra - Lançamento UBUNTU 11.10 [ANDROID]</title><content type='html'>Boa tarde pessoal,&lt;br /&gt;
&lt;br /&gt;
No dia 29/10/2011 em Recife-PE aconteceu o evento de lançamento do UBUNTU 11.10. Eu, juntamente com Fellipe Férrer, João Vitor Tinôco, Maíra Araújo, Renato Valença e Carlos Alberto participamos do evento representando a CÉLULA POLIANDROID, com palestras sobre o mercado mobile e principalmente ANDROID, sistema operacional mais utilizado no mundo mobile!&lt;br /&gt;
&lt;br /&gt;
Estou disponibilazando a apresentação e postando algumas fotos/vídeo:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
-----------------------------------------------------------------------------------&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Link:&amp;nbsp;&lt;a href=&quot;https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B5IovIb_hJvUZDNiYmZhZDAtZWU5MC00M2I5LWFiYmItNjc4OGJjOGM0Njkw&amp;amp;hl=en_US&quot; target=&quot;_blank&quot;&gt;Apresentação WORKSHOP!&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
------------------------------------------------------------------------------------&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Hqa84r0idoTP_PULBttVWMTdwyyUaIcH0tLhjDr92z0d15Li5-HNpLkq0hV8PT4cFWJM_p_cj_HAIwCjnPeQo-FcY21-_mMPswDdK8-LH68pp9RGxQ3HpzGh_-_4_iJJC2uwuEYs1qk/s1600/2011-10-29+10.12.25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Hqa84r0idoTP_PULBttVWMTdwyyUaIcH0tLhjDr92z0d15Li5-HNpLkq0hV8PT4cFWJM_p_cj_HAIwCjnPeQo-FcY21-_mMPswDdK8-LH68pp9RGxQ3HpzGh_-_4_iJJC2uwuEYs1qk/s320/2011-10-29+10.12.25.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDEijHuD_WINC77lhS63tlarIDGHXRdoiKtWWKtTgp7DZUvQo3TVBvpPPH2id4_JZlqkLQw0Vnbd-pvDn6ZB1kDe_uxhjsHJH3gREQ7ZA5_T9g4kofUiS_YKVz8IQV_K4jqteDErbQ2AM/s1600/2011-10-29+12.22.30.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDEijHuD_WINC77lhS63tlarIDGHXRdoiKtWWKtTgp7DZUvQo3TVBvpPPH2id4_JZlqkLQw0Vnbd-pvDn6ZB1kDe_uxhjsHJH3gREQ7ZA5_T9g4kofUiS_YKVz8IQV_K4jqteDErbQ2AM/s320/2011-10-29+12.22.30.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzbrm6YJdchttHt84h4oaNVbRk9-mfC1fsJBTqmWBfoXHNcjK3vaFs-fguMW6w0QbH5tvgTRM7C3TZ8zuuZVNahktjFbN46ahFDO-ogutYE_3VCB-ipVV_u7n8IciCmAITmFScHbrnFwQ/s1600/2011-10-29+12.22.51.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzbrm6YJdchttHt84h4oaNVbRk9-mfC1fsJBTqmWBfoXHNcjK3vaFs-fguMW6w0QbH5tvgTRM7C3TZ8zuuZVNahktjFbN46ahFDO-ogutYE_3VCB-ipVV_u7n8IciCmAITmFScHbrnFwQ/s320/2011-10-29+12.22.51.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiINM_d0T8OO4-nTDMSj2HV0RqmuXb64fTusUc_uyzKENryHysTN9F0CRMzdYy0M7vvkCksL1Yz-_VQYyWWGL0Ws85RNFmyRKtNeNs732fhii2w4xsmkk4Nuusw22pGtMHm4LwRDTMng8A/s1600/2011-10-29+12.23.06.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiINM_d0T8OO4-nTDMSj2HV0RqmuXb64fTusUc_uyzKENryHysTN9F0CRMzdYy0M7vvkCksL1Yz-_VQYyWWGL0Ws85RNFmyRKtNeNs732fhii2w4xsmkk4Nuusw22pGtMHm4LwRDTMng8A/s320/2011-10-29+12.23.06.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62FW4LOMNDxw00U-tkOmg5p7bXMnFOCh6HYOH1X7Ok53apixsSLCjX6ho8tBwA4_OVqVM4qvcNDhmiR9bo48MHcHwwGF_GwY3Dxq00cSv3D7UGVSI3O_Q44uNHEw6ehF62AGIrKDmkhY/s1600/2011-10-29+12.59.44.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh62FW4LOMNDxw00U-tkOmg5p7bXMnFOCh6HYOH1X7Ok53apixsSLCjX6ho8tBwA4_OVqVM4qvcNDhmiR9bo48MHcHwwGF_GwY3Dxq00cSv3D7UGVSI3O_Q44uNHEw6ehF62AGIrKDmkhY/s320/2011-10-29+12.59.44.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
------------------------------------------------------------------------&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;Vídeo:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/qGDbpg1Fexo?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
------------------------------------------------------------------------&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Abraço a todos.&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://debugcodigos.blogspot.com/feeds/7118884385816725657/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/palestra-lancamento-ubuntu-1110-android.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7118884385816725657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4682479197700935041/posts/default/7118884385816725657'/><link rel='alternate' type='text/html' href='http://debugcodigos.blogspot.com/2011/11/palestra-lancamento-ubuntu-1110-android.html' title='Palestra - Lançamento UBUNTU 11.10 [ANDROID]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01532118238778293063</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Hqa84r0idoTP_PULBttVWMTdwyyUaIcH0tLhjDr92z0d15Li5-HNpLkq0hV8PT4cFWJM_p_cj_HAIwCjnPeQo-FcY21-_mMPswDdK8-LH68pp9RGxQ3HpzGh_-_4_iJJC2uwuEYs1qk/s72-c/2011-10-29+10.12.25.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Av. Mário Melo, 351-479 - Santo Amaro, Recife - PE, 50040-010, Brasil</georss:featurename><georss:point>-8.0542775 -34.8812561</georss:point><georss:box>-8.180054 -35.0391846 -7.928501 -34.723327600000005</georss:box></entry></feed>