SimpleMobileTools / Simple-Gallery

A premium app for managing and editing your photos, videos, GIFs without ads
https://www.simplemobiletools.com
GNU General Public License v3.0
3.61k stars 757 forks source link

Share & Edit Buttons Seems To Need GSF/Services... #1257

Closed 0pLuS0 closed 5 years ago

0pLuS0 commented 5 years ago

I am using my own custom ROM, which is Oreo 8.1.0 built with only microG, there is very little in the way of Google in it, this is just like LineageOS microG.

I just downloaded the latest version today on F-Droid, and I forgot this had a Share button in it, neither does the Edit button, they both don't work... :(

I am using a microG ROM without any GSF/Services. Can you please get the Share & Edit working with microG?

What I find odd is in the OnePlus Gallery application the Share button doesn't work too, but the Edit does work, so I don't understand why the Edit does not work with SimpleGallery...

I'm personally using NanoDroid-microG since it has more development then the official microG!

https://forum.xda-developers.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928

I look forward to the microG support, I really hope this happens!

Thanks

P.S. The simplest solution if it's not to much trouble to ask, is to PLEASE disable the Share button and put up this version here on GitHub for people to use with microG until it can be fixed, but for the Edit section, I don't know why this won't work.

tibbi commented 5 years ago

no google services are needed at share/edit, Im just triggering some casual system actions. I dont plan changing that behaviour, that is the proper way of doing it.

0pLuS0 commented 5 years ago

Ok if no GSF needed, then I don't understand why these buttons won't work.

There are then no dependencies for these?

Here's a logcat, I pressed the share and edit buttons several times, hopefully the logcat will show you something, I would also appreciate it if you can please reopen this, since these are not working...

logcat.txt

P.S. By the way, is there anyway when you click on an image that the image number that appears at the top of the screen can be removed? It makes the UI look bad and I'm not understanding the need to have this?

tibbi commented 5 years ago

Im using the standard android ways that are basically used by all apps, so thats fine. Not a single person had issues with it so far, you have apparently customized your device way too much. Not sure what image number you mean. If you open a fullscreen view and click on it, you can toggle fullscreen mode. That can hide the file name.

0pLuS0 commented 5 years ago

I did not customize it to much.

This is all I removed;

system/app/LatinImeGoogle
system/app/OEMLogKit
system/app/OPBugReportLite
system/app/OPWidget
system/priv-app/com.qualcomm.location
system/priv-app/GoogleFeedback
system/priv-app/GooglePartnerSetup
system/priv-app/GoogleServicesFramework
system/priv-app/OPDeviceManager
system/priv-app/OPDeviceManagerProvider
system/priv-app/Phonesky
system/priv-app/Velvet
system/reserve/OPForum
system/reserve/Weather

I'm taking OxygenOS a Google ROM and building it into a microG ROM.

I'm not first installing OxygenOS then removing GSF and installing microG, this works good this way.

I'm converting it, so it only has microG in it and you flash it in TWRP like any ROM and it starts only with microG, that's the problem, converting a Google ROM to microG, you run into issues like this.

Use a Google ROM or AOSP ROM this works, convert a Google ROM, then you run into issues like this.

If you run a Google ROM and then debloat GSF after using it, then install microG, a lot that depends on GSF still works, since GSF was first used...

SO the REASON why you don't hear about this, is because most people don't take Google ROMS and strip them down, they simply use 3rd Party Custom ROMS.

But I will tell you why this is better, because the Hardware Firmware from a Vendor is Proprietary Software, so trying to support this, well you should understand this, most Custom ROMS hardly ever support a manufacturer's hardware as good as the manufacturer does, that's a fact! This is why I am making the ROM like this.

Do you think there's a way to make this work? Or this needs to start out first as a either a Google ROM or AOSP ROM?

I use the NanoDroid version of microG, it has better/faster development at this time over Official microG which is not getting much development lately.

https://forum.xda-developers.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928

Ok full screen for the numbers, but what about an option added so they don't appear at all? When you click the image and view it in the regular, or normal mode, if this is how you might call it, it would be nice to not see this at the top...

Thanks

tibbi commented 5 years ago

You apparently broke some core system functionality. The app works just fine to millions of people, even people with rooted devices and without anything Google related. The issue is not on my side.

0pLuS0 commented 5 years ago

Your the second person this week talking about the Millions, so please have respect for the Geeks like me that do things that the Millions don't do.

By saying the Apparently and the Millions, it's showing your lack of understanding and just making false assumptions, also making me feel bad, like I don't know what's going on and I'm the problem when I'm not.

So I don't mean what I said to you as an insult, but until you have the facts straight, please choose your words more wise... Thank you

I'm a Geek with a High Level of Experience in Android/Unix/Linux way beyond most of these Millions, with no disrespect to any of them, but who are also just followers, not leaders, lost in technology.

I'm not following the crowd I am making a stand and creating something new and many people are waking up and wanting these new directions as I'm presenting them.

So let's please respect each other when making replies. THANKS...

I didn't break anything I converted a Google ROM into a microG ROM, converting meaning building it this way to flash in TWRP, not installing a Google ROM then debloating and installing microG.

Converting a Google ROM into a microG ROM, well you run into issues like this.

Have you ever run microG?

You want to know the reason I do this? Because it's a fact that no one seems to realize or talk about, but trying to support Proprietary Hardware on a Manufacturer's ROM, well you should understand this.

I have run Custom ROMs for years and I've never had any of them support the hardware of a Manufacturer's own ROM better, and when you do see the support, it's either because of luck or great skills, talent, or there are resources out there to create something that will work/replace the Manufacturer's Proprietary Firmware.

So I've converted OxygenOS into a better ROM then OnePlus has, no Google bloat, none of OnePlus' Data Analytics, something many people I've seen around the world wanting, myself included, this is why I am doing it.

It's also a fact that GSF is heavier on resources and performance, which translates into worse battery life, something everyone is always asking about.

Google's Privacy is a Nightmare and I just don't get why people support this company! microG is more secure and safe, better performance and privacy, all facts!

So I do this so it can be shared with others to flash and install. Sure it might lose like 2% of features, that's not such a bad trade off, and when you consider how many Custom ROMS have poor hardware support, this 2% trade off is much better!

Anyhow the point is a Google ROM is based around GSF/Services, you should know this as a DEV, I've removed this, and replaced with microG, so now, I end up with this sort of issue.

So the question is how to get around this when converting a Google ROM, if possible. I would think there could be a way, not sure if you care to explore it.

And one last Geek thing, if you don't know it, I've seen over the years many people after using Custom ROMs, going back to the Stock Manufacturer's ROM because of bad hardware support, it's always going on.

It's a fact that Manufacturer's ROMs are finally stepping up and getting better, to the point now, many Custom ROMs can't support the hardware as good. It would be great to see Developers like yourself supporting "Manufacturer's ROM Conversion".

Manufacturer's ROM Conversion whether you believe it or not is the best alternative at the moment for a ROM, when wanting the best hardware support and performance, FACT! GSF will never out perform, be as safe, secure or private as microG, FACT!

Until a company comes along and makes a device without Google, with something like microG, there are no better alternatives, but there are some companies starting to move in this direction. This also has to do with creating Flagship Level devices, and no one has done this yet...

If you realize what I am saying here, this is the question you should be asking yourself? What is worse, Converting a Google ROM, or using a Custom ROM? The answer is using a Custom ROM, because the majority of them lack the hardware support. So is it better to lack hardware support or lack a few features like the Share Button or Parallel App ? The choice should be obvious.

Again, if you missed, or forgot the point, let me repeat it, it's a fact that the majority of Custom ROMs out there, do not support the Manufacturer's hardware better.

So using the Manufacturer's ROM, installing it, then debloating it, then installing microG, people can do this manually and if they do it this way, then you can regain that 2% loss! But I'm building and sharing a ROM, like any Custom ROM, this is not the process of how you build a ROM.

Many people struggle with this process of installing a Google ROM, debloating it and installing microG, to get it working properly, there's a lot of work involved, and I've seen the majority don't want to bother doing it themselves! They want this, dream about it, but they lack the experience and know how to complete it. So this is why I have come along and offered a Converted Google ROM into a better ROM, of course still lacking that 2%... LOL :)

I teach this stuff and I do it and I can tell you people are loving it!

So I hope after all that I've said, if there's a way around this, so the Share feature can somehow be self-contained, so no matter what the ROM has incorporated it still works.

THANKS

P.S. Something I forgot to mention F-Droid has it's own Share Button, not sure if what it's doing cant translate into the Share Button for Simple Gallery...

ouzowtf commented 5 years ago

You talk about getting respect? Maybe you should start by having respect for the developer?! If you're an expert "with a high level of experience", write the code needed, do a pull request and see if it's accepted. If not, you could just build your own flavour of simple gallery with a "fixed" share button, like you do your own ROMs.

0pLuS0 commented 5 years ago

@ouzowtf dragging a conversation into more OFF TOPIC is not being respectful to anyone, and where did you get the idea that I was being disrespectful?

Please don't jump to assumptions too, talking about respect when I'm not being disrespectful towards the developer, I was only making a reply and just because a Geek has a high level of experience, doesn't mean they know everything or care to do as you are suggesting, write code.... I don't care for Coding.

I said I was not meaning insult to the developer, did you not see this?

But when people sit around throwing words like Apparently and Millions in the context of the sentence, that was being replied back towards me, that is not being respectful to end-users, just placing blame on them, without knowing the facts.

Anyhow, I have the utmost respect for the developer, but many developers when faced with odd situations, just react typically in this manner, I see it all the time, oh and then closed the bug report, also another indicator it was my fault, that there's not a problem here.

Anyhow it would be great in the future that people would first discuss and get the story straight instead of jumping to assumptions.

Also with this Gallery and others, I see they rely on the OS for this Share ability, which seems to be, for a lack of words, the Android way.

But as I pointed out F-Droid has a Share Feature, not sure how it is doing this, if it can be implemented into Gallery apps to be more self-contained.

P.S. No More OFF TOPIC, I'm done, I only care to know if the DEV might be able to implement the SHARE feature as SELF-CONTAINED in the app, if that is possible.

0pLuS0 commented 5 years ago

@tibbi, sorry for my reply, if it came across rude I apologize, it's not my intentions, I have the utmost repsect for your work and I really appreciate it!

But I have an issue here and maybe you can help since you are the developer. Can you please tell me how the "Share Button" is implemented in Simple Gallery, what code, is used to make it work, how is it hooked into Android?

My understanding is that this is called the ShareActionProvider in Android, here's a link;

https://developer.android.com/reference/android/support/v7/widget/ShareActionProvider

The problem I can see, as I mentioned before, is that in OxygenOS it seems to be working on the GSF level, not like an AOSP ROM, because if it did work like an AOSP ROM, then I should be able to replace the Framework and Play Services with microG and have this still work and it doesn't.

Thanks for any help you can provide, it's greatly appreciated.

tibbi commented 5 years ago

it isnt ShareActionProvider, the implementation is at https://github.com/SimpleMobileTools/Simple-Commons/blob/master/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt#L135

0pLuS0 commented 5 years ago

Did you see the logcat I submitted?

My ROM is not incorrect, it's just a converted Google ROM to a microG ROM, and this sometimes leads to issues like this I'm seeing.

This Share Feature does not come across dependent, but seems to rely on the system, what, and how this has been coded to work, like a Google ROM needs GSF, even though you install an AOSP app that doesn't require it. If GSF/Services aren't present in a Google ROM, then this breaks, and of course Simple Gallery doesn't work.

It doesn't matter if I install a GSF/Google app, or ASOP GSF app, it won't work, the function, support, needs GSF on a Google ROM, unless the developer(s) from what I can tell code it another way.

Have you ever used and looked at F-Droid? Maybe you can code SimpleGallery to be dependent like this?

F-Droid has a Share Feature and I tried it, it will share to the Messenger and Notes app on my ROM, so I don't see why this type of code can't also be added in Simple Gallery and other Gallery apps to Share and be dependent like F-Droid is?

I've attached a screen shot of F-Droid showing the share button in the upper right, which I tapped on to enable the share screen at the bottom.

fdroid

THANKS

0pLuS0 commented 5 years ago

Something else interesting I forgot to mention, maybe you are aware of this.

If I run this converted Google ROM first with microG, then remove microG and put back GSF/Play Services, the Gallery Share still does not work.

It's my understanding that the Android Setup Wizard helps to initialize the system and apps, and if it would run with microG, which it doesn't maybe this Share would work, because I forgot to mention this, but as I'm saying, running the ROM as microG first, with no Wizard enabled, then replacing back GSF and having this still not work, my understanding is the Android Wizard also plays a part, to help get the system up and running properly.

I think also not having the Android Setup Wizard enabled and GSF removed, are both the issues here.

But as I pointed out F-Droid, I think it can provide an alternate solution here...

P.S. Something I almost forgot to mention, what's interesting is every time I touch the Share Button, the "Location" icon appears in the overhead statusbar, which I don't understand why... hmm

tibbi commented 5 years ago

sorry, but Im not going to work on this issue

0pLuS0 commented 5 years ago

@tibbi Sorry for any confusion, I wasn't just asking for you to work on changing Simple Gallery in this manner, but when you get some time if you could please look at this logcat I've now submitted and tell me if you see it showing the reason why this Share isn't working in Simple Gallery?

I made sure to clear out logcat in the device, then I installed Simple Gallery and ran it several times, pressing many times on the Share button then took the logcat.

logcat.txt

Thanks

tibbi commented 5 years ago

I dont know, such logs usually arent helpful. It contains almost 2k lines from many unrelated system apps

0pLuS0 commented 5 years ago

Ok on the logcat...

Can you please elaborate on this standard android ways you mentioned before? Because the code you showed me, since I'm not a coder, I'm not sure what the code hooks in Android to call this Share Menu into view, so it can be accessed and used?

Is this Share UI something to do with Toast?

Thanks

tibbi commented 5 years ago

I even linked to the specific line already man.. It is at https://github.com/SimpleMobileTools/Simple-Commons/blob/a12aff881d78b503aef813e48e8295936571a570/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt#L158

0pLuS0 commented 5 years ago

Sorry for any confusion here, but look I'm not trying to be rude or disrespectful here.

I'm a Geek but when you reply to me with things that don't explain anything, as a Geek, not really a coder, but I do know a few things about code, I've played with a lot of code in Linux, mainly compiling Linux source code and building Linux packages.

BUT when I don't know something it I Google it! :)

So I went online right when you showed me this code to research it.

Google this line of code, I hope you will do that, then you will see the problem man... LOL :) I meant that too as a friendly laugh, not disrespect either.

----> fun Activity.sharePathIntent(path: String, applicationId: String)

Problem being, there is nothing on Google over your code, from what I can see, you are the only one in the world who has written that line of code.

Then I broke it down further and did a search for just Activity.sharePathIntent and again nothing.

So I don't see any Common, typical, or Android way here in this line of code that explains the Share function, or relates it back some other code that I can find online in other code, as they relate to each other.

But what is common and typical that I have already found digging through several ROMS and apps is;

ShareActionProvider.

So please don't be offended or upset over my reply, you showed me something, so I go do my homework and research it, and there's nothing out there to explain it and tell me anything about it, that is why I replied back.

Last thing, I get it too, when it comes to code, someone can write it in their own way, as long as it follow the standards, which is what it appears you have created with this line you've shown me.

PEACE :)

P.S. I appreciate your time, you showed me something, I guess if I was a coder, I'd be able to dig around through your code and find the relation of the Share in it, and I've done this, so with my lack of Android Code skills the only thing that came to mind was Toast, that I could see mentioned.

tibbi commented 5 years ago

sorry, but Im done with this issue. Thanks

0pLuS0 commented 5 years ago

@tibbi I'm sorry to trouble you.

I went back and installed OxygenOS 5.1.7 and took several pictures and tapped on the Share button several times, and took a logcat.

I'd greatly appreciate it when you have some free time if you could look over this logcat and hopefully it will tell you how OxygenOS is using the Share function/feature in it.

logcat.txt

Thank you