Mobile Celestia for Android

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #21by Markerz » 31.03.2020, 01:04

SevenSpheres wrote:specifically when I type certain letters, such as "m"
well I still receive no report on AppCenter where it should collect all the crash reports. be sure to relaunch Celestia after crash to ensure a crash report will be sent

SevenSpheres wrote:I also installed Vision's Milky Way center addon to "Android/data/space.celestia.mobilecelestia/files/CelestiaResources/extras" as Markerz said, and I'm unable to find any of the objects from that addon in the search.
OK, let's just make sure you follow these steps to include an add-on
1. Launch app, for the first time, it should ask for permission to your file, click yes
2. Quit app (terminate in app switcher)
3. Copy add-on files and folders to Android/data/space.celestia.mobilecelestia/files/CelestiaResources/extras/, this destination folder folder should be created by Celestia itself after first launch and you clicked yes.
4. Relaunch your app, it should show the loading splash again

BTW, in this beta I also ochanged the package name from MobileCelestia to mobilecelestia as suggested. I'm not sure if Android filesystem is case sensitive, so it's better to be sure to delete previous version

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #22by SevenSpheres » 31.03.2020, 01:47

Markerz wrote:be sure to relaunch Celestia after crash to ensure a crash report will be sent

I just made Celestia crash and relaunched it. Look and see if there's a report.

Markerz wrote:OK, let's just make sure you follow these steps to include an add-on
1. Launch app, for the first time, it should ask for permission to your file, click yes
2. Quit app (terminate in app switcher)
3. Copy add-on files and folders to Android/data/space.celestia.mobilecelestia/files/CelestiaResources/extras/, this destination folder folder should be created by Celestia itself after first launch and you clicked yes.
4. Relaunch your app, it should show the loading splash again

Yep, that's what I did, and I can't find "Sgr A*" or any of the other objects from the addon.

Added after 1 minute 27 seconds:
Wait, I must have done something wrong, since the addon folder is empty? Let me figure this out.

Added after 7 minutes 34 seconds:
Okay, I don't know what I did wrong before, but the Milky Way center addon is now working for me (although attempting to search for "Sgr A*" is now causing a crash as well).
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #23by Markerz » 31.03.2020, 02:16

SevenSpheres wrote:I just made Celestia crash and relaunched it. Look and see if there's a report.

OK I assume the crash happened in C/C++ code instead of the UI part. it turns out AppCenter need to be configured in a way to accept crash in C/C++ code. Without it, only UI crash would be reported, that's why it still is not showing up.

I'll post here a version later with it correctly configured.

Added after 2 hours 47 minutes:
SevenSpheres wrote:I just made Celestia crash and relaunched it. Look and see if there's a report.

Ok I've re-released a version correctly configured to upload C/C++ crashed, please download from the same link, reinstall, and reproduce the issue.

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #24by Lafuente_Astronomy » 31.03.2020, 07:04

Markerz wrote:Here's a screenshot running Vision's add-on

That looks nice! I'm currently downloading it both for BlueStacks and my mobile phone. I'll also test adding Vision's addons to both, though I may have to find a way to add files in BlueStacks

But either way, I personally think that Vision would be very flattered for you to use his addon as an example. Just saying

Added after 27 minutes 40 seconds:
Also Markerz, is it possible for you to enable the app to save its data progress so that everytime I leave the app and then return to it, it does not have to restart everytime? Thanks in advance
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #25by Markerz » 31.03.2020, 08:51

Lafuente_Astronomy wrote:Also Markerz, is it possible for you to enable the app to save its data progress so that everytime I leave the app and then return to it, it does not have to restart everytime?

In this case, probably app is killed by system due to shortage of memory or other system resources in the background, I'll see if there is anything I could do

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #26by Lafuente_Astronomy » 31.03.2020, 12:24

Hello Markerz

Well, while using the 2 fingers to zoom-in and zoom-out is good, it actually results in a weird attempt to do so, and users may lose focus of the object when doing that. It happened to me when I was zooming out of an object, and instead of zooming out smoothy, the camera kept moving zigzagged until the object was below the camera, and thus, out of focus. Not to mention, sometimes the phone's touchscreen would assume that only 1 finger is touching, and as a result, I would accidentally rotate the object

So, maybe you've planned for it or not but could you also add buttons for zoom-in and zoom-out? Or better yet, could you make a popout-style, tab-style status bar which has buttons that control time, feature enabling, zoom-in and zoom-out, actions to be done and the like? It can be separate from the status and search features. For reference, I'll use SkySafari's bar as an example here:
Example for Markerz.png


Of course, I'm not saying you should copy them. For all intents and purposes, Celestia is superior to SkySafari in most aspects. Just that, a little application of a user-friendly interface is absolutely a good idea. But it's just my humble suggestion

Thanks in advance
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #27by SevenSpheres » 31.03.2020, 16:18

Markerz wrote:Ok I've re-released a version correctly configured to upload C/C++ crashed, please download from the same link, reinstall, and reproduce the issue.

Done.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #28by Markerz » 01.04.2020, 01:09

SevenSpheres wrote:Done.
I found the cause, I suspect it's related to threading. I used getObjectCompletion for search, which should cause a race if it is called not on the same thread as CelestiaCore's tick? @onetwothree, any thoughts?

Added after 12 minutes:
Lafuente_Astronomy wrote:Well, while using the 2 fingers to zoom-in and zoom-out is good, it actually results in a weird attempt to do so, and users may lose focus of the object when doing that. It happened to me when I was zooming out of an object, and instead of zooming out smoothy, the camera kept moving zigzagged until the object was below the camera, and thus, out of focus. Not to mention, sometimes the phone's touchscreen would assume that only 1 finger is touching, and as a result, I would accidentally rotate the object

the moving around thing during zoom in/out is a bit annoying I had to admit. there are some other schemes for the interactions I've considered, and I think we could poll on which one most of us like, I'll list it here.

So there will be at most 3 gestures, one finger pan/two finger pan/pinch.

Scheme 1:
Current implementation, one finger pan to rotate, two finger pan to move, pinch for zooming in/out. This is taken from Apple's Reality Composer

Scheme 2:
one finger pan to move, two finger pan to rotate, pinch for zooming in/out. this avoids losing focus during pinch (takes two fingers)

Scheme 3:
Same as 1, remove pinch, use buttons instead for zooming in and out.

Scheme 4:
Same as 2, remove pinch, use buttons instead for zooming in and out.

Scheme 5:
Remove two finger pan, keep one finger pan (add a button to toggle whether to rotate or move) and pinch

Scheme 6:
Remove two finger pan and pinch, keep one finger pan (add a button to toggle whether to rotate or move), buttons to zoom in/out

I would actually be more inclined to scheme 5, two finger pan is not a common gesture.

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #29by Lafuente_Astronomy » 01.04.2020, 01:52

Markerz wrote:Scheme 3:
Same as 1, remove pinch, use buttons instead for zooming in and out.

Scheme 4:
Same as 2, remove pinch, use buttons instead for zooming in and out.

What would be the difference between Scheme 3 and Scheme 4? Also, I'm more inclined to either of them until you tell me the difference

Added after 1 minute 34 seconds:
Nevermind. But I think Scheme 3 will work?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Post #30by Joey P. » 01.04.2020, 04:17

Finally, we are getting this!

Some suggestions though - if you're going to code this for apple, then do make sure that it's compatible for older devices - I have an old phone and don't want to update it. I can install apps from a TV network that I hate so much, yet I can't even get Nickelodeon apps. But back to topic - if this gets coded for apple, then make it compatible for older devices!
Joey P.

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #31by Lafuente_Astronomy » 01.04.2020, 04:29

Joey P. wrote:Some suggestions though - if you're going to code this for apple, then do make sure that it's compatible for older devices - I have an old phone and don't want to update it. I can install apps from a TV network that I hate so much, yet I can't even get Nickelodeon apps. But back to topic - if this gets coded for apple, then make it compatible for older devices!

If you're talking about iOS, there's a separate thread for that: viewtopic.php?f=4&t=20191&hilit=mobile+celestia+for+ios
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #32by Markerz » 01.04.2020, 07:49

Lafuente_Astronomy wrote:Nevermind. But I think Scheme 3 will work?

they are all feasible, the thing is which is best for everyone, or most people

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #33by onetwothree » 01.04.2020, 08:22

Markerz wrote:I found the cause, I suspect it's related to threading. I used getObjectCompletion for search, which should cause a race if it is called not on the same thread as CelestiaCore's tick? @onetwothree, any thoughts?

Frankly speaking, i'm not familiar with this part of Celestia, I just once fixed one bug in it, @pirogronian actually made changes to completion routines. But I'll try to investigate what's going there.

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #34by Markerz » 01.04.2020, 09:15

onetwothree wrote:Frankly speaking, i'm not familiar with this part of Celestia, I just once fixed one bug in it, @pirogronian actually made changes to completion routines. But I'll try to investigate what's going there.

sorry, i just found out that this is related to another crash. The cause should be allocating too many JNI objects for search, I'll limit the search result number

here's another report
I guess here viewing info for a star? @SevenSpheres

Code: Select all

Thread 0:
0   Star::getPosition(double) const [0x9d39dff8] in star.cpp:1008
       r0 = 0xbe25b020   r1 = 0x9a021c70
       r2 = 0x310d7ef5   r3 = 0x4142c29e
       r4 = 0xb93ea6d0   r5 = 0xb6d10e50
       r6 = 0x310d7ef5   r7 = 0xbe25b070
       r8 = 0xbe25b0c0   r9 = 0x310d7ef5
      r10 = 0x12fb94e0  r12 = 0x9d6bdf94
       fp = 0x4142c29e   sp = 0xbe25afd8
       lr = 0x9d39e029   pc = 0x9d39dff8

SIGSEGV /SEGV_ACCERR, it should be related to using dereferenced object?

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #35by onetwothree » 01.04.2020, 10:04


pirogronian
Developer
Posts: 234
Joined: 05.01.2018
Age: 38
With us: 6 years 4 months
Location: Wrocław
Contact:

Post #36by pirogronian » 01.04.2020, 10:12

Markerz wrote:I found the cause, I suspect it's related to threading. I used getObjectCompletion for search, which should cause a race if it is called not on the same thread as CelestiaCore's tick?

I didnt know Celestia uses threading at all. I thought it uses loop reading messages from a queue provided by OS. Not sure how on Android, but most other UIs I know is implemented this way.
Still formally developer, but too tired to develop. I feel sad, but Celestia is going forward despite it.
Btw, the universe is ruled by electricity.

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #37by Markerz » 02.04.2020, 01:19

pirogronian wrote:I didnt know Celestia uses threading at all. I thought it uses loop reading messages from a queue provided by OS. Not sure how on Android, but most other UIs I know is implemented this way.

Nevermind. my mistake, it is not related to threading :smile:

Added after 6 minutes 23 seconds:
onetwothree wrote:i'd rather say this is https://github.com/CelestiaProject/Celestia/issues/357

I think that's it!!

BTW, I think maybe I can add you to the analytic website as a collaborator, or we could register using the organization on Github, so everyone on the team would be able to see the crash reports (also analytic data)

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #38by onetwothree » 02.04.2020, 10:40

Markerz wrote:BTW, I think maybe I can add you to the analytic website as a collaborator, or we could register using the organization on Github, so everyone on the team would be able to see the crash reports (also analytic data)

Sounds good.

Topic author
Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #39by Markerz » 07.04.2020, 12:06

OK, with beta3, the crash in search should have been fixed, please test @onetwothree @SevenSpheres

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #40by SevenSpheres » 07.04.2020, 17:41

Markerz wrote:OK, with beta3, the crash in search should have been fixed, please test @onetwothree @SevenSpheres

I can confirm that the crash is fixed.

Added after 1 hour 22 minutes:
With beta3, zooming in and out is very slow. This was not the case with the previous betas.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED


Return to “Development”