finish

How to close android app in Delphi-XE5 Firemonkey application?

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have this piece of code procedure TFormMain . FormCloseQuery ( Sender : TObject ; var CanClose : Boolean ); var msg : String ; begin msg := 'Do you really want to exit?' ; if MessageDlg ( msg , TMsgDlgType . mtConfirmation , [ TMsgDlgBtn . mbYes , TMsgDlgBtn . mbNo ], 0 ) = mrNo then CanClose := False else CanClose := True ; { FIXME : don 't want to work on Android } end; It works perfectly on Windows. Application closes if I choose 'Yes'. However, application does NOT close on Android. What I am doing wrong? 回答1: Having the

Soundcloud HTML5 Player: Events.FINISH only fired once

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the SC HTML5 player, when one sound finishes, I load in another source, however the FINISH event only seems to fire for the first song, my code is as follows //Set the source document.getElementById("sc-widget").src = scPath; //get the widget reference var widgetIframe = document.getElementById('sc-widget'), widget = SC.Widget(widgetIframe); //set the finish event widget.bind(SC.Widget.Events.FINISH, endSC); function endSC() { var scPath = "http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1848538&show

Close application and remove from recent apps/

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know this question is common and asked many times on Stack Overflow, but after visiting nearly the four pages of search engine results and nearly the 20 question of Stack Overflow regarding this issue, I found that none of them is resolved or answered correctly. What I want: I want to show my app in recent apps list when it is running but when I close app then my process should be killed and application should be removed from recent apps list. Some answers I found: use System.exit(0); //doesn't clear app from recents OR use android.os

Android app doens't call “onDestroy()” when killed (ICS)

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm developing an android app using bluetooth communication (using a propetary protocol) and I need to catch the moment when the app is killed. I wanted to use the "onDestroy()" method but it isn't called every time the app is killed. I noticed that it is called when I press the back button and, only sometimes, when I kill the app from the task manager. The question is: How can I catch the moment before the app is killed? Here is the code I tried to use: @Override public void onDestroy() { sendMessage(msg); Log.d("SampleApp", "destroy");

exit entire app at once

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have used the code from here in my app, when I click on 'Cancel' option ,the app just minimizes ,when I long press and hold Home button and select the app.It shows the same screen not the splashscreen or the usual way the app starts - So I am assuming it just takes me to home screen. I am looking for a way I can close the main activity completely. I have tried the following methods and it crashed every time: finish(); mainactivity.class.finish(); opening an intent which has systemexit() setresult() in the another activity. 回答1: Not

VueJs Async loading templates

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I Am building my first VueJs App and I want to asynchronous load my template. In our framework we have our templates stored in a database, that's why. It is working until I have some nested dom-elements in my template without any data bound to it. So my my Vuejs is like: var app = new Vue({ el: '#app', data: { finish: false, template: null }, render: function(createElement) { if (!this.template) { return createElement('div', 'loading...'); } else { return this.template(); } }, mounted() { var self = this; $.post('myUrl', {foo:'bar'},

how to achieve something like “finish” in a non-activity class in android?

匿名 (未验证) 提交于 2019-12-03 00:54:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: This dialog asks whether you want to install some other app...so when onclicked no button it must go back to the previous screen downloadDialog . setNegativeButton ( stringButtonNo , new DialogInterface . OnClickListener () { public void onClick ( DialogInterface dialogInterface , int i ) { finish (); } }); this gives the error: The method finish() is undefined for the type new DialogInterface.OnClickListener(){} how can i achieve what i wanted??? package com . Android . barcode ; import android . app . Activity ; import android .

GNS3的安装过程

匿名 (未验证) 提交于 2019-12-03 00:14:01
GNS3的安装过程 一:为什么要安装GNS3 GNS3是一款可以运行在多平台的网络虚拟软件,可以通过它来完成相关的实验模拟操作或者检验真实的路由器上实施的相关操作。 二:安装环境 1、系统版本:windows 10(其他系统也行) 2、客户端版本:GNS3-1.3.10-all-one 三:安装步骤 这里我把安装包的链接放在这,大家可自行下载 https://pan.baidu.com/s/1hNYQqWmDYWry23h_62QHlA (提取码dwpi) 1、打开之后是这样子的,双击GNS3-1.3.10-all-in-one 2、点击NEXT,再点击I Agree 3、出现Choose Star Menu Folder界面,自动生成不需要修改,点击Next 4、进入Choose Components界面,这个地方注意要把Wireshark 1.21.1和SolarWinds Response 前面的勾去掉,否则它会自动在线安装,需要等好长时间,到最后可能还会告诉你下载失败,这个后面再进行安装就行了。点击Next 5、进入这个界面,里面会有一个选择路径,按照个人习惯放。我是选择放在D盘,点击Insall安装 6、点击Insall之后会弹出WinPcap 4.1.3的安装,点击Next, ![] 7、点击I Agree,再点击Insall,再点击Finish,等待安装 8

网页文件断点上传

匿名 (未验证) 提交于 2019-12-03 00:08:02
分两种情况,一种是在相册库里直接获取,一种是调用相机。如果是通过UIImagePickerView来获取(细节不详述,网上一大堆),我们会发现当你选定一个视频的时候,会出现图1的压缩页面,最后我们的app获取的视频就是这个经过压缩后的视频(不是视频库里的原始视频,这里有个注意点,操作完该压缩视频后记得释放,系统不会帮你释放的,需要你手动来操作,下面会说到),然后通过UIImagePickerView的协议方法中的- ( void )imagePickerController:( UIImagePickerController NSDictionary fileInfo = { } UIImagePickerControllerMediaType是选取文件的类型,如KUTTypeImage,KUTTypeMovie。这里注意一下movie和video的区别,一个是有声音的视频文件,一个是没有声音的视频文件,当然还有Audio是只有声音没有视频。UIImagePickerControllerMediaURL是视频的URL(如果是相机拍摄的,那么这个就是原始拍摄得到的视频;如果是在相册库里选择的,那就是压缩之后生成的视频),注意这个URL不指向相册库,通过这个URL你可以操作这个视频如删除,拷贝等,可以获取压缩后的视频的大小

布线问题-分支限界法

匿名 (未验证) 提交于 2019-12-02 23:43:01
2019独角兽企业重金招聘Python工程师标准>>> 问题描述:   印刷电路板不限区域划分成n*m个方格阵列。如下图所示   精确的电路布线问题要求确定连接方格a的中点,到连接方格b的中点的最短布线方案。   布线时,电路只能沿直线或直角布线。为了避免线路相交,已布的线的方格做了封锁标记,其他线路不允许穿过被封锁的方格。 分支限界法的解决方案:    首先 , 从起始位置a开始,将它作为第一个扩展结点。与该节点相邻,并且可达的方格成为可行结点被加入到活节点队列中,并且将这些方格标记为1.     即从起始方格a到这些扩展方格距离为1.    然后 , 从活节点队列中取出队首结点作为下一个扩展结点,并将于当前扩展结点相邻且为未标记过的方格标记为2,并存入或节点队列。    最后 , 这个过程一直到算法搜索到目标方格b或活结点队列为空时截止。 实现方案:   初始定义position,私有变量row,col,显示方格 行 列。   grid[i][j]表示方格阵列的 0 : 开放, 1 :封锁。      2个方格相同,则不必计算,直接返回最小距离。     否则,设置方格围墙,初始化位移矩阵offset。     表示距离时,0,1已经使用,直接从2开始。因此所有距离最后都要减2.  算法描述    bool FindPath ( Position start ,