sábado, 8 de fevereiro de 2014

aplicativo para android app for android

Iniciantes Android. 

Muitas vezes nos acostumamos com certos jargões, com certos nomes que quem começou não sabe, nem tem a obrigação de saber. E para alguém iniciando agora, ter que procurar informações em tantos lugares diferentes é muito complicado. Então abrimos com vocês um pouco do nosso conhecimento, e pedimos que nos ajudem com o que tiver de melhor. Mandem dicas, opinem sobre os textos nos comentários, mandem textos feitos por vocês. Não tem nada melhor que sentir que vocês estão preocupados com os outros também. E vamos iniciar falando sobre a coisa mais importante no android: aplicativos
Nos smartphones hoje em dia tudo gira em tornos dos aplicativos, do conteúdo e do ecossistema proporcionado. Então para você entender um pouco mais do Android é bom você saber algumas coisas legais dos aplicativos, e algumas coisas que ocorrem sendo que você nem vê. E ainda no final de todas essas informações, temos uns pequenos tutoriais de como instalar aplicativos. Afinal, uma vez ou outra você vai pegar um apk e não sabe o que fazer.
Extensão e Assinatura

Para quem começou agora não sabe, mas os aplicativos Android tem extensão .apk. Ele funciona como um zip, tendo dentro dele tudo do aplicativo, como imagens utilizadas, sons e etc. Se você estiver no Windows, você pode ver o conteúdo do aplicativo pelo 7Zip. Se estiver no Linux o próprio Gzip pode ver. O .apk é como um compressor. Então é normal você ter um aplicativo de 1mb e depois de instalado ele ocupa uns 3mb no seu aparelho. Isso porque o apk vai para o aparelho, fica armazenado lá, e ainda é descompactado para uma pasta (normalmente /data/apps).
Outra coisa importante de saber é que todo aplicativo é assinado por uma chave especial (ao melhor estilo MD5). Isso serve para diminuir a pirataria. O problema é que já existem aplicativos que assinam outros aplicativos. Então esse método é meio furado. Mas já criaram outros. Existe um que verifica se o email da pessoa está em um banco de dados das pessoas que compraram o aplicativo. Bom também e já vi funcionando muito bem no My Next Android. Sei que alguns desenvolvedores vão dizer que a assinatura não é MD5, mas é apenas uma comparação com uma chave de segurança. Se você quiser saber um pouco mais da parte de desenvolvimento, e sobre outras extensões associadas a um aplicativo,
Permissões dos Aplicativos
Sabe quando você entra no Market e vai instalar um aplicativo e uma das telas é de aceitar as permissões? Porque existem permissões?
Para que os desenvolvedores possam utilizar certas coisas do seu aparelho, como ler SMS, ou saber dados do telefone, eles têm que dizer que querem isso. Na hora de desenvolver, em um certo arquivo (Manifest.xml) ele diz o que precisa do aparelho para funcionar corretamente. Alguns outros sistemas como o iOS e o Symbian, não tem esse tipo de transparência. Você instala o aplicativo mas não sabe o que ele pode mexer no seu aparelho. Na verdade o aplicativo pode utilizar qualquer coisa do aparelho.
Isso faz do Android um pouco mais seguro? Sim. A App Store tem sua mão de ferro de testar o aplicativo exaustivamente e reprovar. O Android Market tem essa transparência de mostrar para o usuário o que o aplicativo vai usar quando instalado. Houve um caso do Angry Birds que ele teve uma atualização e começou a pedir permissão de leitura e envio de SMS. Não preciso dizer que a Rovio foi bombardeada no Twitter perguntando o porque de pedir essa permissão. Eles se desculparam, disseram que era para implementar a funcionalidade de comprar itens por SMS, mas logo atualizaram de novo o jogo retirando as permissões.
Só incluiria uma informação importante na parte parte das permissões. Existem duas que são colocadas automaticamente pelo Market, mesmo que o desenvolvedor não as use, e que podem assustar um pouco os mais incautos: acesso ao dispositivo de armazenamento (o cartão de memória) e acesso ao estado do telefone.
Elas irão aparecer sempre que o aplicativo rodar nas versões anteriores à 1.6. E não aparecerão como permissões necessárias no Market, apenas no aparelho. Isso foi feito por questões de compatibilidade.
Então já sabem: quando forem instalar um aplicativo, seja pelo Market, seja por apk, leiam as permissões que ele pede e imaginem se o aplicativo necessita disso realmente. Um jogo simples precisa de permissão de GPS? Alguns dizem que utilizam isso para os Ads que ficam no jogo. Mas será que necessita mesmo? Se é para mostrar Ads  por área, porque não utilizar da rede do celular? Jogo usando GPS para propaganda só vai fazer você gastar mais bateria. Se liguem no que os aplicativos pedem, e depois não reclamem que eles fizeram algo que você não queria.
O que esperamos no futuro é que o Google crie uma maneira de você deixar o aplicativo utilizar algumas permissões e outras não. Claro, isso é para um futuro bem no futuro. Apesar de estarmos vendo alguns movimentos no XDA Developers, principalmente com o pessoal do Cyanogen onde eles estão tentando fazer isso. Google, contrata esses caras! Inclusive o Raphael mostrou semana passada em sua lista de aplicativos um que faz isso.
Aplicativos Pagos, Gratuitos, Freemium
Temos atualmente vários tipos de aplicativos no Market. Entre os modos de cada um temos:
Gratuito – só baixar usar e pronto. Alguns utilizam Ads (propagandas) para tirar um trocadinho.
Pago – custa um pouco, mas normalmente são os apps mais bem qualificados no Market.
Donate – alguns desenvolvedores criaram versões donate, que fazem tudo que o aplicativo faz, mas custa um pouquinho, apenas para a pessoa ajudar.
Freemium – o aplicativo é gratuito, mas alguns serviços dele são pagos. Um exemplo é o Tap Tap Revolution, que cobre por música baixada.
Tivemos a pouco tempo a criação do In App Purchase (compra dentro do App) que vai ajudar muito a limpar duplicatas do Market. Assim um desenvolvedor pode criar apenas uma versão do aplicativo, e cobrar por função a mais que o usuário quiser, como uma fase de um jogo, um item, uma música, algo do gênero. Espero que realmente a moda pegue, mas vemos que alguns aplicativos continuarão do mesmo jeito.
Outra dúvida bastante comum para quem está iniciando é: se eu trocar de celular, ou fazer um Full Wipe – que é apagar todos os dados do aparelho, restaurando como ele é de fábrica – eu perco meus aplicativos? Eles são vinculado à conta ou ao aparelho?
Os aplicativos ficam vinculados à sua conta do Google. Caso você pegue um outro aparelho (ou apague tudo do seu), e coloque a mesma conta nele como principal, você conseguirá ver todos seus aplicativos comprados no Market. Os gratuitos não ficam vinculados à conta o Market no celular, mas podem ser vistos no Market Web. Então se você acessar sua conta no Market Web verá uma lista com todos os aplicativos que baixou. Caso você tivesse medo de perder os aplicativos que comprou resetando o aparelho, não precisa ter mais. Eles ficarão lá, só esperando para serem baixado novamente.
Uma outra coisa importante a ser notada é que alguns aplicativos são automaticamente restaurados quando você coloco a conta do Google em um aparelho novo. O Market verifica quais aplicativos você tinha e baixa todos novamente. Normalmente em aparelhos com Android puro do 2.2+ isso funciona muito bem. No entanto alguns desenvolvedores não utilizam essa opção de fazer backup das configurações dos aplicativos, e eu não entendo o porque.
Market Web

O Market Web era tudo que faltava no Market para Android. Eles fizeram uma interface bonita, com opção de busca de aplicativos, e ainda tudo que você pode ver do aplicativo, como reviews, o que mudou, quantidade de download etc. Mas o que mais destaca o Market Web realmente é a possibilidade de instalar aplicativos remotamente. Quem já está a mais tempo no Android vai lembrar do AppBrain, que foi o primeiro site a implementar essa funcionalidade. O que ele faz: você verifica um aplicativo na Web, lê sobre ele, acha legal e tudo mais. Só que você não precisa plugar um cabo USB, ou entrar no Market no celular, e nem mesmo scannear um QRCode. Só clicar no botão instalar, verificar as permissões do aplicativo, verificar a compatibilidade com algum aparelho seu e pronto. Magicamente seu aparelho começar a baixar o aplicativo. E o melhor de tudo é que funciona em qualquer versão do Android! Hoje no EuAndroid usamos um widget que além de mostrar o QRCode, põe o link para o Market Web e para o AppBrain, já que algumas pessoas ainda usam.
Pirataria
Existe pirataria em um sistema gratuito? Sim existe, afinal os aplicativos não são gratuitos. Existem vários métodos de conseguir aplicativos por fora do Market, e a coisa é relativamente fácil, já que o Android permite nativamente instalar aplicativos de outras fontes. Um método é sair procurando apk pela internet e depois instalar no aparelho. Às vezes pode dar errado, ou vir com um vírus junto. Mas como é como dizemos, você já está fazendo algo que não é bom, depois não reclama se algo der errado.
Reembolso da compra
Pode ser que ocorra alguma vez com você: você compra o aplicativo, aí vai tentar rodar e trava. Reinicia o celular, tenta novamente, e trava tudo de novo. Isso é uma coisa triste, comprar aplicativo para saber que não funciona. Maldito seja o desenvolvedor que não faz versões Trial. Mas para “felicidade” de todos, o Market tem um tempo para retorno do dinheiro. Antigamente você tinha 1 dia para testar o aplicativo, e se não gostasse podia pedir esse retorno. Era um tempo justo, visto que alguns aplicativos só são usados em lugares específicos. No entanto hoje temos um tempo de 15min para pedir reembolso.
Instalando aplicativos fora do Market
Os principais meios de instalação de aplicativo são por ADB e Gerenciador de Aplicativos. No entanto há algum tempo atrás encontramos em um blog brasileiro o IAA e agora no XDA apareceu o Injector. Ambos se utilizam do ADB para a instalação, mas tem interface gráfica, então já são mais simples também. Todos os links pertinentes estão no final do post.
ADB – Android Debug Bridge
Esse é a cara de desenvolvedores e modificadores. O ADB serve para muitas coisas, como instalar aplicativos, testar, usar o shell, copiar arquivo do aparelho para o pc, etc. Muita coisa pode ser vista na página dele no Android Developers. Porém para utilizar o ADB você precisa que seu aparelho seja reconhecido como um aparelho de desenvolvimento. O jeito mais fácil de fazer isso é instalando o PDANet. Ele não tem nada a ver com instalar aplicativos, mas tem drivers de várias fabricantes o que ajuda bastante. Então a recomendação é instalar o PDANet, e seguir os passos dele, que são mais ou menos assim:
Desconectar o aparelho do PC, e deixar ele instalar os drivers.
No aparelho ir em Menu – configurações – Aplicativos – Desenvolvimento – Habilitar depuração USB
Conectar o aparelho e esperar instalar o driver. Quando aparecer que está procurando, fala para pular a utilização do Windows Updater (isso no Windows 7).
O aplicativo vai ser instalado no PC, mas você pode deixar de lado.
Depois que o PDANet estiver instalado, vamos ver como instalar aplicativos pelo ADB.
Primeiro baixe o SDK ou o ADB Standalone.
Instale o SDK ou descompacte do ADB para uma pasta fácil, como c:/Android (ou ˜/Android caso no Linux/Mac)
Pegue o aplicativo (apk) e coloque na pasta que tem o adb (binário). No SDK fica dentro da tools, no ADB Standalone fica em algum lugar.
Abra o cmd no Windows ou Terminal no Linux. Existe uma técnica no Windows 7 que é segurar o Shift e clicar com o botão direito na pasta que ele te dará a opção de “Abrir terminal de comandos aqui”. Navegue até a pasta c:/Android (ou ~/Android) e digite:
adb install (nome-do-aplicativo.apk)
Se tudo der certo o terminal vai dizer que o aplicativo foi instalado
Gerenciador de aplicativos
Esse é o método preferido de todos. O método visual é muito mais fácil. A ideia é simples: jogar o aplicativo para o cartão SD do aparelho e instalar pelo próprio aparelho.
Instale antes de mais nada um gerenciador de aplicativos no seus aparelho. Um que recomendo: File Expert. Gratuito, pequeno, rápido, bonito, agora com Root Explorer, compacta e descompacta em Zip e Rar. Enfim, um ótimo aplicativo. A não ser para Honeycomb. Para esse recomendo o File Manager HD.
Outra coisa a se fazer é permitir que aplicativos possam ser instalados de fontes desconhecidas. Para isso, da sua home aperte em Menu – Configurações – Aplicativos – Fontes desconhecidas. Com isso você pode instalar os aplicativos normalmente. Esse é um passo que pode ser feito antes, mas se não for feito, na hora da instalação ele vai pedir do mesmo jeito.
Baixe o aplicativo no seu pc e plugue o seu aparelho (puxe a Barra de Notificações e na conexão USB escolha Acesso ao Cartão de Memória). Coloque o aplicativo dentro do cartão sd. Para ficar mais fácil, crie uma pasta Apps, ou algo do tipo. Jogue o aplicativo lá dentro e desconecte o aparelho do computador (puxe a Barra de Notificações e na conexão USB escolha nenhuma).
No aparelho abra o File Expert, navegue até a pasta Apps e clique/aperte/selecione o aplicativo a ser instalado. Depois só seguir no Ok, verificar as permissões (muito importante) e instalar.
Android Injector
Esse é o mais simples realmente. Você só precisa dos drivers do seu aparelho, e instalar o programa. O Android Injector foi muito bem feito, tem uma interface legal (um G1) e funcionar muito bem. Testei aqui com um Optimus One em um VM do Windows 7 e foi muito simples.
Instale o PDANet como dito no ADB, e deixe o aparelho com o modo de depuração ligado.
Abra o Android Injector e aperte em Menu – Check for Attached Device para verificar se seu aparelho está conectado. Caso não esteja, houve algum problema com os drivers.
Aperte em Select Files e escolha os aplicativos que deseja instalar
Depois só apertar em Install to Device e esperar. Caso qualquer coisa dê errado ele vai avisar, senão, seu aplicativo está instalado. Quer algo mais simples que isso? Baixa do Market!

Bom pessoal ficou um artigo bem grande, mas está cheio de informações para os iniciantes no Android. Tentei passar bastante informação mas de um jeito rápido e simples. Espero que tenham gostado, e logo mais vou preparar mais um artigo ajudando em mais alguma coisa. Comentem sobre o que querem .
Android beginners . Many times we get used to certain jargon , with certain names that do not know who started it , or has an obligation to know. And for someone starting now , having to look up information in so many different places is very complicated . So we open with you a little of our knowledge, and we ask you to help us with what is best. Send tips , give opinions on the texts in the comments , send texts made for you . There's nothing better than feeling that you are concerned about others too. And let's start talking about the most important thing in android : applications
In smartphones nowadays everything revolves lathes applications , content, and provided the ecosystem . So for you to understand a little more of Android is good you know some cool stuff applications , and some things happen and you do not even see . And the end of all this information , we have a small tutorial on how to install applications . After all , at one time or another you will get a apk and do not know what to do .
Extension and Subscription
For now do not know who started it , but Android applications have extension. Apk . It works like a zip , having within it all of the application as used images , sounds and so on . If you're on Windows , you can see the contents of the application by 7Zip . If you 're on Linux Gzip himself can see . The . Apk is like a compressor. So it is normal you have a 1mb app and then installed it takes about 3mb on your device . That's because the apk goes to the appliance is stored there, and still is unzipped to a folder ( usually / data / apps ) .
Another important thing to know is that every application is signed by a special key ( the best style MD5 ) . This serves to decrease piracy . The problem is that there are already subscribed applications that other applications . So this method is kinda stuck . But others have created . There is one that checks if the email of the person is in a database of people who bought the application. Good and also saw already working fine in My Next Android . I know that some developers will tell you that the signature is not MD5 , but it is only a comparison with a security key . If you want to know a little more on the part of development, and on other extensions associated with an application ,
Permissions for Applications
You know when you enter the Market and will install an application and one of the screens is to accept the permissions ? Because there are permissions ?
To that developers can use certain things from your device as read SMS , data or knowing the phone , they have to say they want it . Time to develop in a certain file ( manifest.xml ) it says you need the device to function properly . Some other systems like iOS and Symbian , does not have that kind of transparency . You install the application but does not know what he can tinker to your handset . Actually the application can use anything from the device.
This makes Android a bit safer ? Yes, the App Store has its iron hand to test the application thoroughly and reprobate . The Android Market has this transparency to show to the user that the application will use when installed . There was one case of Angry Birds that he had an update and started asking permission to read and send SMS . Needless to say that Rovio was bombed on Twitter asking why ask this permission . They apologized , said it was to implement the functionality to purchase items by SMS but once again updated the game by removing the permissions .
Only include important information on the part of the permissions . There are two that are automatically placed at the Market , even if the developer does not use them , and that can scare a little over unwary : access storage device ( memory card ) and access to phone state .
They will appear whenever the application run in versions prior to 1.6 . And it does not appear as necessary permissions in the Market , just the unit. This was done for compatibility .
So already know : when they install an application , either by Market apk is for , read the permissions it asks and imagine if the application actually needs it . A simple game need permission GPS ? Some say they use it for ads that get in the game. But does it even need to ? Whether to show ads per area , why not use the cellular network? Game using GPS for advertising will only make you spend more battery. Bind the applications ask , then do not complain that they did something you did not want .
What we expect in the future is that Google create a way for you to leave the app permission to use some and not others. Of course, this is for a future well into the future . Although we are seeing some movement on XDA Developers , especially with the guys from Cyanogen where they are trying to do this . Google hires these guys ! Including Raphael showed last week in your list of applications one that does this.
Paid Apps , Free , Freemium
We currently have various applications in the Market . Among the modes each have :
Free - just download and ready to use . Some use ads ( advertisements ) to take small change .
Paid - costs a bit , but usually are the best qualified apps in the Market .
Donate - some developers have created versions donate , doing everything the app does , but it costs a little bit, just to help the person .
Freemium - the app is free , but some services are paid for it . An example is Tap Tap Revolution covering for downloaded music .
We had a little time creating the In App Purchase (purchase within the App) that will greatly help to clean up duplicates Market . Thus a developer can create only one version of the application , function and charge for more than you want , as a phase of a game , an item , a song , something. I hope you really take the fashion , but we see that some applications will remain the same.
Another very common question for those who are starting is : if I change my phone or do a Full Wipe - that is to erase all data on the device , restoring the factory as it is - I lose my apps ? They are linked to the account or the device ?
The apps are tied to your Google account . If you take another set (or delete all of your ) , and place it as the same account page , you will be able to view all your purchased apps in the Market . The free account are not bound to the Market on your phone, but can be seen in the Web Market So if you access your account on the Web Market will see a list of all the apps you downloaded . If you were afraid of losing applications purchased resetting the device , do not need more . They'll be there, just waiting to be downloaded again .
Another important thing to note is that some applications are automatically restored when you put a Google account on a new device . The Market checks which apps you had and low all again . Usually in handsets with pure Android 2.2 + this works fine . However some developers do not use this option to backup the application settings , and I do not understand why.
Web Market

The Web Market was all that was missing from the Android Market . They did a beautiful interface, with the option to search for applications , and yet all you can see the application, such as reviews , what has changed , amount of download etc. . But what really stands out the Web Market is the ability to install applications remotely . Who is already longer on AppBrain Android will remember that was the first site to implement this functionality . What it does : you check an application on the Web, read about it , think it's cool and all. But you do not need to plug in a USB cable , or enter the Market on your phone, and even one to scan QRCode . Just click on the install button , check the permissions of the application , verify compatibility with your specific device ready . Your device magically start downloading the application . And best of all, it works on any version of Android ! Today in EuAndroid use a widget that besides showing the QRCode , put the link to the Web to Market and AppBrain , since some people still use .
piracy
Piracy exists in a free system? Yes there is , after all the applications are not free. There are various methods of achieving applications outside the market, and it is relatively easy thing , as Android allows natively install fonts other applications. One method is to go out looking apk the internet and then installing it . Sometimes it can go wrong , or come along with a virus . But as it is as we say , you're doing something that is not good , then do not complain if something goes wrong .
Refund of purchase
Can it ever occur to you : you buy the app , then will try to run and catch . Restart the phone, try again, and lock it again . That's a sad thing , buy application to learn what does not. Damn developer that does Trial versions . But for " happiness " of all , the Market has time to return the money. Previously you had one day to test the application , and not like I could ask this return . It was a fair time, since some applications are only used in specific places . However today we have a time of 15min to ask for reimbursement .
Installing applications outside of the Market
The main means of installing application are by ADB and Application Manager . However some time ago found in a Brazilian blog and the IAA now appeared on XDA Injector . Both use ADB to install , but it has graphical interface , so there are more simple too . All relevant links are at the end of the post.
ADB - Android Debug Bridge
This is the face of developers and modifiers . The ADB serves for many things , such as installing applications , testing , use the shell , copy the file to the PC unit , etc. . A lot can be seen on his page on the Android Developers . But to use ADB you need your device to be recognized as a unit of development. The easiest way to do this is to install PdaNet . It has nothing to do with installing applications , but several manufacturers have drivers which helps a lot . So the recommendation is to install the PdaNet , and follow in his footsteps , which are more or less like this :
Disconnect the device from your PC , and let it install the drivers .
On the device go to Menu - Settings - Applications - Development - Enable USB debugging
Connect the device and install the driver to wait . When you see you're looking , speaks to skip using Windows Updater ( this in Windows 7 ) .
The application will be installed on the PC , but you can set aside .
Once PdaNet is installed , let's see how to install applications by ADB .
First download the SDK or ADB Standalone .
Install SDK 's ADB or unzip for easy folder like c :/ Android ( or ~ / Android event in Linux / Mac )
Get the app ( apk ) and place the folder that has the adb ( binary) . In SDK is inside the tools , the ADB Standalone gets somewhere.
Open cmd in Windows or Linux Terminal . There is a technique in Windows 7 that is to hold the Shift key and click the right button on the folder it will give you the option to " Open command terminal here " . Navigate to the folder c :/ Android ( or ~ / Android ) and type:
adb install ( -name aplicativo.apk )
If all goes well the terminal will say that the application was installed
Application Manager
This is the preferred method of all . The visual method is much easier . The idea is simple : play the app to the SD card from your phone and install the appliance.
Install first of all a boot applications on your device. One that I recommend : File Expert . Free small , fast, beautiful , now with Root Explorer , compresses and decompresses Zip and Rar on . Anyway , a great app . Except for Honeycomb . For this I recommend File Manager HD .
Another thing to do is to allow applications to be installed from unknown sources . For this, your home press Menu - Settings - Applications - Unknown Sources . With this you can install applications normally. This is a step that can be done before, but if not done at the time of installation it will ask anyway.
Download the app on your pc and plug your device ( pull down the notifications bar and select USB Memory Card Access connection) . Put application in sd card . To make it easier , create an Apps folder , or something . Play inside the application and disconnect the device from your computer ( pull down the notifications bar and select USB connection no ) .
On the device open the File Expert , navigate to the Apps folder and click / press / select the application to be installed . Then just follow the right, check the permissions ( very important ) and install.
Android Injector
This is actually the simplest . You just need the drivers of your device , and install the program . Android Injector was very well done , have a one ( G1 ) cool interface and work very well . I tested here with a Optimus One in a VM of Windows 7 and it was very simple.
Install PdaNet as stated in ADB , and leave the unit with debug mode on.
Open the Android Injector and press Menu - Check for Device Attached to verify that your device is connected . If not, there was a problem with the drivers.
Press to Select Files and choose the applications you want to install
Then just press Install to Device and wait. If anything goes wrong it will warn you , if not , your application is installed . Want something more simple than that? Low Market !
Good staff was a big article, but is full of information for beginners on Android. I tried to spend a lot of information but in a fast and simple way . Hope you enjoyed , and then I'll prepare another article to help anything else . Comment on what they want

Nenhum comentário:

Postar um comentário