English 中文(简体)
开放式定制照相机,拍摄照片,拯救生命,发送照片
原标题:Open custom camera, take picture, save picture, send picture

我当时在安乐器照相机(NOT)上有一个问题,该机是用摄像机提供的。 不允许我使用。 我试图做的是,允许用户瞄准照相机,并选择“Send”号。

我没有任何问题得到实施。 如果我要求它用一个纽子点的点击发送一些东西,它就会发出。 如果我告诉照相机在不发送照片的情况下挽救照片,那就这样做了。

当我试图这样做时,我就陷入了一个问题。 现行法典:

 public boolean onOptionsItemSelected(MenuItem item) {
        Intent i;
        File file2;
        camera.takePicture(null, mPictureCallback, mPictureCallback);
        switch (item.getItemId()) {

        case R.id.save:
            return super.onOptionsItemSelected(item);

        case R.id.send:

            file2 = new File(filename);
            i = new Intent(Intent.ACTION_SEND);
            i.putExtra(Intent.EXTRA_SUBJECT, "Sample Picture");
            System.out.println("file//" + file2);
            i.putExtra(Intent.EXTRA_STREAM, Uri.parse("file//" + file2));
            i.setType("image/png");
            startActivity(Intent.createChooser(i, "Email file"));
            finish();
            return super.onOptionsItemSelected(item);

照相机“立点”或“浮标”,如正在拍摄照片,然后立即打开邮件客户的选择。 当我选择我想用电子邮件的话,就是说,这个地点是无效的。 然而,如果我去掉电子邮件选择者的那部分,那么形象就会适当挽救,而且确实存在。

几乎就像它正在绕过这一照相机步。

当然,解决这一问题是简单明了的,但现在我刚刚拥有一个弱智的人才,而且可能因为树木而 see着森林。 (即便是这样说的话)。

Do I run the camera part on another thread?

An idea I had was to use a boolean to check for the file s existence and size, but I am unsure how to make the program check that over and over again until it returns true.

最佳回答

我猜测可能发生的情况是,你的追随是在一个单独的路面上发生的。 因此,你的“开放式邮件客户”行动是在你的形象仍然得到拯救的时候发生的。 你们应当尝试的是,如果你正在派任或派任,就会有某种旗帜。 在你打开照相机之前,在你当选的星座中确定这一点。 然后,在您的辞退中,你的行动意图(或拯救行动)

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签