Namespaces
Variants
Actions
(Difference between revisions)

Adicionando um ícone à MIDlet

Jump to: navigation, search
m (Hamishwillee - Bot update of Template:ArticleMetaData)
m (Hamishwillee - Bot update - Fix ArticleMetaData)
Line 1: Line 1:
  
  
{{ArticleMetaData
+
{{ArticleMetaData <!-- v1.2 -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|devices=Nokia N95 8GB
+
|devices= Nokia N95 8GB
|sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|platform=S60 3rd Edition, FP1
+
|platform= S60 3rd Edition, FP1
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->  
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
+
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
+
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|keywords=
+
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
|id=CS000958
+
|language= Lang-Portuguese
|language=Lang-Portuguese
+
|translated-by= [[User:Ivocalado]]
|translated-by=[[User:Ivocalado]]
+
|translated-from-title= Archived:Adding an icon to a MIDlet
|translated-from-title=CS000958 - Adding an icon to a MIDlet
+
|translated-from-id= 35597 <!-- automated guess -->
|translated-from-id=35597 <!-- automated guess -->
+
|review-by= <!-- After re-review: [[User:username]] -->
|review-by=<!-- After re-review: [[User:username]] -->
+
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|creationdate=20090915
+
|creationdate= 20090915
|author=[[User:Tapla]]
+
|author= [[User:Tapla]]
 
+
<!-- The following are not in current metadata -->
<!-- The following items are not in the standard metadata template -->
+
|subcategory= Arquivos/Dados
|subcategory=Arquivos/Dados
+
|id= CS000958
|category=Java ME
+
 
}}
 
}}
  
Line 35: Line 33:
 
==manifest.mf==
 
==manifest.mf==
  
O arquivo ''manifest'' provê informações sobre a MIDlet. Para adicionar um ícone à MIDlet, adicione o atributo <tt>MIDlet-&lt;n&gt;</tt> ao arquivo ''manifest'', onde <tt>n</tt> é um inteiro identificando a MIDlet:
+
O arquivo ''manifest'' provê informações sobre a MIDlet. Para adicionar um ícone à MIDlet, adicione o atributo {{Icode|MIDlet-&lt;n&gt;}} ao arquivo ''manifest'', onde {{Icode|n}} é um inteiro identificando a MIDlet:
  
 
<code>
 
<code>
Line 68: Line 66:
 
</code>
 
</code>
  
'''Nota''': According to [[KIJ000524 - MIDlet attributes on JAD and manifest files have to match]], os atributos que são comuns entre os arquivos ''manifest''  JAD devem ser idênticos.
+
'''Nota''': According to [[Archived:MIDlet attributes on JAD and manifest files must match (Known Issue)]], os atributos que são comuns entre os arquivos ''manifest''  JAD devem ser idênticos.
  
 
==Pós-condições==
 
==Pós-condições==
Line 79: Line 77:
  
  
[[Category:Java ME]][[Category:Code Examples]][[Category:Lang-Portuguese]]
+
[[Category:Java ME]][[Category:Code Snippet]][[Category:Lang-Portuguese]]
<!-- Translation --> [[en:CS000958 - Adding an icon to a MIDlet]]
+
<!-- Translation --> [[en:Archived:Adding an icon to a MIDlet]]

Revision as of 05:40, 8 August 2012


MultiMediaTile.png
Dados do artigo

Testado com
Aparelho(s): Nokia N95 8GB

Compatibilidade
Plataforma(s): S60 3rd Edition, FP1

Artigo
Tradução:
Última alteração feita por hamishwillee em 08 Aug 2012

Contents

Introdução

Este trecho de código demosntra como adicionar um ícone a uma MIDlet.

manifest.mf

O arquivo manifest provê informações sobre a MIDlet. Para adicionar um ícone à MIDlet, adicione o atributo MIDlet-<n> ao arquivo manifest, onde n é um inteiro identificando a MIDlet:

MIDlet-1: midletName,icon,mainClass


Abaixo é apresentado um exemplo completo do arquivo manifest:

MIDlet-Name: MIDgetSuite
MIDlet-Vendor: Vendor, Inc.
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-1: MIDget,/icons/icon.png,MainEngine

Arquivo JAD

É possível também adicionar informações sobre a MIDlet no arquivo de descriação de aplicação Java (JAD). Arquivos JADs são úteis porque ao invés de efetuar o download completo de um – possivelmente grande –arquivo Jar, uma MIDlet pode primeiramente recuperar o arquivo JAD da aplicação para prover ao usuário informações da aplicação e baseado nisso o usuário pode decidir se o download da aplicação vale a pena. O arquivo JAD não é obrigatório, e não é diretamente relacionado aos ícones (a maioria dos dispositivos S60 ignoram a definição de ícones), mas aqui é apresentado um exemplo de uso:

MIDlet-Name: MIDgetSuite
MIDlet-Vendor: Vendor, Inc.
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-Jar-Size: 2245
MIDlet-Jar-URL: MIDgetSuite.jar
MIDlet-1: MIDget,/icons/icon.png,MainEngine

Nota: According to Archived:MIDlet attributes on JAD and manifest files must match (Known Issue), os atributos que são comuns entre os arquivos manifest JAD devem ser idênticos.

Pós-condições

Após a MIDlet ser empacotada dentro de um arquivo JAR e instalada no dispositivo, o ícone especificado é exibido.

Veja também

187 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved