OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Jun 15, 2024 12:02 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: PdAndro
PostPosted: Fri May 17, 2024 2:11 am 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 266
Octocontrabass wrote:
You can write a user interface in C if you use NativeActivity. There are a handful of APIs you can use directly from C, but I think you can use JNI to access most (if not all) of the usual Android APIs.


Can you comment on this please:

"You may still need a little Java/Kotlin though, like for onCreate and other stuff."


Top
 Profile  
 
 Post subject: Re: PdAndro
PostPosted: Fri May 17, 2024 10:31 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5217
NativeActivity is the Java code that handles onCreate. You don't need to include any of its code in your app, it's built into Android.

I don't know if there's any "other stuff" you can't do with NativeActivity and JNI, I haven't tried writing an entirely-native-code app yet.


Top
 Profile  
 
 Post subject: Re: PdAndro
PostPosted: Sun May 19, 2024 4:30 am 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 266
Octocontrabass wrote:
NativeActivity is the Java code that handles onCreate. You don't need to include any of its code in your app, it's built into Android.

I don't know if there's any "other stuff" you can't do with NativeActivity and JNI, I haven't tried writing an entirely-native-code app yet.


Thanks for that. Further investigation found some links:

https://github.com/cnlohr/rawdrawandroid

https://developer.android.com/ndk/sampl ... le_na.html

https://stackoverflow.com/questions/329 ... ithout-jni


but in each case, OpenGL is used, which is used for games, not "normal apps". Is that an issue (maybe it's not?)?

Either way - do you know if it is possible to avoid OpenGL regardless?

And finally - one thing I am interested in is for the text on the screen to be "readable" by blind people. So it needs to be text, not graphics, so that they can use inbuilt (to Android) text to speech. So if OpenGL takes that away, or makes it difficult, then that would be a reason to avoid it.

And if that is the case, we are more likely to switch the 800 lines of Kotlin to (presumably?) 800 lines of Java, rather than making things more difficult for blind people.

It makes it more difficult for us to maintain though - as we normally program in C90, not the latest Turtle Graphics fad. But ... blind people.


Top
 Profile  
 
 Post subject: Re: PdAndro
PostPosted: Sun May 19, 2024 1:40 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5217
kerravon wrote:
Either way - do you know if it is possible to avoid OpenGL regardless?

I've never tried it so I don't know if it's possible. If it's possible, you would need to use JNI to access the Java UI APIs.

kerravon wrote:
It makes it more difficult for us to maintain though - as we normally program in C90, not the latest Turtle Graphics fad.

Turtle graphics have been around longer than C.


Top
 Profile  
 
 Post subject: Re: PdAndro
PostPosted: Sun May 19, 2024 8:32 pm 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 266
kerravon wrote:
And I'm about to do a fresh build which means there will be a mismatch likely starting in the next 24 hours until PdAndro copies across the new bios.exe.

PdAndro has finally been republished, so the mismatch has gone, and you now have a Win32 ARM mini-clone. Which will survive Microsoft's threats to remove support for 32-bit ARM apps in a future Win 11 ARM release.

And the old release of Android was managed to be supported. So the pdld author (from Slovakia) is able to run it on his (old) phone.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group