Thursday, January 31, 2013

windows 8 jquery develop bingmap error log

Error:

SCRIPT5007: 未经处理的异常,行 1,列 46945,在 ms-appx://pk17s.cn.pkmap/Bing.Maps.JavaScript//js/veapicore.js 中
0x800a138f - JavaScript 运行时错误: 无法获取未定义或 null 引用的属性“setView”
文件: veapicore.js,行: 1,列: 46945

fixed:

 

Error:

APPHOST9601: 无法加载 <http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0>。应用无法在本地上下文中加载远程 Web 内容。
文件: default.html

说明:

使用iframe包起来的内容为webcontext,其他默认为local context.其权限:

 

General features and restrictions

This table describes some of the features and restrictions that are available depending on whether the page is running in the local or web context.

Feature
Local context
Web context

Windows Runtime
Yes
No

Windows Library for JavaScript
Yes
Yes*

(See the Windows Library for JavaScript in the web context section for details.)

JavaScript URIs

(attribute="javascript:code")

No

A URI can refer to defined JavaScript functions (attribute="myFunction()"), but can't be a JavaScript statement ( attribute="javascript: 2 + 2;").

Yes

Data URIs ("data:" ) for fonts
No
Yes

External script references (<script src="http://*" /> )
No

Script must come from locally packaged content.

Yes

window.close
Yes

Important  While you can technically use window.close in a local context, we don't recommend it. It will generate an error and cause the Windows Store to reject the app.

No

Cross-domain XHR requests
Yes
No

Automatic toStaticHTMLvalidation
Yes
No

Application Cache
Yes
Yes

Cross-domain XHR requests
Yes
No

Windows Library for JavaScript in the web context

Although you can use Windows Library for JavaScript in the web context, some of its APIs work differently because the web context does not have access the Windows Runtime. Here are some of the APIs that are affected:

API
Behavior changes in the web context

WinJS.UI.AppBar

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.
  • Does not listen to Windows Runtime events.

WinJS.UI.ListView

  • Does not use user-customizable system metrics and animation settings. Intead, the control falls back to default Windows Library for JavaScript settings.

WinJS.UI.Rating

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.

WinJS.UI.SettingsFlyout

  • This control is not available in the web context.

WinJS.UI.StorageDataSource

  • This data source is not available in the web context.

WinJS.UI.ToggleSwitch

  • Does not automatically provide the correct default strings for the current culture. In the web context, the control displays en-us strings.

WinJS.UI.Tooltip

  • Does not use user-customizable system metrics and animation settings. Intead, the control falls back to default Windows Library for JavaScript settings.
  • Does not get the user's handedness. The control assumes the user is right-handed.

腾讯应用中心开发者平台-春节期间停止应用上传及更新通知

windows8 jquery问题

jquery error for windows8问题:

SCRIPT28: 未经处理的异常,行 5835,列 5,在 ms-appx://318cff9f-05ec-47e1-a2a5-aad1a9171be3/js/third/jquery/jquery.min.js 中

0x800c001c - JavaScript 运行时错误: 无法添加动态内容。脚本尝试插入了可能不安全的动态内容或以前经过动态修改的元素。例如,使用 innerHTML 属性添加脚本或格式错误的 HTML 将发生此异常。请使用 toStaticHTML 方法筛选动态内容,或使用诸如 createElement 等方法显式创建元素和属性。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=247104

文件: jquery.min.js,行: 5835,列: 5

错误:

APPHOST9601: 无法加载 <http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0>。应用无法在本地上下文中加载远程 Web 内容。

文件: map.html

错误:SCRIPT28: 未经处理的异常,行 1444,列 3,在 ms-appx://pk17s.cn.pkmap/js/jquery/jquery.min.js 中

0x800c001c - JavaScript 运行时错误: 无法添加动态内容。脚本尝试插入了可能不安全的动态内容或以前经过动态修改的元素。例如,使用 innerHTML 属性添加脚本或格式错误的 HTML 将发生此异常。请使用 toStaticHTML 方法筛选动态内容,或使用诸如 createElement 等方法显式创建元素和属性。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=247104

文件: jquery.min.js,行: 1444,列: 3

Fixed:

Used the jquery for win8: http://github.com/appendto

And the reference jquery code:

<script type="text/javascript" src="../js/jquery/jquery.min.js"></script>

<script type="text/javascript" src="../js/jquery/jquery-win8-deferred.js"></script>

<script type="text/javascript" src="../js/jquery/jquery-vsdoc.js"></script>

windows8 iis8.0 安装php

Error:

HTTP 错误 500.21 - Internal Server Error

处理程序“PHP53_via_FastCGI”在其模块列表中有一个错误模块“FastCgiModule”

最可能的原因:

  • 使用了托管处理程序,但是未安装或未完整安装 ASP.NET。
  • 处理程序模块列表的配置中存在书写错误。
  • 在应用程序初始化期间,要么应用程序初始化功能已将 skipManagedModules 设置为 True,要么重写规则设置了映射到托管处理程序的 URL 并且还设置了 SKIP_MANAGED_MODULES=1。

可尝试的操作:

  • 如果要使用托管处理程序,请安装 ASP.NET。
  • 请确保正确指定处理程序模块的名称。模块名称区分大小写,并使用 modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" 格式。
  • 设置映射到托管处理程序的 URL (例如 .aspx)时,请确保所有应用程序初始化重写规则都设置 SKIP_MANAGED_MODULE=0
  • 作为替代方法,请确保应用程序初始化重写规则将请求映射到非托管处理程序(例如,映射到 .htm 文件,该文件映射到 StaticFileHandler。)

详细错误信息:

模块

   IIS Web Core

通知

   ExecuteRequestHandler

处理程序

   PHP53_via_FastCGI

错误代码

   0x8007000d

请求的 URL

http://localhost:80/index.php

物理路径

   D:\doc\webserver\wwwroot\index.php

登录方法

匿名

登录用户

匿名

更多信息:

IIS 内核不能识别此模块。

查看更多信息 »

解决:使用window web installer安装cgi和fastcgi。

错误        1        错误 : DEP3000 : 尝试停止应用程序失败。这可能导致部署失败。

无法连接到名为“”的“Microsoft Visual Studio 远程调试监视器”。发生了通常表示安装被损坏的错误(代码 0x80040154)。如果问题仍然存在,则通过“控制面板”中的“添加或删除程序”修复 Visual Studio 安装。        App2

解决:去微软重新下载win8和visual studio 2012.

错误:

HTTP 错误 500.19 - Internal Server Error

无法访问请求的页面,因为该页的相关配置数据无效。

详细错误信息:

模块

   IIS Web Core

通知

   BeginRequest

处理程序

尚未确定

错误代码

   0x80070021

配置错误

不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。

配置文件

\\?\D:\doc\webserver\wwwroot\mw\public\web.config

请求的 URL

http://localhost:80/p/

物理路径

   D:\doc\webserver\wwwroot\mw\public\

登录方法

尚未确定

登录用户

尚未确定

配置源:

25: <urlCompression doStaticCompression="true" />
26: <handlers>
27: <remove name="php-cgi" />

更多信息:

当读取 Web 服务器或 Web 应用程序的配置文件出现问题时,就会发生此错误。在某些情况下,事件日志会包含有关导致此错误的原因的更多信息。

查看更多信息 »

php安装:fastcgi + cgi + php5.3 +url rewrite 2.0

clip_image001

应用发布进展通知(2013年01月31日)

------=_Part_552_6235373.1359597696236
Content-Type: text/html;charset=GB2312
Content-Transfer-Encoding: quoted-printable





.maintable {
=09background-color:#EBF7F8;
=09bordercolor:#9FCCEC;
=09border-top:1px solid #9FCCEC;
=09border-left:1px solid #9FCCEC;
=09width: 60%;
}
.yi_hang_4 {
=09float:left;
=09text-indent: 15px;
=09padding-left: 5px;
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09background-color: #EBF7F8;
=09text-align: right;
}
.titletd {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09text-align: center;
}
.yi_hang_9 {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
=09background-color: #FFFFFF;
}
td {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
}
.noWarp{
=09width:60%;
=09white-space:normal;
=09word-break:break-all;
}
a:visited {
=09color: #000000;
=09text-decoration: none;
}
a:active {
=09color: #FF0000;
=09text-decoration: none;
}
a:link {
=09color: #000000;
=09text-decoration: none;
}
.whitefont {
=09font-family: "=CB=CE=CC=E5";
=09color: #FFFFFF;
}
.menuborder {
=09background-color: #A9D8FC;
=09border: 1px solid #65B8F7;
}
.maintable a:link{
=09color:#0000ff;
=09}

.tablePager a:active{
=09color:#00008B;
}
.maintable a:hovor{
=09color:#0000ff;
}

.maintable a:visited{
=09color:#00008B;
}
.maintable td{
=09=09border-bottom:1px solid #9FCCEC;
=09=09border-right:1px solid #9FCCEC;
=09=09height:25px;
}

=20
=20


=09

=09=09 =D7=F0=BE=B4=B5=C4=BF=AA=B7=A2=D5=DF=A3=A8=C1=AC=B5=C2=C1=C1=A3=
=A9=A3=AC=C4=FA=BA=C3=A3=A1
=09=09
=09=09=09     =CE=C2=DC=B0=CC=E1=CA=
=BE=A3=BA=D6=D0=B9=FA=D2=C6=B6=AF=CE=AA=C4=FA=CC=E1=B9=A9=D5=E6=BB=FA=B2=E2=
=CA=D4=B7=FE=CE=F1=A1=A3=CC=E1=BD=BB=D3=A6=D3=C3=C7=B0=C4=E3=BF=C9=CF=C8=CA=
=B9=D3=C3=B4=CB=B7=FE=CE=F1=D7=F7=D7=D4=BC=EC=A1=A3
=BD=F8=C8=
=EB=D5=E6=BB=FA=B2=E2=CA=D4>>>>

=09=09=09
=09=09=09     =C4=FA=D4=DA=D6=D0=B9=FA=D2=C6=B6=AF=BF=
=AA=B7=A2=D5=DF=C9=E7=C7=F8=B7=A2=B2=BC=B5=C4=D3=A6=D3=C3=D7=EE=BD=FC24=D0=
=A1=CA=B1=C4=DA=D7=B4=CC=AC=B1=E4=BB=AF=C7=E9=BF=F6=C8=E7=CF=C2=A3=BA
=09


=09=09

=09=09

    =09=09 =09=09
    =09=09=09=09=20
    =09=09=09=09 =09=09=09=09
  • =D2=D4=CF=C2=D3=A6=D3=C3=D2=D1=B2=E2=CA=D4=
    =CD=A8=B9=FD=A3=AC=CF=D6=B4=A6=D3=DA=A1=B0=C9=CC=D3=C3=C7=B0=D7=BC=B1=B8=A1=
    =B1=BD=D7=B6=CE=A3=AC=C8=E7=B9=FB=CA=C7=C0=EB=CF=DF=D3=A6=D3=C3=A3=AC=BD=AB=
    =D4=DA14=B8=F6=B9=A4=D7=F7=C8=D5=C4=DA=C9=CC=D3=C3=C9=CF=CF=DF=A3=AC=C8=E7=
    =B9=FB=CA=C7=D4=DA=CF=DF=D3=A6=D3=C3=A3=AC=C9=CF=CF=DF=CA=B1=BC=E4=BD=AB=C1=
    =ED=D0=D0=CD=A8=D6=AA=A3=BA
  • =09
    =09=09=09=09=20
    =09=09=09=09 =09
    =09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=20
    =09=09=09=09=09 =09=09=09=09=09
    =09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09=09
    =09=09=09=09
    =D3=A6=D3=C3=C3=FB=
    =B3=C6
    =D3=A6=D3=C3=B4=FA=
    =C2=EB
    =D3=A6=D3=C3=B7=D6=
    =C0=E0

    =09=09=09=09 =D3=EF=D2=F4=C9=E8=D6=C3=BB=CA
    =09=09=09=09=09=09

    =09=09=09=09 22719327
    =09=09=09=09=09=09

    =09=09=09=09 =D3=A6=D3=C3=C8=ED=BC=FE
    =09=09=09=09=09=09

    =09=09=09=09
    =09=09=09=09=09=09 =A3=A8=D7=EE=B6=E0=C1=D015=D0=D0=A3=A9=B8=FC=B6=E0=
    =C7=EB=B5=C7=C2=BD=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=B2=E9=BF=B4
    =09=09=09=09=09=09=09
    =09=09
    =09=09=09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09 =09=09=09
=09
=09



=09=09

=09=09           &nbs=
p; 
=09=09=09 =B4=CB=CE=AA=CF=B5=CD=B3=D7=D4=B6=AF=CD=A8=D6=AA=D3=CA=BC=FE=A3=
=AC=C7=EB=CE=F0=D6=B1=BD=D3=BB=D8=B8=B4=A1=A3=B8=D0=D0=BB=D6=A7=B3=D6=A3=A1
=09=09

=09=09=20
=09=09

=09=09 =D6=D0=B9=FA=D2=C6=B6=AF=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8 &nbs=
p;      
=09=09=09 2013=C4=EA01=D4=C231=C8=D5      &nb=
sp; 
=09=09=09
=09=09=09 =C1=AA=CF=B5=CE=D2=C3=C7      &=
nbsp; 
=09=09=09

=09=09

=09



------=_Part_552_6235373.1359597696236--

Wednesday, January 30, 2013

iOS-Feeling for Android: Hands-On with MIUI for Nexus 7

=20


=09
=09

































Hello lian deliang,

MIUI is a Chinese ROM that offers a heavily-modified UI, doing away with ma=
ny of the things we commonly associate with Android. The MIUI ROM is specia=
l. It feels a bit like Apple's iOS but with enough distinctive features tha=
t give it a different sheen. We tested=
it out!


Best regards,
the entire AndroidPIT-Team







App of the Week – OfficeSuite=
Pro 6 + (PDF & HD)




OfficeSuite Pro for Android allows you to view, create, edit, print and sha=
re Word, Excel and PowerPoint files on the go. The app includes a file brow=
ser and integration with sharing service leaders, eleven languages and is t=
he only Android office app that opens password protected files. OfficeSuite=
Pro 6+ is extremely comprehensive and has been chosen to be pre-loaded ont=
o over 50 million devices worldwide for a reason, it is your office documen=
ts on the go.=20

» go to App
Recommend App:»via Email
or on:






Rec=
ommended Apps


Tapatalk HD



Built specifically for the latest Android 4 Ice-cream Sandwich and Jelly Be=
an systems. Tapatalk gives the full tablet experience on forums with split =
views and other interface enhancements that work great on 7=E2=80=9D tablet=
displays or bigger. Among the very useful features are forum Moderation wi=
th stick, open, close, delete, ban and more available options as well as in=
stant notification of subscribed topics, private messages, likes, mentions =
etc.

» go=
to App







CameraPro (CameraX)=
2.0



CameraPro offers unprecedented enhancement to your mobile's camera capturin=
g and video recording features. It is highly customizable and includes diff=
erent designs and menu arrangements. With CameraPro you can control various=
modes such as burst to shoot series of pictures, time lapse, anti-shake, t=
imer, focus, white balance, flash, effects and many others. CameraPro grant=
s you stunning flexibility and control over your phones=E2=80=99 camera.=20

=
» go to App







Exte=
rnal Keyboard Helper Pro



A non visible soft keyboard intended for use with hardware Bluetooth and US=
B keyboards. External Keyboard supports many international key layouts and =
provides multiple configuration options. All layouts are based on standard =
USB Keyboard layouts and it is possible to manually customize mappings. Ext=
ernal Keyboard Helper Pro is incredibly simple and useful and does not requ=
ire a rooted device.

» go to App






App Review – Galaxy Empire (Ad-Free) =E2=80=93 Endless challenges
=





The browser game trend has been going strong for the past few years. Gamers=
unite and forme alliances against other groups of gamers and they all go t=
o battle against one another. Can Galaxy Empire (Ad-Free) tap into this mas=
sively successful market? Find out in our review.

=
» go to test








News –=20
Android 4.1.2 Jelly Bean for Galaxy S2: Download It Here!




Samsung has begun distributing the Android 4.1.2 update OTA across the glob=
e for a little while now. But if you haven't received your update and are g=
etting a little impatient, you can install it right now using the Flash pro=
gram "Odin," which is not at all difficult to use.» go to News












You are receiving this e-mail because you have regist=
ered at www.androidpit.com.You can unsubscribe from the newsletter here.







Home  | 
About us  | 
Terms & Conditions &nbs=
p;| 
Privacy Policy

Tuesday, January 29, 2013

应用发布进展通知(2013年01月29日)

------=_Part_501_6195062.1359421232759
Content-Type: text/html;charset=GB2312
Content-Transfer-Encoding: quoted-printable





.maintable {
=09background-color:#EBF7F8;
=09bordercolor:#9FCCEC;
=09border-top:1px solid #9FCCEC;
=09border-left:1px solid #9FCCEC;
=09width: 60%;
}
.yi_hang_4 {
=09float:left;
=09text-indent: 15px;
=09padding-left: 5px;
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09background-color: #EBF7F8;
=09text-align: right;
}
.titletd {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09text-align: center;
}
.yi_hang_9 {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
=09background-color: #FFFFFF;
}
td {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
}
.noWarp{
=09width:60%;
=09white-space:normal;
=09word-break:break-all;
}
a:visited {
=09color: #000000;
=09text-decoration: none;
}
a:active {
=09color: #FF0000;
=09text-decoration: none;
}
a:link {
=09color: #000000;
=09text-decoration: none;
}
.whitefont {
=09font-family: "=CB=CE=CC=E5";
=09color: #FFFFFF;
}
.menuborder {
=09background-color: #A9D8FC;
=09border: 1px solid #65B8F7;
}
.maintable a:link{
=09color:#0000ff;
=09}

.tablePager a:active{
=09color:#00008B;
}
.maintable a:hovor{
=09color:#0000ff;
}

.maintable a:visited{
=09color:#00008B;
}
.maintable td{
=09=09border-bottom:1px solid #9FCCEC;
=09=09border-right:1px solid #9FCCEC;
=09=09height:25px;
}

=20
=20


=09

=09=09 =D7=F0=BE=B4=B5=C4=BF=AA=B7=A2=D5=DF=A3=A8=C1=AC=B5=C2=C1=C1=A3=
=A9=A3=AC=C4=FA=BA=C3=A3=A1
=09=09
=09=09=09     =CE=C2=DC=B0=CC=E1=CA=
=BE=A3=BA=D6=D0=B9=FA=D2=C6=B6=AF=CE=AA=C4=FA=CC=E1=B9=A9=D5=E6=BB=FA=B2=E2=
=CA=D4=B7=FE=CE=F1=A1=A3=CC=E1=BD=BB=D3=A6=D3=C3=C7=B0=C4=E3=BF=C9=CF=C8=CA=
=B9=D3=C3=B4=CB=B7=FE=CE=F1=D7=F7=D7=D4=BC=EC=A1=A3
=BD=F8=C8=
=EB=D5=E6=BB=FA=B2=E2=CA=D4>>>>

=09=09=09
=09=09=09     =C4=FA=D4=DA=D6=D0=B9=FA=D2=C6=B6=AF=BF=
=AA=B7=A2=D5=DF=C9=E7=C7=F8=B7=A2=B2=BC=B5=C4=D3=A6=D3=C3=D7=EE=BD=FC24=D0=
=A1=CA=B1=C4=DA=D7=B4=CC=AC=B1=E4=BB=AF=C7=E9=BF=F6=C8=E7=CF=C2=A3=BA
=09


=09=09

=09=09

    =09=09 =09=09
    =09=09=09=09 =09=09=09=09
  • =D2=D4=CF=C2=D3=A6=D3=C3=D2=D1=CD=A8=B9=FD=D4=
    =A4=B2=E2=CA=D4=A3=AC=CF=D6=B4=A6=D3=DA=A1=B0=B2=E2=CA=D4=A1=B1=BD=D7=B6=CE=
    =A3=AC=BE=B4=C7=EB=C1=F4=D2=E2=B2=E2=CA=D4=BD=E1=B9=FB=A3=BA
  • =09
    =09=09=09=09=20
    =09=09=09=09 =09
    =09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=20
    =09=09=09=09=09 =09=09=09=09=09
    =09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09=09
    =09=09=09=09
    =D3=A6=D3=C3=C3=FB=
    =B3=C6
    =D3=A6=D3=C3=B4=FA=
    =C2=EB
    =D3=A6=D3=C3=B7=D6=
    =C0=E0

    =09=09=09=09 =D3=EF=D2=F4=C9=E8=D6=C3=BB=CA
    =09=09=09=09=09=09

    =09=09=09=09 =B4=FD=B7=D6=C5=E4
    =09=09=09=09=09=09

    =09=09=09=09 =D3=A6=D3=C3=C8=ED=BC=FE
    =09=09=09=09=09=09

    =09=09=09=09
    =09=09=09=09=09=09 =A3=A8=D7=EE=B6=E0=C1=D015=D0=D0=A3=A9=B8=FC=B6=E0=
    =C7=EB=B5=C7=C2=BD=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=B2=E9=BF=B4
    =09=09=09=09=09=09=09
    =09=09
    =09=09=09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09 =09=09=09
=09
=09



=09=09

=09=09           &nbs=
p; 
=09=09=09 =B4=CB=CE=AA=CF=B5=CD=B3=D7=D4=B6=AF=CD=A8=D6=AA=D3=CA=BC=FE=A3=
=AC=C7=EB=CE=F0=D6=B1=BD=D3=BB=D8=B8=B4=A1=A3=B8=D0=D0=BB=D6=A7=B3=D6=A3=A1
=09=09

=09=09=20
=09=09

=09=09 =D6=D0=B9=FA=D2=C6=B6=AF=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8 &nbs=
p;      
=09=09=09 2013=C4=EA01=D4=C229=C8=D5      &nb=
sp; 
=09=09=09
=09=09=09 =C1=AA=CF=B5=CE=D2=C3=C7      &=
nbsp; 
=09=09=09

=09=09

=09



------=_Part_501_6195062.1359421232759--

Monday, January 28, 2013

网赚应用内付费-paypal

7. 应用内付费
支付宝支持(应用内\网站内) https://b.alipay.com/order/productSet.htm
应用内:只支持企业
网站内:支持个人(网站需备案)+企业

腾讯
paypal
paypal的快速支付应用内支付见此:
https://www.x.com/developers/paypal/products/express-checkout
How to get started
1.Check your account status. Login to PayPal. Go to your PayPal Profile and click My settings. Confirm that your “Account Type” is either Premier or Business, or upgrade your account.
2.Check your API settings. Click My selling tools. Expand “Selling online” if needed and check “API access.” Click Update and Add or edit API permission or View API signature.
3.Test your integration using the PayPal Sandbox. (Registration is free.)




翻译:


 


1.激活取信息


先登陆paypal,再在”My Account” => “Profile”,看下=>”Setting”


image


确认右边的


image


,如果不是”Premier”或”Business”,那就更新一下你的账号类型.


接着确认,”api access”,点击右边的”update”:


image




然后它出现:


image


如果没有"View API signature.",像我这样,就要点"Request API credentials"表示添加一个新的.


下图:点Accept and submit.  左边是说使用用户名密码等方式验证,右边是说使用文件验证.


image


 








好了,出现了相关的账号信息.再点击Done.


2.销售虚拟产品(企业)


参考这里:https://cms.paypal.com/c2/cgi-bin/?cmd=_render-content&content_ID=marketing_c2/digital_goods&fli=true


2.1 打开这里进行注册:https://cms.paypal.com/c2/cgi-bin/?cmd=_render-content&content_ID=marketing_c2/DG_Get_Started&fli=true


点击左下角的”Sign  up”:


image


看了一下,需要填一些企业信息.我没有往下处理了.


3.测试


参考这里:https://www.x.com/developers/paypal/documentation-tools/express-checkout/gs_expresscheckout


4.安装ecshop


错误:

安装进程已中止 隐藏细节
创建配置文件............成功
创建数据库............成功
安装数据............失败


Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\doc\webserver\wwwroot\soft\ecshop\includes\cls_mysql.php on line 165

Warning: date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system'
s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\doc\webserver\wwwroot\soft\ecshop\includes\cls_mysql.php on line 173
OK



解决办法,在php.ini里加上

date.timezone = "Europe/London"

 

未完

应用发布进展通知(2013年01月28日)

------=_Part_1044_24264283.1359334803508
Content-Type: text/html;charset=GB2312
Content-Transfer-Encoding: quoted-printable





.maintable {
=09background-color:#EBF7F8;
=09bordercolor:#9FCCEC;
=09border-top:1px solid #9FCCEC;
=09border-left:1px solid #9FCCEC;
=09width: 60%;
}
.yi_hang_4 {
=09float:left;
=09text-indent: 15px;
=09padding-left: 5px;
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09background-color: #EBF7F8;
=09text-align: right;
}
.titletd {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09color: black;
=09line-height: 1.7em;
=09padding-top: 2px;
=09padding-bottom: 2px;
=09text-align: center;
}
.yi_hang_9 {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
=09background-color: #FFFFFF;
}
td {
=09font-family: "=CB=CE=CC=E5";
=09font-size: 12px;
=09line-height: 1.7em;
}
.noWarp{
=09width:60%;
=09white-space:normal;
=09word-break:break-all;
}
a:visited {
=09color: #000000;
=09text-decoration: none;
}
a:active {
=09color: #FF0000;
=09text-decoration: none;
}
a:link {
=09color: #000000;
=09text-decoration: none;
}
.whitefont {
=09font-family: "=CB=CE=CC=E5";
=09color: #FFFFFF;
}
.menuborder {
=09background-color: #A9D8FC;
=09border: 1px solid #65B8F7;
}
.maintable a:link{
=09color:#0000ff;
=09}

.tablePager a:active{
=09color:#00008B;
}
.maintable a:hovor{
=09color:#0000ff;
}

.maintable a:visited{
=09color:#00008B;
}
.maintable td{
=09=09border-bottom:1px solid #9FCCEC;
=09=09border-right:1px solid #9FCCEC;
=09=09height:25px;
}

=20
=20


=09

=09=09 =D7=F0=BE=B4=B5=C4=BF=AA=B7=A2=D5=DF=A3=A8=C1=AC=B5=C2=C1=C1=A3=
=A9=A3=AC=C4=FA=BA=C3=A3=A1
=09=09
=09=09=09     =CE=C2=DC=B0=CC=E1=CA=
=BE=A3=BA=D6=D0=B9=FA=D2=C6=B6=AF=CE=AA=C4=FA=CC=E1=B9=A9=D5=E6=BB=FA=B2=E2=
=CA=D4=B7=FE=CE=F1=A1=A3=CC=E1=BD=BB=D3=A6=D3=C3=C7=B0=C4=E3=BF=C9=CF=C8=CA=
=B9=D3=C3=B4=CB=B7=FE=CE=F1=D7=F7=D7=D4=BC=EC=A1=A3
=BD=F8=C8=
=EB=D5=E6=BB=FA=B2=E2=CA=D4>>>>

=09=09=09
=09=09=09     =C4=FA=D4=DA=D6=D0=B9=FA=D2=C6=B6=AF=BF=
=AA=B7=A2=D5=DF=C9=E7=C7=F8=B7=A2=B2=BC=B5=C4=D3=A6=D3=C3=D7=EE=BD=FC24=D0=
=A1=CA=B1=C4=DA=D7=B4=CC=AC=B1=E4=BB=AF=C7=E9=BF=F6=C8=E7=CF=C2=A3=BA
=09


=09=09

=09=09

    =09=09 =09=09=09=09
  • =D2=D4=CF=C2=D3=A6=D3=C3=D2=D1=B3=C9=B9=A6=
    =B7=A2=B2=BC=A3=AC=CF=D6=B4=A6=D3=DA=A1=B0=D4=A4=B2=E2=CA=D4=A1=B1=BD=D7=B6=
    =CE=A3=AC=BE=B4=C7=EB=C1=F4=D2=E2=D4=A4=B2=E2=CA=D4=BD=E1=B9=FB=A3=BA
  • =
    =09
    =09=09=09=09=20
    =09=09=09=09 =09
    =09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09=20
    =09=09=09=09=09 =09=09=09=09=09 =09=09=09=09=09=09
    =09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09=09
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09=09
    =09=09=09=09=09 =09=09=09=09=09=09=20
    =09=09=09=09=09 =09=09=09=09=09=20
    =09=09=09=09
    =D3=A6=D3=C3=C3=FB=
    =B3=C6
    =D3=A6=D3=C3=B4=FA=
    =C2=EB
    =D3=A6=D3=C3=B7=D6=
    =C0=E0

    =09=09=09=09 =D3=EF=D2=F4=C9=E8=D6=C3=BB=CA
    =09=09=09=09=09=09

    =09=09=09=09 =B4=FD=B7=D6=C5=E4
    =09=09=09=09=09=09

    =09=09=09=09 =D3=A6=D3=C3=C8=ED=BC=FE
    =09=09=09=09=09=09

    =09=09=09=09
    =09=09=09=09=09=09 =A3=A8=D7=EE=B6=E0=C1=D015=D0=D0=A3=A9=B8=FC=B6=E0=
    =C7=EB=B5=C7=C2=BD=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=B2=E9=BF=B4
    =09=09=09=09=09=09=09
    =09=09
    =09=09=09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09 =09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09=20
    =09=09=09=09 =09=09=09
=09
=09



=09=09

=09=09           &nbs=
p; 
=09=09=09 =B4=CB=CE=AA=CF=B5=CD=B3=D7=D4=B6=AF=CD=A8=D6=AA=D3=CA=BC=FE=A3=
=AC=C7=EB=CE=F0=D6=B1=BD=D3=BB=D8=B8=B4=A1=A3=B8=D0=D0=BB=D6=A7=B3=D6=A3=A1
=09=09

=09=09=20
=09=09

=09=09 =D6=D0=B9=FA=D2=C6=B6=AF=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8 &nbs=
p;      
=09=09=09 2013=C4=EA01=D4=C228=C8=D5      &nb=
sp; 
=09=09=09
=09=09=09 =C1=AA=CF=B5=CE=D2=C3=C7      &=
nbsp; 
=09=09=09

=09=09

=09



------=_Part_1044_24264283.1359334803508--

.

Sunday, January 27, 2013

尝试将android app应用publish发布到amazon market上

1.打开他们的官网:

https://developer.amazon.com/



2.使用amazon的账号登陆,如果没有就注册一个.


3.点击左边的


image


点击右上角的,切换为中文


image



再点击左历的创建账号


中文注册页面自己按自己的情况填.


然后点保存提交.


4.出现协议页面


点击右下角的"接受和继续"


5.下一个页面选择是否收费的账号设置等.如果不收费就直接跳过


  如果收费,下一个页面说"纳税正在审核",我选择了继续.


  下面:

 consent to providing my electronic signature.
I consent to electronic receipt of my information reporting documentation



我的电子签名的同意。
我同意我的信息报告文档的电子收据。


都选YES吧.再点继续.


下一步:

For tax purposes are you a U.S. citizen, U.S. resident, U.S. partnership, or U.S. corporation?



就税务而言,你是一个美国公民,居住在美国,美国的合作伙伴关系,或美国公司?


选择否吧.再点继续


下一步:

Non-U.S. Person

You have selected that you are a non U.S. Person for tax purposes.
Next we will gather your personal or business information.


非美国。人

你选择了,你就税务目的而言是一个非美国人士。
下一步,我们将收集您的个人或商业信息。



再点继续.


下一步,再确认自己的个人信息.选择下一步.


下面一直点继续.因为我们没有税号,没有美国相关证件.


6.然后就可以上传应用了


image

Monday, January 21, 2013

Android sample source–Phonegap TTS Plugin

pkrss used android phonegap tts plugin sample source follow:

/*
* PhoneGap is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2011, IBM Corporation
*
* Modified by Murray Macdonald (murray@workgroup.ca) on 2012/05/30 to add support for stop(), pitch(), speed() and interrupt();
*
*/

package com.phonegap.plugins.speech;

import java.io.File;
import java.util.HashMap;
import java.util.Locale;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.content.Context;
import android.media.AudioManager;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.speech.tts.TextToSpeech.OnUtteranceCompletedListener;
import android.util.Log;

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;
import org.apache.cordova.api.PluginResult;

import pk17s.cn.tts.R;

import pk17s.cn.KdxfTTS;
import pk17s.cn.PkrssActivity;
import pk17s.cn.PkrssPlugin;

public class TTS extends CordovaPlugin implements OnInitListener, OnUtteranceCompletedListener {

private static final String LOG_TAG = "TTS";
private static final int STOPPED = 0;
private static final int INITIALIZING = 1;
private static final int STARTED = 2;
public static TTS sTTS = null;
private TextToSpeech mTts = null;
private int state = STOPPED;

private String startupCallbackId = "";

private JSONArray lanauageList;
private KdxfTTS kdxfTTS;
int currentTTSType = 0; // 0:system 1:kdxftts

private HashMap<String,CallbackContext> Id2callbackContext = new HashMap<String,CallbackContext>();
private String saveCallbackContext(CallbackContext callbackContext){
String callbackId = callbackContext.getCallbackId();
Id2callbackContext.put(callbackId, callbackContext);
return callbackId;
}

private CallbackContext restoreCallbackContext(String callbackId){
CallbackContext callbackContext = Id2callbackContext.get(callbackId);
if(callbackContext!=null)
Id2callbackContext.remove(callbackId);
return callbackContext;
}

@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
PluginResult.Status status = PluginResult.Status.OK;
String result = "";
try {
if (action.equals("speak")) {
String text = args.getString(0);
if (isReady()) {
HashMap<String, String> map = null;
map = new HashMap<String, String>();
map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, saveCallbackContext(callbackContext));
mTts.speak(text, TextToSpeech.QUEUE_ADD, map);
PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("speakLanauageText")) {
if(args.getString(1).equals("System")){
currentTTSType = 0;
int available = mTts.setLanguage(new Locale(args.getString(0)));
if (isReady() && (available != TextToSpeech.LANG_MISSING_DATA) && (available != TextToSpeech.LANG_NOT_SUPPORTED)) {
HashMap<String, String> map = null;
map = new HashMap<String, String>();
map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, saveCallbackContext(callbackContext));
mTts.speak(args.getString(2), TextToSpeech.QUEUE_FLUSH, map);
PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
}
}else if((kdxfTTS!=null) && (kdxfTTS.speakLanauageText(args.getString(0),args.getString(1),args.getString(2),callbackContext))){
currentTTSType = 1;
PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
}
} else if (action.equals("speakLanauageTextToFile")) {
if(args.getString(1).equals("System")==false){
JSONObject error = new JSONObject();
error.put("message",PkrssActivity.s_pkrss.getString(R.string.error_notsupport_current) );
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
String filename = args.getString(3);
if(filename.length()==0){
filename = PkrssPlugin.getDownloadDir();
if(filename==""){
JSONObject error = new JSONObject();
error.put("message",PkrssActivity.s_pkrss.getString(R.string.error_openfile));
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
}

TTS.sTTS = this;
pk17s.cn.OnSaveFileLisnter listener = new pk17s.cn.OnSaveFileLisnter(){
JSONArray mArgs;
private String mcallbackId;
public void init(JSONArray args,String callbackId){
mArgs = args;
mcallbackId = callbackId;
}

public void OnOK(String theFilePath) {
// TODO Auto-generated method stub
try{
if(mArgs.getString(1).equals("System")){
int available = mTts.setLanguage(new Locale(mArgs.getString(0)));
if (isReady() && (available != TextToSpeech.LANG_MISSING_DATA) && (available != TextToSpeech.LANG_NOT_SUPPORTED)) {
HashMap<String, String> map = null;
map = new HashMap<String, String>();
map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, mcallbackId);
mTts.synthesizeToFile(mArgs.getString(2), map, theFilePath);
return;
}
}else if((kdxfTTS!=null) && (kdxfTTS.speakLanauageTextToFile(mArgs.getString(0),mArgs.getString(1),mArgs.getString(2),restoreCallbackContext(mcallbackId)))){
sTTS.onUtteranceCompleted(mcallbackId);
return;
}
sTTS.onCancelCompleted(mcallbackId);
}catch (JSONException e) {
e.printStackTrace();
sTTS.onCancelCompleted(mcallbackId);
}
}

public void OnError() {
// TODO Auto-generated method stub
// onCancelCompleted
sTTS.onCancelCompleted(mcallbackId);
}

};
listener.init(args,saveCallbackContext(callbackContext));
PkrssActivity.s_pkrss.saveToFile(new File(filename),listener);
PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
} else if (action.equals("setMute")) {
Boolean muted = args.getBoolean(0);
AudioManager am = (AudioManager)PkrssActivity.s_pkrss.getSystemService(Context.AUDIO_SERVICE);
if(muted)
am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
else{
int maxVolume = am.getStreamMaxVolume(AudioManager.STREAM_RING);
am.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
am.setStreamVolume(AudioManager.STREAM_RING, maxVolume, AudioManager.FLAG_SHOW_UI + AudioManager.FLAG_PLAY_SOUND);
}
callbackContext.success();
return true;
} else if (action.equals("setVolume")) {
int volume = args.getInt(0);
AudioManager am = (AudioManager)PkrssActivity.s_pkrss.getSystemService(Context.AUDIO_SERVICE);
am.setStreamVolume(AudioManager.STREAM_SYSTEM, volume, 0);
callbackContext.success();
return true;
} else if (action.equals("interrupt")) {
String text = args.getString(0);if (isReady()) {
HashMap<String, String> map = null;
map = new HashMap<String, String>();
map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, saveCallbackContext(callbackContext));
mTts.speak(text, TextToSpeech.QUEUE_FLUSH, map);
PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("stop")) {
if(currentTTSType==1){
if(kdxfTTS != null)
kdxfTTS.Stop();
callbackContext.success();
return true;
}
else if (isReady()) {
mTts.stop();
//if(mTts.isSpeaking()){
// mTts.speak("", TextToSpeech.QUEUE_FLUSH,new HashMap<String, String>());
//}
callbackContext.success();
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("silence")) {
if (isReady()) {
mTts.playSilence(args.getLong(0), TextToSpeech.QUEUE_ADD, null);
callbackContext.success();
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("speed")) {
if (isReady()) {
float speed= (float) (args.optLong(0, 100)) /(float) 100.0;
mTts.setSpeechRate(speed);
callbackContext.success();
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("pitch")) {
if (isReady()) {
float pitch= (float) (args.optLong(0, 100)) /(float) 100.0;
mTts.setPitch(pitch);
callbackContext.success();
return true;
} else {
JSONObject error = new JSONObject();
error.put("message","TTS service is still initialzing.");
error.put("code", TTS.INITIALIZING);
callbackContext.error(error);
return true;
}
} else if (action.equals("startup")) {
if (mTts == null) {
this.startupCallbackId = saveCallbackContext(callbackContext);
state = TTS.INITIALIZING;
mTts = new TextToSpeech(cordova.getActivity().getApplicationContext(), this);
try{
//kdxfTTS = null;
kdxfTTS = new KdxfTTS(PkrssActivity.s_pkrss,this);
}catch(Exception e){
kdxfTTS = null;
}
}
PluginResult pluginResult = new PluginResult(status, TTS.INITIALIZING);
pluginResult.setKeepCallback(true);
callbackContext.sendPluginResult(pluginResult);
return true;
}
else if (action.equals("shutdown")) {
if (mTts != null) {
mTts.shutdown();
}
callbackContext.success();
return true;
}
else if (action.equals("getLanguage")) {
if (mTts != null) {
result = mTts.getLanguage().toString();
callbackContext.sendPluginResult(new PluginResult(status, result));
return true;
}
}
else if (action.equals("getLanguageList")) {
if (lanauageList == null){
// if(args.getBoolean(0)){
lanauageList = new JSONArray();
for(int i=1;i<args.length();++i){
if(mTts != null){
String loc = args.getString(i);
Locale locale = new Locale(loc);
int available = mTts.setLanguage(locale);

if ((available == TextToSpeech.LANG_MISSING_DATA) || (available == TextToSpeech.LANG_NOT_SUPPORTED)) {
// Lanuage data is missing or the language is not supported.
Log.e(LOG_TAG, "Language is not available:"+loc);
//install it?

available = mTts.isLanguageAvailable(locale);
/*
if (available == TextToSpeech.LANG_AVAILABLE) {
AlertDialog.Builder builder = new AlertDialog.Builder(PkrssActivity.s_pkrss);
builder.setMessage("Language missing, install (" + loc + ") speech?")
.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//installera
Intent installIntent = new Intent();
installIntent.setAction(
TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
PkrssActivity.s_pkrss.startActivity(installIntent);
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
}
*/
//not installable
Log.e(LOG_TAG, "Language not installable:"+loc);

} else {

// The TTS engine has been successfully initialized.
JSONObject localeobject = new JSONObject();
JSONArray lanauages = new JSONArray();
JSONObject lanauage = new JSONObject();

lanauage.put("id", "System");lanauage.put("name", "System");

lanauages.put(lanauage);
localeobject.put("locale",loc);
localeobject.put("tts",lanauages);
localeobject.put("downloadCapable",true);
lanauageList.put(localeobject);
}
}
// Note that a language may not be available, and the result will indicate this.

}

if(kdxfTTS != null)
kdxfTTS.getLanauageList(lanauageList);
}

//Intent intent = new Intent();
//intent.setAction("android.speech.tts.engine.CHECK_TTS_DATA");
//intent.setClassName("com.android.settings", "com.android.settings.TextToSpeechSettings");
//PkrssActivity.s_pkrss.startActivity(intent);

// PkrssPlugin.openApp("com.android.settings","com.android.settings.TextToSpeechSettings");// "com.svox.pico"
callbackContext.sendPluginResult(new PluginResult(status, lanauageList));
return true;
}
else if (action.equals("isLanguageAvailable")) {
if (mTts != null) {
Locale loc = new Locale(args.getString(0));
int available = mTts.isLanguageAvailable(loc);

result = (available < 0) ? "false" : "true";
callbackContext.sendPluginResult(new PluginResult(status, result));
return true;
}
}
else if (action.equals("setLanguage")) {
if (mTts != null) {
Locale loc = new Locale(args.getString(0));
int available = mTts.setLanguage(loc);
result = (available < 0) ? "false" : "true";
callbackContext.sendPluginResult(new PluginResult(status, result));
return true;
}
}
callbackContext.success();
return true;
} catch (JSONException e) {
e.printStackTrace();
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
return true;
}
}

/**
* Is the TTS service ready to play yet?
*
* @return
*/
private boolean isReady() {
return (state == TTS.STARTED) ? true : false;
}

/**
* Called when the TTS service is initialized.
*
* @param status
*/
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
state = TTS.STARTED;
PluginResult result = new PluginResult(PluginResult.Status.OK, TTS.STARTED);
result.setKeepCallback(false);
restoreCallbackContext(this.startupCallbackId).sendPluginResult(result);
mTts.setOnUtteranceCompletedListener(this);


//int available = 0;
// available = mTts.setEngineByPackageName("com.iflytek.tts");
//Locale loc = mTts.getLanguage();
//mTts.setLanguage(Locale.CHINESE);
//loc = mTts.getLanguage();
//available = mTts.isLanguageAvailable(Locale.ENGLISH);
//available = mTts.isLanguageAvailable(Locale.US);
//available = mTts.isLanguageAvailable(Locale.CHINA);
//available = mTts.isLanguageAvailable(Locale.CHINESE);
//available = 0;
}
else if (status == TextToSpeech.ERROR) {
state = TTS.STOPPED;
PluginResult result = new PluginResult(PluginResult.Status.ERROR, TTS.STOPPED);
result.setKeepCallback(false);
restoreCallbackContext(this.startupCallbackId).sendPluginResult(result);
}
}

/**
* Clean up the TTS resources
*/
public void onDestroy() {
if (mTts != null) {
mTts.shutdown();
}
}

public void onStop()
{
if(mTts != null){
mTts.shutdown();
}
}

/**
* Once the utterance has completely been played call the speak's success callback
*/
public void onUtteranceCompleted(String utteranceId) {
PluginResult result = new PluginResult(PluginResult.Status.OK);
result.setKeepCallback(false);
restoreCallbackContext(utteranceId).sendPluginResult(result);
}

public void onCancelCompleted(String utteranceId) {
PluginResult result = new PluginResult(PluginResult.Status.OK);
result.setKeepCallback(false);
restoreCallbackContext(utteranceId).sendPluginResult(result);
}
}

Android sample source–TTS 科大讯飞

科大讯飞在语音新闻王的集成源码如下:

package pk17s.cn;

import org.apache.cordova.CordovaWebView;
import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;
import org.apache.cordova.api.PluginResult;
import org.json.JSONArray;
import org.json.JSONObject;

import android.content.Context;
import android.webkit.WebView;

import com.iflytek.speech.SpeechError;
import com.iflytek.speech.SynthesizerPlayer;
import com.iflytek.speech.SynthesizerPlayerListener;

public class KdxfTTS implements SynthesizerPlayerListener {
private SynthesizerPlayer mSynthesizerPlayer;
CallbackContext callbackContext;
private CordovaPlugin plugin;

public KdxfTTS(Context context,CordovaPlugin _plugin){
plugin = _plugin;
mSynthesizerPlayer = SynthesizerPlayer.createSynthesizerPlayer(
context, "appid=4dabf812");
}

public Boolean speakLanauageText(String locale,String role,String text,CallbackContext _callbackContext){

callbackContext = _callbackContext;

mSynthesizerPlayer.setVoiceName(role);

mSynthesizerPlayer.playText(text, null,this);

return true;
}

public Boolean speakLanauageTextToFile(String locale,String role,String text,CallbackContext _callbackContext){

callbackContext = _callbackContext;

mSynthesizerPlayer.setVoiceName(role);

mSynthesizerPlayer.playText(text, null,this);

return true;
}

public void setMute(Boolean muted){

}

public void setVolume(Long volume){

}

public void getLanauageList(JSONArray lanauageList){
try{
JSONArray lanauages = new JSONArray();
JSONObject lanauage = new JSONObject();

lanauage.put("id", "xiaoyan");lanauage.put("name", "讯飞-晓燕");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "xiaoyu");lanauage.put("name", "讯飞-晓宇");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixy");lanauage.put("name", "讯飞-小研");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixq");lanauage.put("name", "讯飞-小琪");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixf");lanauage.put("name", "讯飞-小峰");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixm");lanauage.put("name", "讯飞-小梅");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixl");lanauage.put("name", "讯飞-小莉");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixr");lanauage.put("name", "讯飞-小蓉");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixyun");lanauage.put("name", "讯飞-小芸");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixk");lanauage.put("name", "讯飞-小坤");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixqa");lanauage.put("name", "讯飞-小强 ");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixying");lanauage.put("name", "讯飞-小莹");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vixx");lanauage.put("name", "讯飞-小新");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vinn");lanauage.put("name", "讯飞-楠楠");lanauages.put(lanauage);lanauage = new JSONObject();
lanauage.put("id", "vils");lanauage.put("name", "讯飞-老孙");lanauages.put(lanauage);

JSONObject locale = new JSONObject();
locale.put("locale","zh_CN");
locale.put("tts",lanauages);
locale.put("downloadCapable",false);
lanauageList.put(locale);

locale = new JSONObject();
locale.put("locale","zh_TW");
locale.put("tts",lanauages);
locale.put("downloadCapable",false);
lanauageList.put(locale);

locale = new JSONObject();
locale.put("locale","zh");
locale.put("tts",lanauages);
locale.put("downloadCapable",false);
lanauageList.put(locale);

locale = new JSONObject();
locale.put("locale","en");
locale.put("tts",lanauages);
locale.put("downloadCapable",false);
lanauageList.put(locale);
}catch(Exception e){

}
}

public Boolean Stop(){
if (null != mSynthesizerPlayer) {
mSynthesizerPlayer.cancel();
}
return true;
}

protected void onStop() {
if (null != mSynthesizerPlayer) {
mSynthesizerPlayer.cancel();
}
}

public void onBufferPercent(int arg0, int arg1, int arg2) {
// TODO Auto-generated method stub

}

public void onEnd(SpeechError arg0) {
// TODO Auto-generated method stub
if(arg0 == null){
if(callbackContext!=null){
PluginResult result = new PluginResult(PluginResult.Status.OK);
result.setKeepCallback(false);
callbackContext.sendPluginResult(result);
callbackContext = null;
}
}
}

public void onPlayBegin() {
// TODO Auto-generated method stub

}

public void onPlayPaused() {
// TODO Auto-generated method stub

}

public void onPlayPercent(int arg0, int arg1, int arg2) {
// TODO Auto-generated method stub

}

public void onPlayResumed() {
// TODO Auto-generated method stub

}
}

Sunday, January 20, 2013

转载:Android调用系统分享功能以及createChooser的使用

转载自:http://blog.csdn.net/yanglian20009/article/details/7592117 因为怕下次自己找不到该资料.

工程结构

//效果图  

点击测试分享                                                                                                          点击createChoose妙用

主要是看右边的,可不是用什么Dialog来搞的哦,而是你Activity程序,可以激活进去了

提示:这个东西可以延伸到一个音频文件,打开时,可以调用你的音乐播放器来播放哦,视频,图片,也是类似,可以调用你自己的东西

当然,前提是你的manifest.xml里的东西要配置对呀

<data android:mimeType="mark/nimei" />  

如下

<activity android:name=".TestActivity"
            android:label="你妹啊"
            >
            <intent-filter> 
                <action android:name="android.intent.action.XXMM" /> 
                 <category android:name="android.intent.category.DEFAULT" /> 
                 <category android:name="android.intent.category.OPENABLE" /> 
                 <data android:mimeType="mark/nimei" /> 
            </intent-filter> 
        </activity>
        <activity android:name=".Test2Activity"
            android:label="你妹啊2"
            >
            <intent-filter> 
                <action android:name="android.intent.action.XXMM" /> 
                 <category android:name="android.intent.category.DEFAULT" /> 
                 <category android:name="android.intent.category.OPENABLE" /> 
                 <data android:mimeType="mark/nimei" /> 
            </intent-filter> 
        </activity>

//代码如下:

[java] view plaincopy

  1. package com.mark.share.demo;  
  2. import java.io.File;  
  3. import android.app.Activity;  
  4. import android.content.Intent;  
  5. import android.net.Uri;  
  6. import android.os.Bundle;  
  7. import android.view.View;  
  8. import android.view.View.OnClickListener;  
  9. import android.widget.Button;  
  10. public class AppShareDemoActivity extends Activity  
  11. {  
  12. private Button testshare;  
  13. private Button createChooserBtn;  
  14. @Override
  15. public void onCreate(Bundle savedInstanceState)  
  16.     {  
  17. super.onCreate(savedInstanceState);  
  18.         setContentView(R.layout.main);  
  19.         testshare=(Button) findViewById(R.id.testshare);  
  20.         createChooserBtn=(Button) findViewById(R.id.Test_createChooser);  
  21.         testshare.setOnClickListener(new OnClickListener()  
  22.         {  
  23. @Override
  24. public void onClick(View v)  
  25.             {  
  26.                 Intent intent = new Intent(Intent.ACTION_SEND);  
  27.                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
  28.                 intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File("sdcard/1.png")));  //传输图片或者文件 采用流的方式
  29.                 intent.putExtra(Intent.EXTRA_TEXT, "分享分享微博");   //附带的说明信息
  30.                 intent.putExtra(Intent.EXTRA_SUBJECT, "标题");  
  31.                 intent.setType("image/*");   //分享图片
  32.                 startActivity(Intent.createChooser(intent,"分享"));  
  33.             }  
  34.         });  
  35.         createChooserBtn.setOnClickListener(new OnClickListener()  
  36.         {  
  37. @Override
  38. public void onClick(View v)  
  39.             {  
  40.                 Intent intent = new Intent();  
  41.                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
  42.                 intent.setAction("android.intent.action.XXMM");  
  43.                 intent.setDataAndType(Uri.parse("file:///sdcard/DCIM/cc.mp3"), "mark/nimei");    
  44.                 startActivity(Intent.createChooser(intent, "Select music1 app"));    
  45.             }  
  46.         });  
  47.     }  

OK。。完事儿,回家