久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <tfoot id='D1G0N'></tfoot>
    <legend id='D1G0N'><style id='D1G0N'><dir id='D1G0N'><q id='D1G0N'></q></dir></style></legend>

    <small id='D1G0N'></small><noframes id='D1G0N'>

    • <bdo id='D1G0N'></bdo><ul id='D1G0N'></ul>
    1. <i id='D1G0N'><tr id='D1G0N'><dt id='D1G0N'><q id='D1G0N'><span id='D1G0N'><b id='D1G0N'><form id='D1G0N'><ins id='D1G0N'></ins><ul id='D1G0N'></ul><sub id='D1G0N'></sub></form><legend id='D1G0N'></legend><bdo id='D1G0N'><pre id='D1G0N'><center id='D1G0N'></center></pre></bdo></b><th id='D1G0N'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='D1G0N'><tfoot id='D1G0N'></tfoot><dl id='D1G0N'><fieldset id='D1G0N'></fieldset></dl></div>

    2. kivy android 分享圖片

      kivy android share image(kivy android 分享圖片)

            <bdo id='pAfAl'></bdo><ul id='pAfAl'></ul>

            <small id='pAfAl'></small><noframes id='pAfAl'>

          • <tfoot id='pAfAl'></tfoot>
          • <i id='pAfAl'><tr id='pAfAl'><dt id='pAfAl'><q id='pAfAl'><span id='pAfAl'><b id='pAfAl'><form id='pAfAl'><ins id='pAfAl'></ins><ul id='pAfAl'></ul><sub id='pAfAl'></sub></form><legend id='pAfAl'></legend><bdo id='pAfAl'><pre id='pAfAl'><center id='pAfAl'></center></pre></bdo></b><th id='pAfAl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pAfAl'><tfoot id='pAfAl'></tfoot><dl id='pAfAl'><fieldset id='pAfAl'></fieldset></dl></div>
              <tbody id='pAfAl'></tbody>

              <legend id='pAfAl'><style id='pAfAl'><dir id='pAfAl'><q id='pAfAl'></q></dir></style></legend>

              1. 本文介紹了kivy android 分享圖片的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我想創(chuàng)建將使用 android ACTION_SEND 意圖共享圖像的共享按鈕.這是我的代碼:

                I want to create share button that will use android ACTION_SEND intent for sharing image. It's my code:

                from kivy.setupconfig import USE_SDL2
                
                
                def share(path):
                    if platform == 'android':
                        from jnius import cast
                        from jnius import autoclass
                        if USE_SDL2:
                            PythonActivity = autoclass('org.kivy.android.PythonActivity')
                        else:
                            PythonActivity = autoclass('org.renpy.android.PythonActivity')
                        Intent = autoclass('android.content.Intent')
                        String = autoclass('java.lang.String')
                        Uri = autoclass('android.net.Uri')
                        File = autoclass('java.io.File')
                
                        shareIntent = Intent(Intent.ACTION_SEND)
                        shareIntent.setType('"image/*"')
                        imageFile = File(path)
                        uri = Uri.fromFile(imageFile)
                        shareIntent.putExtra(Intent.EXTRA_STREAM, uri)
                
                        currentActivity = cast('android.app.Activity', PythonActivity.mActivity)
                        currentActivity.startActivity(shareIntent)
                

                但它不起作用)它拋出此錯誤 jnius.jnius.JavaException: Invalid instance of u'android/net/Uri' passed for a u'java/lang/String' in這一行 shareIntent.putExtra(Intent.EXTRA_STREAM, uri).我該如何解決這個問題?

                But it doesn't work) It throws this error jnius.jnius.JavaException: Invalid instance of u'android/net/Uri' passed for a u'java/lang/String' in this line shareIntent.putExtra(Intent.EXTRA_STREAM, uri). How can i fix this?

                推薦答案

                我找到了解決方案.您必須將 uri 轉(zhuǎn)換為 parcelable,然后將其傳遞給意圖:

                I found solution. You must cast uri to parcelable and then pass it to intent:

                parcelable = cast('android.os.Parcelable', uri)
                shareIntent.putExtra(Intent.EXTRA_STREAM, parcelable)
                

                這篇關(guān)于kivy android 分享圖片的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動期間獲取當(dāng)前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
              2. <legend id='3zbF2'><style id='3zbF2'><dir id='3zbF2'><q id='3zbF2'></q></dir></style></legend>

                <i id='3zbF2'><tr id='3zbF2'><dt id='3zbF2'><q id='3zbF2'><span id='3zbF2'><b id='3zbF2'><form id='3zbF2'><ins id='3zbF2'></ins><ul id='3zbF2'></ul><sub id='3zbF2'></sub></form><legend id='3zbF2'></legend><bdo id='3zbF2'><pre id='3zbF2'><center id='3zbF2'></center></pre></bdo></b><th id='3zbF2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3zbF2'><tfoot id='3zbF2'></tfoot><dl id='3zbF2'><fieldset id='3zbF2'></fieldset></dl></div>

                • <small id='3zbF2'></small><noframes id='3zbF2'>

                      <bdo id='3zbF2'></bdo><ul id='3zbF2'></ul>
                        <tbody id='3zbF2'></tbody>

                      <tfoot id='3zbF2'></tfoot>
                        • 主站蜘蛛池模板: 在线观看成年人视频 | 成人在线精品视频 | 欧美极品在线播放 | 成人福利网站 | 精品1区2区 | jlzzjlzz国产精品久久 | 中文字幕成人 | 国产精品一区二区不卡 | 欧美成人猛片aaaaaaa | 亚洲精品一二三区 | 精品不卡 | 欧美国产日韩在线观看成人 | 亚洲精品视频网站在线观看 | 国产精品亚洲精品日韩已方 | 色婷婷综合久久久久中文一区二区 | 国产精品一区二区在线播放 | 亚洲一区二区欧美 | 你懂的在线视频播放 | 国产精品一区二区久久精品爱微奶 | 欧美精品一区二区三区在线 | www.久久久.com | 欧美一区二区三区在线观看视频 | 欧美国产视频 | 97精品国产 | 国产精品高清在线 | 久久天天综合 | 日韩一区二区在线观看 | 久久久久久www | 亚洲一区国产 | 高清欧美性猛交 | 国产真实乱对白精彩久久小说 | 亚洲综合国产精品 | 高清国产午夜精品久久久久久 | 男人影音| 国产福利久久 | 欧美一区二区网站 | 国产精品99久久久久久久久久久久 | 免费一级黄 | 国产69久久精品成人看动漫 | 亚洲人人 | 亚洲网在线 |