yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] erikalin:
**Wrong thread!** GO TO THE NEW THREAD FOR LATEST APP!​

As of 24 May 2015 - find The Box v.4.0 here. Watch the youtube demo video in the OP For answers to most questions.

Announcement

: Can everyone who is using The Box in a ROM or theme collection project please post a link to your thread and a screenshot of your personalized layout of The Box?? I keep hearing that it's used in more places, and I've asked that you just let me know. Please do so. Thanks.

The Box

The simple app that any custom Android ROM developer or themer just might want to have…​

New! You can check out one ROM's implementation of The Box on the play store at the following link. This is only useful for users of that one ROM. It's their version of The Box. Here you can easily make your own version. The Box sample here: https://play.google.com/store/apps/details?id=com.erikalin.box1

Want people to stop asking you for updates and mods you've already uploaded? Tired of thread clutter with people asking repeatedly for certain download links or theme threads? Include this lightweight app that gives your ROM/theme users instant access to your updates, fixes, themes, etc., as soon as you upload. No additional service setup is required. Keep using whatever file hosting service you already use (i.e. AndroidFileHost, Dev-Host,your own, whatever).

From start to finish, I estimate it will take you 45-60 minutes to get this ready to go for yourself. This includes time for you to learn "what goes where". If you were to do it a second time, it would take ten minutes. You decompile the app, change a few strings, and make a few other XML edits, a few smali edits, and put in your own desired images and app icon. Build it up and you have a nice addition to your custom ROM or theme package. Minimum SDK is 11; app will work out of the box on any version of Android 3.0 +. There are some other apps, more complex than this one, for you to choose to integrate in your projects. The Box is intentionally simple.

Demo video for an earlier version of The Box:​

https://vimeo.com/97699006​

​

Written instructions for customizing – See Post #3 for step-by-step instructions on exactly where you need to make your edits.

Downloads –

SIX BUTTON VERSION as shown here in the OP is attached to the OP

TWO BUTTON VERSION is found here.

Change Log –

V3.0 August 12, 2014

- completely redid the layout

- added space for smaller buttons

- new package name to avoid conflict with Play Store

V.2.0 June 12, 2014

- restructured app to remove webviews; buttons now call browser, or forum-browser (i.e. Tapatalk) per user's default settings (faster, smoother)

- thanks talkingmonkeys for requesting this change.

V 1.0 initial release June 9, 2014

Known Issues –

Do NOT upload your version to the play store. Don't do it. Users will get app updates to someone else's project, because it will have the same package name. Avoid.

Contributor –

erikalin

Latest version – 3.0

Latest release date – August 12, 2014

Created on – June 9, 2014

FAQ –

See Post #2.

​
[Android Apps and Games] erikalin:
Customizations Guide - rev. August 12, 2014​

Reminder

: Please leave my credits as-is and obviously don’t rename The Box. It is illegal for you to take this code and call it your own app. I am letting you customize and use The Box pretty much however you want. Just don't take my credit away, please. Other than that, let’s do this.

DIRECTIONS​

Download the latest version of The Box template from the OP.

Decompile the app.

Edit strings.

In

res\values\strings.xml

edit

only

the following values:

<string name="ROMtitle">"Awesome ROM Name Here"</string>
<string name="ROMsubtitle">"subtitle for your ROM here ~ by yourname"</string>
<string name="action_settings">Hi :)</string> <!-- This is what shows on pressing the menu button -->
<string name="themes">Themes</string> <!-- This is in the middle of the screen - you might want to leave this or change it -->

Replace images.

These placeholder images are in a zip file attached to the OP. Note: You can adjust the background transparency for behind the button images in res\layout\activity_main.xml. For each button you’ll want to modify the android: background entry for that image button from the default which is as shown below:

android:background="#[B][COLOR="Red"]33000000[/COLOR][/B]"

Edit smali for buttons’ URL destinations.

Specify the URLs for the websites you want each button to go to. To edit MainActivity.java in an app you can make the edits in:

smali\com\erikalin\box3\MainActivity.smali

Find the website URLs and replace them. They have obvious names so you can easily modify them to be your desired URLs. Do not touch anything in the MainActivity.smali file except to edit the URLs, or you will probably mess things up. Each URL is matched with a method with an obvious name. These are the methods, and you'll edit the URLs for each:

goToRepo

goToXDA

goTobuttonA

goTobuttonB

goTobuttonC

goTobuttonD

goTobuttonE

goTobuttonF

Let me show you one example below. I will put in red what you would edit. Don't touch anything else. Just change the URLs.

.method public goTobuttonA(Landroid/view/View;)V
.locals 1
.param p1, "view" # Landroid/view/View;

.prologue
.line 29
const-string v0, "[U][B][COLOR="red"]http://google.com/#q=letter+A[/COLOR][/B][/U]"

invoke-direct {p0, v0}, Lcom/erikalin/box3/MainActivity;->goToUrl(Ljava/lang/String;)V

.line 30
return-void
.end method

Build it back up, sign and test. Enjoy!
[Android Apps and Games] wetbiker7:
This is an AWESOME app!!! Thank you so much for sharing it with us. :D

It will definitely come in handy. Nice work [MENTION=4829480]erikalin[/MENTION].
[Android Apps and Games] talkingmonkeys:
Thank you very much! Looking forward to playing around with this and adding it into my rom. Great work!
[Android Apps and Games] prateek.khurana31:
nice

nicely explained!!! :):):):)
[Android Apps and Games] itskapil:
Great!
[Android Apps and Games] erikalin:
I'm glad you like it. Try it out! :good:
[Android Apps and Games] erikalin:
Edit: QUESTION

Push Notifications

Yes / No?​

ANSWER

No. There's no way to include push notifications in The Box as a universal template in which you can just go make a few personalized edits and you're ready to use The Box on your own. Basically for me to set it up so that you can insert a few things and then be able to send your own push notifications, it would be much more complicated than the intent of this project, and I would have to host server resources. The Box is more simple than that. If you are curious, here's a good tutorial that will work. My guess is that if you can follow this tutorial then you're probably creating your own app rather than customizing The Box.
[Android Apps and Games] talkingmonkeys:
Yea I like this idea. Maybe setting them to off as default?
[Android Apps and Games] gcrutchr:
Just curious...how does this differ from the open source project "OTA Update Center"?

ota update center

Thanks
[Android Apps and Games] erikalin:
Hi. The Box is a lot more simple than that. This is lightweight, able to load the file repo and the xda thread. More features means more places to lose compatibility or encounter errors. This will just always work clean and simple on every device. It isn't meant to replace or compete with feature-rich OTA updater apps.
[Android Apps and Games] gcrutchr:
Thanks for the feedback. Will look into using this in my next rom.
[Android Apps and Games] gcrutchr:
As much as I want to try it, I cannot download from the main server or alternates. Nothing happens when I click on any server. :(
[Android Apps and Games] erikalin:
Yeah? It's all on Android File Host. I just tested and it's working for me. Are you looking for the three button demo? I can attach that one file to this post, I think. Let's see... If you're looking for the working example from the Project X ROM let me know and I'll grab it and attach that instead of this one. Do me a favor and try one more time with AFH. It should be okay...

I guess I'm not sure then. They don't show any server errors... Anyway, I attached the file you're probably looking for here to this post on xda.
[Android Apps and Games] gcrutchr:
Thanks. Tried again this time using shift+select and now getting 404 error file not found. I am in Thailand but I do not think that is an issue.
[Android Apps and Games] Chad The Pathfinder:
I say yes as long as they are off by default.
[Android Apps and Games] talkingmonkeys:
I'll have mine up soon. Well probably next week when I get the time to finish everything.

One small request would be to remove the webview thats in the app just because it loads slower than the browser. It only comes up for the 2nd button and I'm just wondering if you could teach me how to remove it. Thank you for this great app.
[Android Apps and Games] erikalin:
Do you know how to use Eclipse?
[Android Apps and Games] talkingmonkeys:
I don't but I can look up how to
[Android Apps and Games] erikalin:
It would be easier to create a new app in Eclipse than to figure out how to edit it after the fact in this case. To use buttons as links to open in the browser (what you want) rather than in a webview (what is here) is a much easier thing for an app to do. My very first app did that because I couldn't figure out webviews at first, lol. If I have time this weekend, I can make up another version just for you. ;) It doesn't seem people are seeing this app anyway, so I might not have much else to do with it...

Give me the url links for your three buttons specifically, so if I do have time I'll make up a version of The Box for you with browser loads rather than webviews. Tutorials take like ten times as long as just making something on my own and giving it to you. It makes me cringe as a teacher, but if no one else is using this, I have time to hook you up. I will use demo images but your links, so you'll just drop your own images in.

BTW, Add "learn Eclipse" to your to-do list for this little Android hobby. ... very fun possibilities, my friend. Although it helps to already know JAVA you can figure a lot out one piece at a time. Cheers.
[Android Apps and Games] erikalin:
The Box v.2.0 is up. Changelog in the OP.​

Basically, skip the webview calls and instead load directly into browser or forum-browser (i.e. Tapatalk) per user's phone defaults.

Better, faster. Users who already have The Box set up for their ROM are liking it.

Thanks [MENTION=5266065]talkingmonkeys[/MENTION] for the request - I like it.

Here are a couple screenshots from a customized implementation of The Box v.2 made up for the Wicked X ROM on the Sprint Samsung Galaxy S3. There are two theme options here:

If anyone has questions on how to customize The Box for your own project, just ask.

If you downloaded version 1 and are using it to work on, I highly suggest downloading the latest version 2.0 from the OP for your base. :good:
[Android Apps and Games] rirozizo:
hi, i just had this idea in mind when i saw this thread and the demo video. you did a wonderful job, this is a perfect base for maybe a ported of a ROM willing to add his own method of ROM updates and whatnot.

I just had the idea of making this a simple tasker-based app which can be shared and easily edited using tasker itself.

I can help you make the same app using tasker. Personally, i find it easier to change your dummy (dummy = template) app using tasker rather than code change.

So what do you think?
[Android Apps and Games] erikalin:
Howdy. I'm sending you a PM...
[Android Apps and Games] rirozizo:
Post also available HERE (with PICTURES :D )

This post will serve as a guide to devs/themers that don't want to decompile and fiddle with codes.

This is the Tasker way, you need Tasker and the app factory plugin.

I recreated the (almost) exact same app using tasker, because it makes it easier for devs/themers to modify and edit it.

dummy app: https://app.box.com/s/ttn1dk12qn7p822h7d4a

xml for the above dummy app: https://app.box.com/s/zstoi4ih1088bwb3z0kk

version is 2.0 (same as original) to avoid any confusion.

Tutorial for modifying this app using Tasker:

Import Project

Change URLs and button images

Change buttons' places

Change the background

DO NOT EDIT THE ABOUT BUTTON! NOR THE ABOUT SCENE! You can only change it's location if you absolutely NEED to. Other than that, you have no right to modify it. Thank you.

Change the resolution to fit your device

Export as apk/xml
[Android Apps and Games] erikalin:
Looks good, mate. Linked to in the OP. Look forward to a few screenshots for the tutorial part, but I'm thinking people who use Tasker will find this useful. :good: :)
[Android Apps and Games] rirozizo:
Guide updated, i added pics but on my website (it's the exact same guide, but with two pics just to clarify some hidden options inside tasker). I won't be adding them here on XDA because of some issues and limitations (i do this on all my guides, even my biggest guide)
[Android Apps and Games] erikalin:
"Customer Satisfaction" is high where The Box is currently implemented. End-users seem to like it. Devs not so much?
[Android Apps and Games] bilgerryan:
I love it, thanks!
[Android Apps and Games] erikalin:
The Box v.3.0 is up!

The OP has the latest template to download, and the guide has been updated and simplified. It's much better... check it out. Don't use previous versions. Remember, if you use The Box in your project, please post a link to it in this thread. Cheers. Enjoy!

Screenshot of the template (with placeholder images)

​

To check out a working copy of this app, see The Box for Wicked on the play store here: https://play.google.com/store/apps/details?id=com.erikalin.box1
[Android Apps and Games] dwitherell:
My attention was recently brought to this - fantastic stuff. I do believe I will be playing with this for inclusion in the little mess of a project I am currently dabbling in. Great job - great explanation - I don't think clarity or ease of use have room for improvement on this one (oh the woes of the ceiling effect) - well done!
[Android Apps and Games] erikalin:
Hey, thanks, my friend. How on Earth did you hear about The Box? I thought nobody would notice this except for the few who I know are using it. lol. A few people are using it in their projects. Click through to the version on the play store to see the one customized and "in use" that I'm maintaining for people on one of my old devices. (If you run with this app for your own project, just don't put yours on the play store or people will update to the The Box for the wrong ROM.)
[Android Apps and Games] dwitherell:
It was an interesting combination of being requested to assist on a mod for the rom relevant to your play store version, and a friend of mine throwing a link to this thread my way as he thought I might find it useful (and rightly so). And no worries on the play store front, as my intention currently is quite in line with what seemed to me to be the goal of your project - a nice simple informative app to include in the rom.

I'm not the fastest at churning things out, but once I talk to a few more graphic/aesthetic minded folks for some image work (an arena I sorely lack in) and get something together - if interested I'll PM you a link/info/etc. on how it all shook out in the end :)

Thanks again!
[Android Apps and Games] erikalin:
Sounds good. Yeah I'd love a link to where you use The Box, if you use it. :) Have a good one. :good:
[Android Apps and Games] bilgerryan:
For my ROM? What mod? Just curious...
[Android Apps and Games] dwitherell:
Thought it best to PM to avoid thread clutter - PM sent :)
[Android Apps and Games] dwitherell:
Well I managed to get something together... did a bit of tinkering and learning too :)

I sent you a PM w/ a link and some details on what I did. Thanks again!
[Android Apps and Games] erikalin:
Nice job, my friend. When you get a chance, post a screenshot and link to your ROM. I'll highlight your work in the OP.
[Android Apps and Games] dwitherell:
Sure :)

First off I want to give some thanks to [MENTION=4644111]cbucz24[/MENTION] as he started the process and got some images around/spiffed up :)

This was all done for my little mess of a project that can be found

here

- it's called Tweaked (for better or worse) and has been my fun learning project for a couple years now across a few phones (currently an N900T Note3).

Here's a screenshot of what the end result looks like:

I made a few small changes here and there, mostly just to learn-by-doing and what not. It took a bit, but to avoid boring w/ details I added in an Info button/section (all I did was copy the thanks portion of my OP into it really lol), and I set it up so that when clicking on any of the 6 bottom buttons a small informational toast will also appear that describes the link as being a theme or kernel, the name of the OP, and the name of the theme/kernel (thought this would make it look cleaner then adding text descriptors but still offer the info... and I just wanted to play with adding toasts).

Thanks again to [MENTION=4829480]erikalin[/MENTION] for putting a simple-to-use-and-mod base apk together!
[Android Apps and Games] mlock420:
[MENTION=4310299]bilgerryan[/MENTION] dude i recognize that name anywhere on xda your bare bones,project x was the best for s2 what phone you working on these days?sorry for the troll post everyone
[Android Apps and Games] bilgerryan:
Sprint S3

http://xdaforums.com/showthread.php?t=2750674
[Android Apps and Games] porkyhontas:
Again, awesome job [MENTION=4829480]erikalin[/MENTION]! Thanks for your hard work and support.

Sent from my Wicked SGS3 using AnaKonda Tapatalk
[Android Apps and Games] erikalin:
Nobody goes to this thread. Lol. I haven't updated it since it had no interest. I'll throw a current screenshot of The Box for Wicked X up here though, in case anyone accidentally reads this thread. ;)

[IMG="http://i.imgur.com/rUtS0Sj.png"]http://i.imgur.com/rUtS0Sj.png[/IMG]
[Android Apps and Games] bilgerryan:
It looks really great now

My ROMs: Wicked X & Wicked S5 Xperience
[Android Apps and Games] talkingmonkeys:
Erika I may be adding the box to my att s5 rom. Thanks again for creating this useful app. I will take some screenshots for you if I decide to add it.
[Android Apps and Games] porkyhontas:
Come on, add it and be hip, lol.

Sent from my SGS3 using AnaKonda Tapatalk
[Android Apps and Games] talkingmonkeys:
I have it in my S3 ROM lol. Debating if I need it when I use the custom settings app already for many mods and added links to everything I would of put in the box. I may add it when I rebase to lollipop though.
[Android Apps and Games] SICKMADE:
First off I would like to say thank you for this app.... I have been wanting to use it for a while now! I just have a question that I hope wasn't already asked which would then make me a noob for not searching first... I want to use this app for my themes. But for the Note 4 I only have 1 so far. My question is what if you dont want to use all of the buttons? What would I need to delete so that they will properly be gone? Thanks in advance!
[Android Apps and Games] porkyhontas:
Awesome signature!!!
[Android Apps and Games] SICKMADE:
Thanks brother I appreciate it
[Android Apps and Games] erikalin:
Hey, Sorry for the delay - been crazy busy and unable to be on XDA. Then I login and I've got a couple PMs about The Box and your post here.

Time to catch up...

Okay. So what would you change to not use all six buttons... I wish I could answer this, but I honestly don't know much about how to edit an app that you decompile (i.e. with apktool). I write the code in java, and this particular app using Eclipse. You decompile it and edit things that look really different, a different process.

You know what. Let me open my stuff real quick and make you one with two buttons. I can't bring myself to make it with one button, but find a use for the second one - google, "coming soon", your xda profile, whatever. Plus you can then expand easily when you have two.

Check back here in a bit...

Update: Okay. I built with just two buttons. Install the attached to test this demo version and see if it works for you:

Two Button Version of The Box
​

[MENTION=5117949]SICKMADE[/MENTION] - Let me know if this works for you, bud.
[Android Apps and Games] SICKMADE:
WOW!!1 I can't thank you enough! You don't know how much I appreciate you doing this for me! I truly truly appreciate it a lot!
[Android Apps and Games] bilgerryan:
Yeah she's a pretty awesome person

https://play.google.com/store/apps/details?id=com.erikalin.box1

My ROMs: Wicked X & Wicked S5 Xperience
[Android Apps and Games] bilgerryan:
By the way [MENTION=4829480]erikalin[/MENTION] I love the hamster button you added in the latest update!

My ROMs: Wicked X & Wicked S5 Xperience
[Android Apps and Games] erikalin:
Thanks! :) I put the hamster in all my apps, and almost no one ever notices, or says anything, lol. Some apps have an Easter egg, and I have the hamster.
[Android Apps and Games] bilgerryan:
I have a habit of reading change logs

My ROMs: Wicked X & Wicked S5 Xperience
[Android Apps and Games] SICKMADE:
Quick question.... I edited everything good and the apk installed fine but for the 2nd option.... option "B" I chose for it to go to my paypal donation page and when I hit it goes to Paypal but says "Sorry your last request could not be completed." Is there something that I might be doing wrong? Before compiling I test the link that I pasted in the smali folder and it worked fine. Seems like after compiling the problem happens?
[Android Apps and Games] SICKMADE:
I'm gonna redo it but thought I'd post a screen of my 1st draft.... Now that I see how it's gonna look I'm gonna just erase the edited string text so it says nothing so that I can apply some styles and stuff to the text with like a reflection effect or something with the Deviant Development logo or something. I'll make sure and post a final screen tomorrow when finished. I would really like to use that B button to go to my donation page for PayPal just like it does on XDA but I don't know how to properly do it. Did some reading and I think it's more complex than I guess I thought it would be? I thought I could just copy the donation URL off XDA that takes you to the PayPal donation page and paste it in the smali folder? If anyone might know how that works that'd be awesome. But again thanks [MENTION=4829480]erikalin[/MENTION] for being so cool as to make me this cool ass app with just 2 buttons that was really nice!
[Android Apps and Games] erikalin:
Login to your paypal account and "create button" to get a donate url... Paypal will generate html for the button, and you can just copy-paste the url.

Edit: I didn't notice the first of your two posts above. I'll look at it tonight if you can't get your paypal link to work. Message me the compiled apk file you have at the moment...
[Android Apps and Games] SICKMADE:
I never attempted to create my own donation button within the PayPal site and use that htnl code... I just copied my donation link from XDA and pasted that in there.... but like I said I tested the link that I pasted inside note++ and it worked fine but once compiled I get a timed out page in PayPal. But here goes a copy of the apk. . You have already done so much for me taking time to make me this 2 button version I can't thank you enough to now take time to help with the PayPal link! Your a stand up XDA member helping like this...it's rare to find someone as the likes of you. I also help others out when ever approached on how to theme a certain aspect of a rom and pay it forward always.
[Android Apps and Games] erikalin:
No problem. I had time Tuesday. Won't have time today, but I'll get you within the next couple days. Stay tuned. I'll tag you when I post it. In the meantime, try what I said to create the link through PayPal. There are reasons that could work. I will check it out soon either way though. Peace.