I want to control the general I/O on pcduino3B. So I decide to do the component expension with the native library which is created by C language. I have succeed in it in AndroidStudio with Ndk support. But in appInventor,I do not know how to generate the Native library and how to use it , Is it the same as the AndroidStudio? I have alreay read the article "https://github.com/mit-cml/ appinventor-sources/pull/137# r18645675" and "How to add a component",But it is just about how to include the native library. Is there anyone who can give me a demo or tips ! thank you very much.
--
Can you explain why you would want to use AppInventor if you already know how to make apps using the Android SDK?
What you could do is make an App Inventor extension, but that is not easy and requires expert App Inventorand Java knowledge.
--
What you could do is make an App Inventor extension, but that is not easy and requires expert App Inventorand Java knowledge.
--
Thank you for your answer !
It is the company project.We want to make some extension components so that the students who know little of java programing can use them to do their creative products.Now when I want to control the general I/O on pcduino3B,I do not know the proper way to do it ,can you give me some tips?
--
It depends on how you want to do the interaction between the App Inventor app and the PCduino3B.
Is it your intention that the App Inventor app runs on the pcduino3B or do you want to interact with the pcduino via Bluetooth or Wifi from an Android phone?
The last would be relatively easy, you write an Arduino type sketch to send and receive commands from the phone, and you use either the BluetoothClient component or the BleutootClientLE extension from AppInventor to communicate.
The first is probably not very feasible.
A while ago there was a discussion about a component someone had made for an UDOO NEO, which is a comparable board I think.
The conclusion was that there should be no integration with App Inventor, because it is not feasible to have components for each and any board that exists. An extension would be much better (but in this case there were changes to the visible part of App Inventor, therefore an extension was not possible).
An extension can be loaded as needed and therefore does not impact other users of App Inventor. You should also be able to use the standard AI.
If you create a new component you create effectively your own version of AI and are on your own after that.
As you already found out, native libraries are not easily integrated into AI and it does not seem to be possible to integrate them in AI extensions.
For more information about extensions: http://ai2.appinventor.mit. edu/reference/other/ extensions.html
Here is a pointer to the UDOO project: https://github.com/mit-cml/app inventor-sources/pull/777
Is it your intention that the App Inventor app runs on the pcduino3B or do you want to interact with the pcduino via Bluetooth or Wifi from an Android phone?
The last would be relatively easy, you write an Arduino type sketch to send and receive commands from the phone, and you use either the BluetoothClient component or the BleutootClientLE extension from AppInventor to communicate.
The first is probably not very feasible.
A while ago there was a discussion about a component someone had made for an UDOO NEO, which is a comparable board I think.
The conclusion was that there should be no integration with App Inventor, because it is not feasible to have components for each and any board that exists. An extension would be much better (but in this case there were changes to the visible part of App Inventor, therefore an extension was not possible).
An extension can be loaded as needed and therefore does not impact other users of App Inventor. You should also be able to use the standard AI.
If you create a new component you create effectively your own version of AI and are on your own after that.
As you already found out, native libraries are not easily integrated into AI and it does not seem to be possible to integrate them in AI extensions.
For more information about extensions: http://ai2.appinventor.mit.
Here is a pointer to the UDOO project: https://github.com/mit-cml/app
--
I developped the component extensions just for pcduino3B. My intension is that App Inventor app runs on the pcduino3B. Because of lacking of java APIs controlling the general I/Os on the pcduino 3B, so I decide to do it by including the Native library.I have already read the informaiton about extensions at the url which you list above .I can create a common component successfully now. But I failed many times when I include Native library .There is little information about this. I wander if the MIT group can give me some tips ?
for questions about programming with the App Inventorsources, please ask in the Open Source Group https://groups.google. com/forum/#!forum/app- inventor-open-source-dev
--
댓글 없음:
댓글 쓰기