[Galaxy S6 Edge Original Android Development] trailblazer101:
Alright everyone, I'm Trailblazer101, an Android Developer who likes to take advantage of, and make better, the unique features of the phones I purchase. I started off with the Samsung Continuum back in 2010, which had a ticker ahead of its time, and went from there. I work 2 jobs, so time is tight sometimes, but I still manage to work on these things, a fun passion/hobby.

Status Updates

5/12
--- I got my patch working, and tested it out with a simple demo that takes advantage of the new capabilities. I've posted a Guide below!

5/10
--- Now that Verizon users have root, I will begin testing this myself :) Thanks to those who helped me figure out what we'd have to do, so I can get started right off the bat! I'll keep you posted.

What is this?!!

Okay, so by default the Feeds that you can make are restricted to the capabilities of a RemoteView. This severely limits what you can do with the Feed. Take a look here to see what exactly is supported, by default: http://stackoverflow.com/a/16089389

However, any Samsung App (which includes a few signed by Samsung on the Galaxy Apps Exclusives page) has the ability to put whatever it wants on the screen, just like a regular App. I've now extended that invitation on over to you/us!

Guide

The steps to take advantage of this is a little convoluted, so let me break it down for you easy!

STEP 1:

You have to flash my patch to allow this development to actually work. You can download it here: View attachment 3309479. Then flash it using FlashFire, or extract the zip and put everything where it needs to go, making sure to set the permissions appropriately!

STEP 2:

Now you can start developing your new Custom Feed! I would suggest using my simple demo project as your base, and going from there! You can find that here: View attachment 3309470. Extract it and take a look at the source!

STEP 3:

From here on out is where things get tricky... Without changing a thing, if you build from source and try to debug, it won't work. Why? Because the API that Samsung gives developers, like us, is different than the one they use for themselves. So Here's what you gotta do-- without changing a thing, build the Project. The best way to do that without debugging within Android Studio is to go to Gradle Projects -> :app -> Tasks -> build -> assembleDebug. This'll make the built apk and put it within "..\.EdgeScreen-BACKUP\app\build\outputs\apk\app-debug.apk".

STEP 4:

I'm assuming you have the latest Java Development Kit, and Android SDK, installed and configured properly, with their paths in the PATH variable, accordingly. You should also know how to use apktool for decompilation, at least a little :) I've compiled a toolkit folder based off of the test Project I shared above, which includes apktool, the NEW Samsung API files, the original built apk, and the already modified decompiled source/apk. You can download that here: View attachment 3309495. Then, open a Command Prompt window and "cd" to the extracted folder.

STEP 5:

Decompile the built apk, which should be the same as the one in the extracted folder, using apktool like this:

.\apktool\apktool d -f TestFeed_orig.apk

STEP 6:

Compare the decompiled folder "TestFeed_orig" with my already modified "TestFeed_modded" one. I suggest using WinMerge! You'll see that the 'TestFeed_orig\smali\com\samsung\android\sdk' folder is very different. That's what I was talking about before, how Samsung Feeds have more options in their API. So delete the 'TestFeed_orig\smali\com\samsung' folder, and replace with the one in the '---SAMSUNG API---' folder.

STEP 7:

Continue comparing the two folders. Basically the rest of the changes are just getting our application to call the new Samsung API properly, instead of the stubs I was using in the Project. There aren't many changes you have to make, but they're all important!

STEP 8:

Once the two folders are the same, recompile it using apktool, like so:

.\apktool\apktool b TestFeed_orig

STEP 9:

Sign the new compiled apk stored in 'TestFeed_orig\dist' using your signing key. You can make your own, then use it to sign the app, following the instructions here: Official Instructions for Manual Signing.

STEP 10:

Install the newly signed apk, and enable the Feed by going to: Settings-> Edge screen -> Information stream -> Manage Feeds -> *ENABLE* FeedsCocktailExample! You may have to restart, or just hit 'reorder' in the top left. That sometimes fast-triggers it. Now turn off the screen, do the Feed Gesture to get it to turn on, and you should see our Custom Feed! It doesn't look like much, but it's using a custom view, HorizontalTextView, that would not work otherwise.

From here the options are endless. You can follow these steps and my Sample Project to play a video for a feed, if you wanted! Whatever strikes your fancy!

If you followed these steps and appreciate the help, show this thread some love, and maybe. Well i'd say buy me a beer, but it'll probably go to textbooks instead ;)

Developer/Advanced Information!

We can make our own Feeds no problem, without root, they are just forced to use a RemoteView directly, which for all intents and purposes, is a pain in the kiester. Instead, it would be a lot nicer/convenient, without even mentioning the more advanced functionality we could bring, to use our own Views. However the version of SlookCocktailManager.UpdateCocktail that allows this is only found within a more advanced API, one I/no typical user don't have access to directly. BUT, I can still access it by decompiling for example the Edge RSS app from the Samsung AppStore, and putting/replacing the "sdk" folder from that into my own decompiled app, and recompiling. Easy enough, with apktool! (Of course with the headache of adding in my own temporary shell classes, in the project, so that I can actually write the calls, and just change the reference within the smali code once that sdk is replaced) The problem is, even when you do this, and it builds fine, installs great, and even begins initializing properly, we get an error from within CocktailBarService, the file I'm having you replace. More specifically, I tracked down the actual problem, and it comes back to "CocktailWhiteList", a class within CocktailBarServices, then checks the signature of the calling application, our Custom Feed, and sees if it comes from Samsung. This none of my expertise can fix, without being rooted, but trust me I tried. Now that we are rooted I was able to patch said apk, and get my own apps to work! Hurray!