I Don't Know Java Please Help Me


What Do We Write This Code In Java

Why you don’t Google it. You will definitely get something…

Look here. I learned from here…

https://www.edureka.co/community/6308/java-sending-http-parameters-via-post-method-easily

1 Like
String sql = "something";
String query = "something";
List a = Arrays.asList("Context-Type", "Application/x-www-form-urlencoded");
List b = Arrays.asList(a);
Web web = new Web();
web.Url("your url");
web.RequestHeaders(YailList.makeList(b));
List key = Arrays.asList("key", web.UriEncode(sql));
List queryy = Arrays.asList("query", web.UriEncode(query));
List requestData = Arrays.asList(key, queryy);
web.PostText(web.BuildRequestData(requestData));

you have to import -

com.google.appinventor.components.runtime.Web;
java.util.List;
java.util.Arrays;

@luv.ak.tech , first of all you should never post the readymade code or blocks because people don’t learn much from them.
And also,

AFAIK, (didn’t know exactly) it will not work because web super constructor is protected class , mean can only be accessed in sub classes and same package.

4 Likes

blocks (6)
How To Add Like The Response Code

As Sumit has already said,

As your topic says, “You don’t know Java” then why you wanted to create an extension.

I suggest you learn java first. There are many free courses available in internet.

1 Like

I sometimes wonder why users want to make an extension of something that can easily be done with standard blocks and components? If users are going to use your extension and you stop the development or don’t fix bugs they have a problem.

12 Likes