public class Callisto
extends Activity
Modifier and Type | Class and Description |
---|---|
class |
Callisto.downloadExtras |
static class |
Callisto.downloadImage
Downloads and resizes a show's logo image.
|
class |
Callisto.PlayerInfo
Essentially a struct with a few functions to handle the player, particularly updating it when switching activities.
|
Modifier and Type | Field and Description |
---|---|
static SharedPreferences |
alarmPrefs |
static int |
appVersion
The Version of Callisto.
|
static TextView |
chatView
One of the Views for the IRC client.
|
static int |
current_download
The current download number.
|
static DatabaseConnector |
databaseConnector
Used to connect to the SQLlite database.
|
static int |
downloading_count
The number of downloads that has been queued up.
|
static float |
DP
The value of a dip, to be used programatically when updating a view.
|
static boolean |
europeanDates
If you should be a "weirdo" that likes dates in a logically correct manner.
|
static boolean |
is_widget |
static boolean |
live_isPlaying
The status of the live player; true if it is playing, false if it is paused or not in use.
|
static MediaPlayer |
live_player
The media players are used across the app to control playing either live or podcast'ed episodes.
|
static WifiLock |
Live_wifiLock |
static TextView |
logView
One of the Views for the IRC client.
|
static MediaPlayer |
mplayer
The media players are used across the app to control playing either live or podcast'ed episodes.
|
static OnClickListener |
next
Listener for the Next (">") button.
|
static OnCompletionListenerWithContext |
nextTrack |
static OnErrorListenerWithContext |
nextTrackBug |
static Notification |
notification_alarm
Notifications are used in various activities
|
static Notification |
notification_chat
Notifications are used in various activities
|
static Notification |
notification_download
Notifications are used in various activities
|
static int |
NOTIFICATION_ID |
static Notification |
notification_playing
Notifications are used in various activities
|
static OnPreparedListenerWithContext |
okNowPlay |
static Drawable |
pauseDrawable
Shared Drawable resources for updating the player control graphics.
|
static Drawable |
playDrawable
Shared Drawable resources for updating the player control graphics.
|
static Callisto.PlayerInfo |
playerInfo
An instance of the PlayerInfo class, to keep track of the info of a track when updating the player controls across the activities.
|
static OnClickListener |
playlist
Listener for the playlist button; displays the queue.
|
static OnClickListener |
playPauseListener
Listener for play/pause button; calls playPause(), the function
|
static java.lang.String |
PREF_FILE |
static OnClickListener |
previous
Listener for the Previous ("<") button.
|
static Resources |
RESOURCES
Simply the shared resources of the project, for things like strings, colors, drawables, etc.
|
static java.text.SimpleDateFormat |
sdfDestination |
static java.text.SimpleDateFormat |
sdfFile |
static java.text.SimpleDateFormat |
sdfHuman |
static java.text.SimpleDateFormat |
sdfHumanLong |
static java.text.SimpleDateFormat |
sdfRaw
One of the various date formats used across various Activities.
|
static java.text.SimpleDateFormat |
sdfRawSimple1
One of the various date formats used across various Activities.
|
static java.text.SimpleDateFormat |
sdfRawSimple2
One of the various date formats used across various Activities.
|
static java.text.SimpleDateFormat |
sdfSource
One of the various date formats used across various Activities.
|
static java.text.SimpleDateFormat |
sdfTime
One of the various date formats used across various Activities.
|
static OnClickListener |
seekDialog
Listener for the seek button; displays a dialog that allows the user to seek to a point in the episode.
|
static java.lang.String |
storage_path
The path on the SD card to store downloaded episodes.
|
static Handler |
updateHandler |
Constructor and Description |
---|
Callisto() |
Modifier and Type | Method and Description |
---|---|
static ProgressDialog |
BaconDialog(Context c,
java.lang.String title,
java.lang.String message) |
static void |
build_layout(Context c,
View mainView)
Creates the layout for various activities, adding the Player Controls.
|
static java.lang.String |
formatTimeFromSeconds(int seconds)
Converts a time in seconds to a human readable format.
|
static void |
LIVE_Init()
Initiates the live player.
|
static void |
LIVE_Prepare(Context c)
Method to prepare the live player; shows a dialog and then sets it up to be transfered to livePreparedListenerOther.
|
static void |
LIVE_SendErrorReport(java.lang.String msg)
Sends an error report to the folks at Qweex.
|
void |
onCreate(Bundle savedInstanceState)
Called when the activity is first created.
|
boolean |
onCreateOptionsMenu(Menu menu) |
void |
onDestroy()
Called when the activity is going to be destroyed.
|
boolean |
onOptionsItemSelected(MenuItem item) |
void |
onResume()
Called when the activity is resumed, like when you return from another activity or also when it is first created.
|
static void |
playPause(Context c,
View v) |
static void |
playTrack(Context c,
int previousOrNext,
boolean sp)
This method plays the next song in the queue, if there is one.
|
void |
showUpdateNews()
Shows the update news for the current version
|
static void |
stop(Context c)
Stops the player.
|
static Message |
updateShow(int currentShow,
SharedPreferences showSettings)
Updates a show by checking to see if there are any new episodes available.
|
public static MediaPlayer mplayer
public static MediaPlayer live_player
public static DatabaseConnector databaseConnector
public static Notification notification_download
public static Notification notification_playing
public static Notification notification_chat
public static Notification notification_alarm
public static java.lang.String storage_path
public static int downloading_count
public static int current_download
public static final java.text.SimpleDateFormat sdfRaw
public static final java.text.SimpleDateFormat sdfRawSimple1
public static final java.text.SimpleDateFormat sdfRawSimple2
public static final java.text.SimpleDateFormat sdfTime
public static final java.text.SimpleDateFormat sdfSource
public static java.text.SimpleDateFormat sdfDestination
public static final java.text.SimpleDateFormat sdfFile
public static final java.text.SimpleDateFormat sdfHuman
public static final java.text.SimpleDateFormat sdfHumanLong
public static Drawable playDrawable
public static Drawable pauseDrawable
public static Callisto.PlayerInfo playerInfo
public static Resources RESOURCES
public static float DP
public static TextView chatView
public static TextView logView
public static boolean europeanDates
public static OnCompletionListenerWithContext nextTrack
public static OnErrorListenerWithContext nextTrackBug
public static OnPreparedListenerWithContext okNowPlay
public static final int NOTIFICATION_ID
public static SharedPreferences alarmPrefs
public static final java.lang.String PREF_FILE
public static boolean live_isPlaying
public static int appVersion
public static boolean is_widget
public static WifiLock Live_wifiLock
public static OnClickListener next
public static OnClickListener previous
public static OnClickListener playPauseListener
public static OnClickListener playlist
public static OnClickListener seekDialog
public static Handler updateHandler
public void onCreate(Bundle savedInstanceState)
savedInstanceState
- Um I don't even know. Read the Android documentation.public void onDestroy()
public void onResume()
public static void build_layout(Context c, View mainView)
c
- The current context in which to build.mainView
- The main view of the Activity to be wrapped above the player controlspublic static void playTrack(Context c, int previousOrNext, boolean sp)
c
- The context of the current activity.previousOrNext
- >0 if it should play the next track, <0 for the previous, and 0 for the currentsp
- true if the player should start playing when it changes tracks, false otherwisepublic static void playPause(Context c, View v)
public static java.lang.String formatTimeFromSeconds(int seconds)
seconds
- The raw number of seconds to format.public static Message updateShow(int currentShow, SharedPreferences showSettings)
currentShow
- The number of the current show in relation to the AllShows.SHOW_LIST arrayshowSettings
- The associated SharedPreferences with that showpublic static void LIVE_Init()
public static ProgressDialog BaconDialog(Context c, java.lang.String title, java.lang.String message)
public static void LIVE_Prepare(Context c)
public static void LIVE_SendErrorReport(java.lang.String msg)
public void showUpdateNews()
public boolean onCreateOptionsMenu(Menu menu)
public boolean onOptionsItemSelected(MenuItem item)
public static void stop(Context c)