2

Had a normal c code that prints helloworld

#include<stdio.h>
int main(void)
{
 printf("Helloworld");
 return 0;
}

I have to make an app to run this c code on a device running in android without using NDK and JNU for this and output should be in text view .As i am new to android help me regarding this.

IOS DEV
  • 126
  • 5
  • _... output should be in text view_ - does it mean that you want to see traditional app window on the device's screen and it should contain your text? – Sergio Nov 07 '16 at 09:34
  • Yes exactly it should be like that – IOS DEV Nov 07 '16 at 09:36
  • So, in general, there are no straight ways to achieve what you want. Using of standard system-wide GUI means that your app must be a traditional android app with your subclass of `Activity`, that shows `TextView`. And as result your code must interact with that activity somehow. It may be JNI, or pipes (if you decide to run it in separate process). Meanwhile, you can compile your code into tiny console app and run it directly on device via `adb shell`. – Sergio Nov 07 '16 at 10:04
  • [Building executables for Android shell](http://stackoverflow.com/questions/35231168/building-executables-for-android-shell/35275134#35275134) – Onik Dec 24 '16 at 21:41

0 Answers0