index.uts 390 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import { onAppTrimMemory } from "io.dcloud.uts.android";

export function onMemoryWarning(callback: (res:Number) => void) {
	// console.log("here");
	onAppTrimMemory((level:Number) => {
		console.log(level);
		callback(level);
	});
	// return ;
}


export function offMemoryWarning(success: (res: any) => void) {
	// TODO 没有实现卸载监听
	let ret = {
		code:0
	}
	success(ret);
}