当用户单击图像的共享按钮时,我试图让"离子"应用程序出现在"共享"列表中.
据我所知,我必须添加类似的东西
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
到了AndroidManifest.xml.我认为,我可以使用cordova-custom-config插件.
然后,我必须以某种方式处理这个意图,这对我来说是棘手的.看起来像目前为意图维护的唯一的cordova插件就是这个.我尝试过这样使用它:
initializeApp() {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.splashScreen.hide();
this.registerBroadcastReceiver();
});
}
private registerBroadcastReceiver(){
window.plugins.intentShim.registerBroadcastReceiver({
filterActions: [
'com.darryncampbell.cordova.plugin.broadcastIntent.ACTION'
]
},
function(intent) {
// Broadcast received
console.log('Received Intent: ' + JSON.stringify(intent.extras));
}
);
}
Run Code Online (Sandbox Code Playgroud)
但是这样我得到一个错误,即window.plugins是未定义的.我真的不知道如何将它与Ionic结合起来. …
有没有办法在 Web Worker 中使用 Canvas 元素?我想在 Web Worker 内部执行 canvas.toBlob 来降低图像质量。
就像也许通过https://github.com/substack/webworkify webworkify 一样?哪个允许在网络工作者中需要其他库?
我要么需要将 canvas 元素传递给 Web Worker,要么在 Web Worker 内部创建一个 canvas 元素,要么找到一种替代方法来降低图像质量。
我想创建一个模块来侦听路线更改,并在路线更改时根据当前路线和转到下一条路线执行给定的动画。基本上它应该解决这个问题:https://github.com/angular/angular/issues/9845
像这样(草稿注释):https://github.com/bergben/ng2-page-transition/issues/6
现在要做到这一点,我想通过组件进入和离开时的路线数据执行给定的动画。该动画可能会根据当前路线和下一条路线而有所不同。例如,切换到/mainfrom/first可能会触发后退动画,而切换到/mainfrom/second可能会触发前进动画。
现在的问题是:如何将此动画绑定到组件并允许其完成?路由器渲染一个像这样的组件:
<router-outlet></router-outlet>
<my-current-component>...</my-current-component>
Run Code Online (Sandbox Code Playgroud)
但在路线改变时,它会立即销毁<my-current-component>...</my-current-component>并用新组件替换它。
我知道将动画绑定到组件装饰器中的主机如下: https: //github.com/designcourse/angular-auth-demo/blob/master/src/app/login/login.component.ts#L11 允许它们去完成。但我无法更改路由更改时的组件(它是一个常量,请参阅https://angular.io/docs/ts/latest/api/router/index/ActivatedRoute-interface.html#!#component-anchor)
我应该提到的是,我发现将另一个元素包裹在渲染的组件周围,例如
<router-outlet></router-outlet>
<div>
<my-current-component>...</my-current-component>
</div>
Run Code Online (Sandbox Code Playgroud)
防止路由器破坏组件。但直接访问 DOM 并不是最佳实践。我只会认为这是最后的手段。如果有人知道如何<div></div>通过 Angular Renderer 或 ViewContainerRef 等来包装组件,那么我很高兴听到这一点。然后我可以将动画绑定到该<div></div>包装器并在动画完成后手动销毁它。
动画应该在不延迟新组件进入动画的情况下执行。
所以我希望有人能够对如何以最好的方式实现这一目标提出想法/建议。
我在我的 Ionic 应用程序中使用Firebase 身份验证。一些用户报告没有收到用户注册后或触发 resendVerificationEmail 时发送的验证电子邮件。
这对于 @gmail.com 或 @live.de 等电子邮件提供商来说效果很好,但对于拥有@gmx.at 等特殊提供商的其他用户来说,它不起作用。根据firebase,电子邮件已成功发送,但从未收到。
可能是邮件被过滤了?还有其他人遇到过这个问题吗?消息模板无法修改,但使用自定义 SMTP 服务器可能有帮助吗?
我想在Heroku上托管Respond CMS,所以我做了:
git clone 响应存储库的heroku 在该文件夹中创建git push heroku master我总是在终端中收到以下错误:
remote: ----->PHP app detected
remote:
remote: ! ERROR: Your 'composer.json' lists dependencies inside 'require',
remote: but no 'composer.lock' was found. Please run 'composer update' to
remote: re-generate 'composer.lock' if necessary, and commit it into your
remote: repository. For more information, please refer to the docs at
remote: https://devcenter.heroku.com/articles/php-support#activation
remote:
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected …Run Code Online (Sandbox Code Playgroud) android ×1
angular ×1
canvas ×1
composer-php ×1
cordova ×1
firebase ×1
git ×1
heroku ×1
html5-canvas ×1
ionic3 ×1
ios ×1
javascript ×1
respondcms ×1
smtp ×1
web-worker ×1