国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Android QPython3 擴展:基礎(chǔ)窗口

2021-01-02 18:53 作者:乘著船  | 我要投稿

#需要android.py??https://www.bilibili.com/read/cv8679914

#請先學習Android QPython3調(diào)用其他Android App??http://www.bilibili.com/read/cv8781928


QPythonSupport/app/src/main/AndroidManifest.xml


<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

? ? package="czc.qpython.support" >

? ? <application

? ? ? ? android:allowBackup="true"

? ? ? ? android:icon="@drawable/ic_launcher"

? ? ? ? android:label="@string/app_name"

? ? ? ? android:theme="@style/AppTheme"

? android:resizeableActivity="true">

? ? ? ? <activity

? ? ? ? ? ? android:name=".Main"

? ? ? ? ? ? android:label="@string/app_name_cn" >

? ? ? ? ? ? <intent-filter>

? ? ? ? ? ? ? ? <action android:name="android.intent.action.MAIN" />

? ? ? ? ? ? ? ? <category android:name="android.intent.category.LAUNCHER" />

? ? ? ? ? ? </intent-filter>

? ? ? ? </activity>


? ? </application>

?<uses-permission android:name="android.permission.INTERNET" />

?<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />?

?<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />?

</manifest>


QPythonSupport/app/src/main/java/czc/qpython/support/Main.java


package czc.qpython.support;

import android.app.*;

import android.os.*;

import android.*;

import android.content.pm.*;


public class Main extends Activity

{


?@Override

?public void onCreate(Bundle savedInstanceState)

?{

? // TODO: Implement this method

? requestPermissions(this);

? super.onCreate(savedInstanceState);

?}


?public static String[] PERMISSIONS_STORAGE = {

? Manifest.permission.READ_EXTERNAL_STORAGE,

? Manifest.permission.WRITE_EXTERNAL_STORAGE }; //Android6.0以后操作系統(tǒng)的動態(tài)權(quán)限申請


?//用于Android6.0以后的操作系統(tǒng),動態(tài)申請存儲的讀寫權(quán)限

?public static void requestPermissions(Activity context){

? //用于Android6.0以后的操作系統(tǒng),動態(tài)申請存儲的讀寫權(quán)限

? int permission = context.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE);

? if (permission != PackageManager.PERMISSION_GRANTED){

? ?context.requestPermissions(PERMISSIONS_STORAGE,1);

? }

?}


}


QPythonSupport/app/build.gradle


apply plugin: 'com.android.application'


android {

? ? compileSdkVersion 23

? ? buildToolsVersion "23.0.0"


? ? defaultConfig {

? ? ? ? applicationId "czc.qpython.support"

? ? ? ? minSdkVersion 14

? ? ? ? targetSdkVersion 23

? ? ? ? versionCode 1

? ? ? ? versionName "1.0"

? ? }

? ? buildTypes {

? ? ? ? release {

? ? ? ? ? ? minifyEnabled false

? ? ? ? ? ? proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

? ? ? ? }

? ? }

}


dependencies {

? ? compile fileTree(dir: 'libs', include: ['*.jar'])

}


QPythonSupport/__init__.py


#請先閱讀說明文件


from android import *


QPythonSupport/說明.txt


需要android.py;

需要通過AIDE編譯生成QPythonSupport.apk,然后安裝Apk;

安裝Apk后,進入應用,是一個空白界面,如果有存儲授權(quán)申請,點“始終允許”即可,其他什么都不用做;

復制QPythonSupport到site-packages中,該Apk僅在QPython調(diào)用時生效。


調(diào)用方法:

? from QPythonSupport import *


可用QPython函數(shù):


#請聽下回分解



說明:

QPythonSupport主窗口,
是一個空白界面。
如果有存儲授權(quán)申請,
點“始終允許”即可。

視頻:https://www.bilibili.com/video/BV1wi4y1w7e7

作者:乘著船@Bilibili

更多文章+下載鏈接:https://www.bilibili.com/read/readlist/rl321663


Android QPython3 擴展:基礎(chǔ)窗口的評論 (共 條)

分享到微博請遵守國家法律
抚宁县| 柳河县| 册亨县| 商水县| 易门县| 延安市| 遵义市| 遂宁市| 德保县| 保康县| 新蔡县| 铜陵市| 上思县| 平阴县| 光泽县| 铁岭市| 嘉义县| 凤山县| 绍兴市| 焉耆| 巨野县| 宜黄县| 开鲁县| 西乌| 新邵县| 扎兰屯市| 精河县| 西平县| 安龙县| 舟曲县| 来安县| 碌曲县| 界首市| 章丘市| 鹿邑县| 邓州市| 仙桃市| 昌江| 池州市| 平湖市| 成都市|