Add uses-feature Annotation

Hi developers,
Please add annotation for uses-feature as i am making live wallpaper extension that need

<uses-feature android:name="android.software.live_wallpaper" android:required="true" />

Until the annotation gets merged, you can try this:

@UsesPermission(name = "android.permission.INTERNET\" />\n<uses-feature android:name=\"android.software.live_wallpaper\" android:required=\"true")

This might not work, but you should give it a try.

1 Like

@pavi2410 it not worked..
one more thing i thing you wrote name instead of permissionNames.. like this @UsesPermission(permissionNames = ".................")

Also getting this error

at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONArray.<init>(JSONArray.java:127) at org.json.JSONTokener.nextValue(JSONTokener.java:366) at org.json.JSONObject.<init>(JSONObject.java:214) at org.json.JSONTokener.nextValue(JSONTokener.java:363) at org.json.JSONArray.<init>(JSONArray.java:115) at org.json.JSONArray.<init>(JSONArray.java:144) at com.google.appinventor.components.scripts.ExternalComponentGenerator.main(ExternalComponentGenerator.java:58) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:218) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155) at org.apache.tools.ant.taskdefs.Java.run(Java.java:861) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) at org.apache.tools.ant.Task.perform(Task.java:350) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.Target.performTasks(Target.java:470) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401) at org.apache.tools.ant.Project.executeTarget(Project.java:1374) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1264) at org.apache.tools.ant.Main.runBuild(Main.java:827) at org.apache.tools.ant.Main.startAnt(Main.java:223) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

You'll probably need to double-escape the quotes in the "permission names" as I think the JSON generator takes them verbatim (a quote is not valid in a permission name generally) and this breaks the JSON serialization.