Posts

Showing posts with the label app development in sketchware app

Apk share

Image
  T This page will show how to share apk in sketchware project. T 1.Add an button button1 in your sketchware project. 2.In on create activity add an add source directly block  1. In add source directly block paste the code as shown below: StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build()); if(Build.VERSION.SDK_INT>=24){ try{ java.lang.reflect.Method m = StrictMode.class.getMethod( "disableDeathOnFileUriExposure"); m.invoke(null); } catch(Exception e){ showMessage(e.toString()); } } 3.In more block area create an block share In moreblock add an add source directly block,in add source directly block add the code shown below InIn android.content.pm.ApplicationInfo app = getApplicationContext().getApplicationInfo(); String filePath = app.sourceDir; Intent intent = new Intent(Intent.ACTION_SEND); i