package org.abrantix.rockon.rockonnggl;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.DialogInterface.OnCancelListener;
import android.content.SharedPreferences.Editor;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.media.AudioManager;
import android.net.Uri;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.CompoundButton.OnCheckedChangeListener;
public class RockOnNextGenGL extends Activity {
private final String TAG = "RockOnNextGenGL";
/** Global Vars */
// Context mContext;
int mRendererMode;
int mTheme;
int mBrowseCatMode;
GLSurfaceView mGlSurfaceView;
// RockOnCubeRenderer mRockOnCubeRenderer;
RockOnRenderer mRockOnRenderer;
private RockOnNextGenDefaultExceptionHandler mDefaultExceptionHandler;
boolean mIsSdCardPresentAndHasMusic = true;
String mNewPlaylistName;
NavScrollerView mNavScroller;
/** Dialogs */
private AlertDialog.Builder mPlaylistDialog;
private AlertDialog.Builder mViewModeDialog;
private AlertDialog.Builder mThemeDialog;
private AlertDialog.Builder mSpecificThemeDialog;
private AlertDialog.Builder mInstallConcertAppDialog;
/** Initialized vars */
AlbumArtDownloadOkClickListener mAlbumArtDownloadOkClickListener = null;
ThemeChangeClickListener mThemeChangeClickListener = null;
private IRockOnNextGenService mService = null;
/** State Variables */
static int mState = Constants.STATE_INTRO;
static String mTrackName = null;
static String mArtistName = null;
static long mTrackDuration = -1;
static long mTrackProgress = -1;
static float mNavigatorPositionX = -1;
static float mNavigatorTargetPositionX = -1;
static float mNavigatorPositionY = -1;
static float mNavigatorTargetPositionY = -1;
static int mPlaylistId = Constants.PLAYLIST_UNKNOWN;
/*********************************************************
* *******************************************************
*
* USES REFLECTION
*
* Media Button registration for 2.2
*
* ******************************************************/
private static Method mRegisterMediaButtonEventReceiver;
private static Method mUnregisterMediaButtonEventReceiver;
private AudioManager mAudioManager;
private ComponentName mRemoteControlResponder;
private static void initializeRemoteControlRegistrationMethods() {
try {
if (mRegisterMediaButtonEventReceiver == null) {
mRegisterMediaButtonEventReceiver = AudioManager.class.getMethod(
"registerMediaButtonEventReceiver",
new Class[] { ComponentName.class } );
}
if (mUnregisterMediaButtonEventReceiver == null) {
mUnregisterMediaButtonEventReceiver = AudioManager.class.getMethod(
"unregisterMediaButtonEventReceiver",
new Class[] { ComponentName.class } );
}
/* success, this device will take advantage of better remote */
/* control event handling */
} catch (NoSuchMethodException nsme) {
/* failure, still using the legacy behavior, but this app */
/* is future-proof! */
}
}
static {
initializeRemoteControlRegistrationMethods();
}
private void registerRemoteControl() {
try {
if (mRegisterMediaButtonEventReceiver == null) {
return;
}
mRegisterMediaButtonEventReceiver.invoke(mAudioManager,
mRemoteControlResponder);
} catch (InvocationTargetException ite) {
/* unpack original exception when possible */
Throwable cause = ite.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else {
/* unexpected checked exception; wrap and re-throw */
throw new RuntimeException(ite);
}
} catch (IllegalAccessException ie) {
Log.e("MyApp", "unexpected " + ie);
}
}
private void unregisterRemoteControl() {
try {
if (mUnregisterMediaButtonEventReceiver == null) {
return;
}
mUnregisterMediaButtonEventReceiver.invoke(
mAudioManager,
mRemoteControlResponder);
} catch (InvocationTargetException ite) {
/* unpack original exception when possible */
Throwable cause = ite.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else {
/* unexpected checked exception; wrap and re-throw */
throw new RuntimeException(ite);
}
} catch (IllegalAccessException ie) {
System.err.println("unexpected " + ie);
}
}
/*********************************************************
*********************************************************/
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// /****************
// * DEBUG ONLY
// ****************/
// mAnalytics = GoogleAnalyticsTracker.getInstance();
//// mAnalytics.start("UA-20349033-2", 6*60 /* *60 */ /* every 6 hours */, this);
// mAnalytics.start("UA-20349033-2", this);
//
// mAnalytics.trackPageView("/RockOnNextGenGL");
// mAnalytics.dispatch();
// mAnalytics.stop();
/* set up our default exception handler */
mDefaultExceptionHandler =
new RockOnNextGenDefaultExceptionHandler(
RockOnNextGenGL.this);
/* media button reflection variables */
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
[开源项目]Android_炫酷的3D音乐播放器_各种特效OpenGL.zip (329个子文件)
IRockOnNextGenService.aidl 2KB
.classpath 429B
.DS_Store 6KB
.DS_Store 6KB
GoogleAdView.jar 71KB
libGoogleAnalytics.jar 28KB
RockOnNextGenGL.java 125KB
RockOnNextGenService.java 110KB
RockOnCubeRenderer.java 72KB
RockOnMorphRenderer.java 55KB
RockOnWallRenderer.java 50KB
RockOnBoringRenderer.java 48KB
CursorUtils.java 37KB
NavItemUtils.java 24KB
Constants.java 19KB
AlbumArtistSwitcherView.java 19KB
LockScreen.java 13KB
EqView.java 13KB
AlbumArtUtils.java 12KB
RockOnNextGenAppWidgetProvider4x4.java 12KB
RockOnNextGenPreferences.java 11KB
SortCursor.java 11KB
GoogleImagesFetcher.java 10KB
ManualAlbumArtActivity.java 10KB
NavScrollerView.java 10KB
RockOnNextGenAppWidgetProvider3x3.java 9KB
RockOnNextGenAppWidgetProvider.java 9KB
MediaButtonIntentReceiver.java 9KB
DirectoryFilter.java 8KB
TriangleRenderer.java 8KB
AlbumArtImporter.java 8KB
RockOnNextGenAppWidgetProvider4x1.java 8KB
EqualizerWrapper.java 8KB
ProgressBarView.java 8KB
NavGLTouchListener.java 7KB
RockOnRenderer.java 7KB
PlaylistArrayAdapter.java 7KB
WidgetCoverUtils.java 7KB
SongCursorAdapter.java 6KB
EqualizerActivity.java 6KB
DirectoryFilterActivity.java 5KB
ManualArtChooserAdapter.java 5KB
FreeCoversNetFetcher.java 5KB
AlbumCursorAdapter.java 5KB
AlbumArtProcessor.java 5KB
ImageProcessor.java 5KB
Cube.java 5KB
CubeRenderer.java 4KB
GLScroller.java 4KB
ThemeChangeClickListener.java 4KB
RockOnNextGenDefaultExceptionHandler.java 4KB
EqSettings.java 4KB
IntroView.java 3KB
AlbumArtDownloadOkClickListener.java 3KB
ScreenOnIntentReceiver.java 3KB
SearchUtils.java 3KB
Util.java 3KB
SwitcherViewTouchListener.java 2KB
DonateActivity.java 2KB
DirectoryFilterAdapter.java 2KB
NavScrollerTouchListener.java 2KB
EqTouchListener.java 2KB
AdsenseStuff.java 2KB
APILevelChecker.java 2KB
ClearAlbumArtDialogPreference.java 2KB
ProgressBarTouchListener.java 1KB
ContentProviderUnifier.java 1KB
ArtistAlbumsDialogButtonClickListener.java 1KB
SongSelectedClickListener.java 1KB
RockOnFileUtils.java 986B
AutoCompleteFilterQueryProvider.java 880B
PlaylistOptionClickListener.java 771B
SongOptionClickListener.java 723B
AlbumClickListener.java 606B
Playlist.java 371B
NavItem.java 346B
ArtistAlbumHelper.java 146B
AlphabetNavItem.java 141B
rz_promo.jpg 48KB
rz_banner_180.jpg 37KB
unknown_256.jpg 3KB
LICENSE-GPLv3 34KB
logo_intro.png 17KB
logo_paypal.png 16KB
repeat.png 10KB
logo_market.png 8KB
icon_dice.png 8KB
play_glow.png 7KB
playqueue_glow.png 6KB
search_glow.png 6KB
pause_glow.png 5KB
eq_knob.png 5KB
icon_dice.png 5KB
icon_dice.png 5KB
play.png 5KB
search.png 4KB
eq_knob.png 4KB
eq_knob.png 4KB
play_glow.png 4KB
icon_dice.png 4KB
共 329 条
- 1
- 2
- 3
- 4
资源评论
马coder
- 粉丝: 1245
- 资源: 6593
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- YOLOv8完整网络结构图详细visio
- LCD1602电子时钟程序
- 西北太平洋热带气旋【灾害风险统计】及【登陆我国次数评估】数据集-1980-2023
- 全球干旱数据集【自校准帕尔默干旱程度指数scPDSI】-190101-202312-0.5x0.5
- 基于Python实现的VAE(变分自编码器)训练算法源代码+使用说明
- 全球干旱数据集【标准化降水蒸发指数SPEI-12】-190101-202312-0.5x0.5
- C语言小游戏-五子棋-详细代码可运行
- 全球干旱数据集【标准化降水蒸发指数SPEI-03】-190101-202312-0.5x0.5
- spring boot aop记录修改前后的值demo
- 全球干旱数据集【标准化降水蒸发指数SPEI-01】-190101-202312-0.5x0.5
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功