-
Notifications
You must be signed in to change notification settings - Fork 276
Building your own an *.apk
Download and install Android Studio from Google.
It's possible to get Android Studio working with Eclipse and IntelliJ Idea (Android Studio is a fork of IntelliJ Idea). This guide does not cover those two IDEs.
Clone the source from GitHub. The URL is https://github.com/chrislacy/TweetLanes.git
From the command line, execute the following:
git clone https://github.com/chrislacy/TweetLanes.git
- Open Android Studio
- From the Quick Start screen, choose "Open Project"
- Navigate to the path you cloned Tweet Lanes
- Within Tweet Lanes, open the android, then client folders
- Select the client folder and click "OK"
- Open the Project Structure (File menu, Project Structure)
- Under the Modules group, ensure the Module SDK for each module (clientbeta, client, etc) is valid. It's currently Android 4.2.2 Platform. If that is in red on your machine, select a valid Android SDK from the drop down. Repeat for each module.
- Click Ok
- Now try to build. You may get a "Deprecated Make Implementation" warning. If so, go to File menu, then Settings and choose Compiler. Check "Use External Build" and then OK>
- Build Again! You should get a bunch of errors for missing TWITTER and APPDOTNET consumer and secret keys. If those are your only errors, continue to the next step. If you get other errors, contact @Fammy
To build and use the app, you'll need to create your own Twitter application (and App.net application, if you have a developer account).
-
Create a Twitter application on the Twitter Developer site
-
For the callback URL, use http://www.tweetlanes.com/tweetlanes-auth-callback
-
Once you create it, go to it's settings.
-
Inside Application Type:
- Make sure Allow this application to be used to Sign in with Twitter is checked
- Set the Access to Read, Write and Access direct messages
-
Now that you have the Twitter app configured, open the java file: android/client/src/com/tweetlanes/android/ConsumerKeyConstants.java and modify your TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET variables with the ones from your Twitter app.
App.net usage requires a similar set of steps. You will need to be a registered App.net developer, which costs $100 per year.
- Create an App.net application on the App.net developer site.
- Set the callback URL to tweetlanes-auth-callback:///
- Now that you have the App.net app configured, open the java file: android/client/src/com/tweetlanes/android/ConsumerKeyConstants.java and modify your APPDOTNET_CONSUMER_KEY and APPDOTNET_CONSUMER_SECRET variables with the ones from your app. If you don't have an App.net developer account, just make it anything so the application compiles.
If all has gone well, you can now deploy to a device.
- Plug in your phone/tablet/Google TV (just kidding on the last one, but if you can get it building on Google TV I will give you a high-five emoji).
- Under the Run menu, pick "Edit Configurations"
- Click the Green + icon and choose "Android Application"
- Give it a name, like "Tweet Lanes beta"
- Under module, choose "clientbeta". You can also choose "client", but clientbeta runs side-by-side with the store version. You want clientbeta, trust me.
- Under Target Device, pick USB Device (or Emulator)
- Click OK.
You can now hit the green play icon (or debug next to it) and it should prompt you for the device to deploy to. You can also go to the Run menu and choose Run".