Sub HasFeature (Feature As String) As Boolean
Dim ctxt As JavaObject
ctxt.InitializeContext
Return ctxt.RunMethodJO("getPackageManager", Null).RunMethod("hasSystemFeature", Array(Feature))
End Sub
If HasFeature("android.hardware.touchscreen") Then
Log("Device has a touch screen")
End if
Don't get me wrong. Neither I asked him to solve his problem himself, nor I discouraged him from asking a question. I just told him how he can find the answer quickly. I would have just asked him to search in the forum/google instead as an example I showed him how did I find out the answer to this question. As a developer, I think its good to know how to search for a problem on the internet. Not all the languages or frameworks have a good forum. Sometimes it may happen that something is not working, just for you or that problem occurred to few developers. In that case you need to split the question and search part by part. What if he wants an urgent solution but there is no one up to help him (as we know its a global forum and not all countries have the same time).For goodness sake let the guy ask his question! A Forum is supposed to provide help and definitely should not scare users away or make them too afraid to ask any question.
I am concerned that a lot of newbies are already discouraged from asking a simple (or even not so simple) question. So what if a question gets asked more than once?!
I fully understand his response in Italian. I had the same sentiment when I read what you wrote. My experience is that you can sometimes spend days seaching this huge forum and still not find what you are really looking for. A quick question and a rapid response from a knowledgeable Forum member can save a lot of time and might make this Forum more lively like it used to be years ago... At least that is my opinion. Does this Forum really have to be so strict and "tight" ? Is it really necessary to tell people off with phrases like "The Forum search is working"? Please let's make this forum more vivid in stead of it now being down to less than a dozen (often very complex) entries a day. Give newbies and also others a chance to learn B4A and don't push them in a corner by making them feel ignorant, sloppy for not searching long enough in the forum and blaming them for being inexperienced! Let's all realize that it is extremely difficult to board this B4A train that has been running for nearly 10 years at ever increasing speed. Take a look at the kind of questions that were asked in this forum 5 years ago and compare them to the topics that are being addressed now.
To be honest, I don't understand more than half the questions that I read nowadays in this Forum (and I have been using B4A since 2012) and I would love to occasionally respond to a question that at least I cán answer...
And FYI I know what he replied in Italian.I fully understand his response in Italian.