Tag Archive for 'mofire'

Page 2 of 2

让VideoControl支持更高的分辨率

如果直接videoControl.getSnapshot(null)的话,得到的是默认的较低分辨率和画质-在我的e61i上是640*480,这样显然不能充分利用2M像素的相机。(当然也要看了,你指望从手机上传出多清晰的照片,而且也要有兼容的问题,万一其他手机支持不到这么高怎么办?)通过设置width和height即可以支持更高的分辨率。

videoControl.setVisible(false);
String enc = "encoding=jpeg&width=800&height=600";
byte[] raw = videoControl.getSnapshot(enc);
appendImage(raw);
在我的小6上测试:
1600*1200 - 无法处理的异常(应该是得到的byte[]太大,ME的Vector会溢出),1200*900 - MediaException : Symbian OS Error: -4,貌似不支持这个分辨率
1280*960 - 同上
1024*768 - 同上
800*600 -  成功
640*480 - 成功,默认的分辨率

参考:nokia.wiki


Powered by MoFire

MoFire支持保存post到本地

如果有图片,会保存到图片文件夹

但是现在有新的问题,如果本地操作太多,比如读文件,写文件,使用相机,使用网络连接...e61i会总是提示用户是否同意做这些本地操作 .太麻烦.是不是可以用签名来做 - 也就是在安装时候让用户同意,以后都不会提示.

发现现在的编码水平有点提升,基本一遍通过.顺便赞一下antenna,实在是很方便的工具.
经验:如果使用FileConnection的话需要使用jsr75的file包.默认情况下antenna是不支持这个包的,所以用他build的时候会找不到FileConnection类,但用eclipseme是可以编译的,因为eclipseme默认都包含了jsr75的包.要让antenna支持jsr75也很简单.只要在build.xml里加入:

<property name="wtk.optionalpda.enabled" value="true" />

参考 

MoFire支持分类选择了

但如果分类名字是中文的话会显示为乱码(手机和模拟器里都是)

无法支持标签,因为wordpress的xmlrpc接口不支持标签,或者改源代码??

接下来要支持从本地获取图片和声音文件的上传,或者甚至视频文件.
Powered by MoFire

MoFire

最新版本(latest version): 0.6.1 download

Source code:
http://code.google.com/p/mofire/
http://sourceforge.net/projects/mofire/

Download and try:
http://mosh.nokia.com/content/4897555AA597E7C5E040050A45306893

手机上的wordpress客户端(jme)

1.支持拍照并发布带图片附件的日志
2.可配置多个blog
3.可保存日志到手机
4.支持从本地载入图片并发布到blog
5.支持分类,标签,使用MetaWeblog API

类图:


mofire-uml-0.1

FAQs:

What is mofire?
It's a blogging client on your mobile phone.

What blogging application mofire supports?
Initially, this is for my own wordpress blog. Theoretically, it supports all the blog application that support metaweblog API.

Why “mofire"?
"mo" is my prefix, means "nothing", "fire" is to after my favorite blogging client - scribefire.

How to setup a blog configuration?
First create a "setting", input the field:
Name: identify the setting, you can have multiple settings
URL: the xmlrpc url of your blog server. eg, mine is: http://zhangv.com/xmlrpc.php
User: the user of blog server
Password: the password of user
set as default: if set, when you start mofire, it will use this setting and directly go to post form. If not, you have to choose the setting to use.
After all the above, [validate setting] to test if it is ok. Recommend you to validate it every time setting is changed.

How to post an blog?
First, make sure to [use] a setting in the setting list.
Input the title, select a category, fill the tags(split by comma or space).
Then [edit content] to open the content editing form, and write your stuff, then [post].

How to save an blog in the mobile phone?
After input all the stuff, if you don't have a working connection, you can choose to [save] it to your mobile phone and post it when you go to starbuck. Then choose [drafts], and select the entry and post it.

How to attach a photo from phone gallary?
Still working on, will implement later. JavaME seems cannot handle picture of size 100kb around.

How to use the camera and post the photo just shot?
Select [camera], and [capture] the scene. Then you can see the shrink photo displayed in the post form, you can remove it if not good. Then post it.
NOTE: make sure you have the privilege to insert an image in your blog entry.

Wavelog – wordpress手机客户端

今天在网上找到这个 Wavelog,同样是wordpress的blogging移动客户端 . 同样适用xmlrpc,只是作者是用symbian的native c++.没用过,貌似是要收费的.不错,有竞争对手了,我的mofire也要继续改进,下一个版本可以支持图片插入和拍照插入.

Powered by MoFire

使用antenna时候的问题

编译时找不到List.deleteAll这个方法,因为默认的的antenna使用cldc1.0。而这个deleteall是1.1的方法,解决方法是覆盖默认的cldc版本

<property name="wtk.cldc.version" value="1.1"/>

Antenna是用来构建j2me项目的ant任务 扩展。让整个构建过程变的很简单和易于管理。

附我使用的构建脚本供参考:

<?xml version="1.0"?>

<project name="MoFire" default="build" basedir=".">

<!-- Define the Wireless Toolkit home directory. Needed by the tasks. -->

<property name="wtk.home" value="D:\development\WTK2.5.2"/>
<property name="wtk.cldc.version" value="1.1"/>
<property name="wtk.midp.version" value="2.0"/>
<property name="wtk.proguard.home" value="D:\development\workspaceME\lib\proguard4.1\"/>

<!-- Define some additional properties for this project. Not required. -->

<property name="midlet.name" value="${ant.project.name}"/>
<property name="midlet.home" value="."/>
<property name="midlet.vendor" value="MoDoFo"/>
<property name="midlet.version" value="0.0.1"/>
<!-- Define the tasks. -->

<taskdef resource="antenna.properties" classpath="lib/antenna-bin-1.0.0.jar"/>

<target name="clean">
<delete failonerror="false" dir="classes"/>
</target>

<target name="dist" depends="build">
<mkdir dir="dist/${midlet.name}-${midlet.version}" />
<property name="distfolder" value="dist/${midlet.name}-${midlet.version}"/>
<zip destfile="${distfolder}/${midlet.name}-${midlet.version}-src.zip">
<fileset dir="src" includes="**/*.*" />
<fileset dir="res" includes="**/*.*" />
</zip>
<copy file="${midlet.name}.jad" todir="${distfolder}" />
<copy file="${midlet.name}.jar" todir="${distfolder}" />
<copy file="README.txt" todir="${distfolder}" />

<wtkrun jadfile="${distfolder}/${midlet.name}.jad" device="DefaultColorPhone" wait="true"/>
</target>

<target name="build">

<!-- Make a JAD file from scratch, don't copy the original one. -->

<wtkjad jadfile="${midlet.name}.jad"
name="${midlet.name}"
vendor="${midlet.vendor}"
version="${midlet.version}" >

<midlet name="MoFire"
icon="/logo.png"
class="com.modofo.mofire.MoFire"/>
</wtkjad>

<mkdir dir="classes"/>

<!-- Compile everything, but don't preverify (yet). -->

<wtkbuild srcdir="${midlet.home}/src"
destdir="classes"
preverify="false"/>

<!-- Package everything. Most of the necessary information is
contained in the JAD file. Also preverify the result this
time. To obfuscate everything, set the corresponding
parameter to "true" (requires RetroGuard or ProGuard). The
version parameter increments the MIDlet-Version by one. -->

<wtkpackage jarfile="${midlet.name}.jar"
jadfile="${midlet.name}.jad"
obfuscate="false"
autoversion="true">

<!-- Package our newly compiled classes and the
resources from the WTK's demo application. -->

<fileset dir="classes"/>
<fileset dir="${midlet.home}/res"/>

</wtkpackage>

<!-- Obfuscate. -->
<!-- Not needed
<wtkobfuscate jarfile="${midlet.name}.jar"
jadfile="${midlet.name}.jad"/>
-->
<!-- Preverify things, this time separately to test the
corresponding task. -->

<wtkpreverify jarfile="${midlet.name}.jar"
jadfile="${midlet.name}.jad"/>

<!-- Convert the JAR file into a MIDP for PalmOS PRC file. -->
<!-- Not supported in wtk anymore - Zhangv
<wtkmakeprc jadfile="${midlet.name}.jad"
prcfile="${midlet.name}.prc"/>
-->
<!-- Start the MIDlet suite -->
<!-- Not need
<wtkrun jadfile="${midlet.name}.jad" device="DefaultColorPhone" wait="true"/>
-->
</target>
</project>

Mofire – mobile blogging tool

0.3

通过xmlrpc来从手机上发布blog的工具,当然前提是blog支持xmlrpc,比如wordpress.这个需求本来是来自自己的,后来在网上找了很久都没有找到相应的工具,于是决定自己写写看,顺便也多学一门手艺.

目前使用googlecode,一开始是用sourceforge但是试了一次发现发布太繁琐(等以后版本稳定以后再放上去吧)

至于feature也没有什么特别的,可以定义多个blog地址,可以保存blog到本地.很简单.用我的e61i(symbian s60 v3)测试ok.

license: LGPL

目前界面比较简单,或者说有点难看,因为用的是高级组件,没有做任何修饰.

使用了kxml和kxmlrpc,对二者都有修改.
kxml的改动:
1.parseEvent里有一个bug,也是通过google找到别人遇到同样的问题.
kxmlrpc的改动:
1.xmlrpcclient类里没有用encoding,改成utf-8才可以支持中文发布.
2.xmlrpcclient的execute方法,当xmlparser出现异常时不会throw异常.增加了一句throw.好让异常提示友好一些.

TODO:
1.界面好看一些(再弄个好看点的logo)
2.导航优化一些(虽然导航本来就很简单,因为功能本来就不复杂.)
3.代码重构(现在比较臭)