为什么在Android上看不到我的照片? (Python / Kivy App)

时间:2016-05-01 16:28:31

标签: android python kivy

我在App上使用kivy。我可以拍照并保存,但不能在Android上查看。好吧,至少在正常的方式...... 我将图片保存在'/ storage / emulated / 0 /'上。我放了一个os.path.isfile来确保文件存在,是的,我得到了真的!在我的手机上使用“文件管理器应用程序”我可以看到这些图片,但是当我使用我的笔记本电脑连接USB电缆时看不到它们,当我在手机上使用“图库”时也没有出现。这是相机的代码:

def chamar_camera(nome,pc,media,objeto,label_passa,instance): agora = datetime.now() nome_arquivo = '/storage/emulated/0/%s_%s_%.4i_%.2i_%.2i_%.2i_%.2i_%.2i.jpg' % (nome,pc,agora.year,agora.month,agora.day,agora.hour,agora.minute,agora.second) def sair(label_passa,instance): if os.path.isfile(nome_arquivo):texto = u'Foto de '+pc+u' armazenada com sucesso\n' else: texto = u'Foto de '+pc+u' nao pode ser armazenada\n' texto = texto + os.getcwdu() label_passa.text = texto camera.take_picture(nome_arquivo, on_complete=partial(sair,label_passa))

有人有同样的问题吗?

0 个答案:

没有答案
相关问题