|
Member 13208523 wrote: .how can i go about it By starting.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
i dont understand what you are trying to mean
|
|
|
|
|
Member 13208523 wrote: am i going to code it Well that would be a good start.
|
|
|
|
|
I am trying to create an app to get location and make it location change aware.
|
|
|
|
|
You can use the Location APIs in Android, that are supported in Java language. You can utilize it to consume the location services from GSM or GPS based location services.
I wrote an article that covers the basics of this concept; Ok Android, Broadcast my location!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
See here, and here (preferred).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I used jdbc ("net.sourceforge.jtds.jdbc.Driver" -jtds-1.3.1.jar)for My Android Application:
String ip = "192.168.3.67";
String classs = "net.sourceforge.jtds.jdbc.Driver";
String db = "QLNV";
String un = "sa";
String password = "admin";
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Connection conn = null;
String ConnURL = null;
try {
Class.forName(classs);
ConnURL = "jdbc:jtds:sqlserver://" + ip + ";"
+ "databaseName=" + db + ";user=" + un + ";password="
+ password + ";";
conn = DriverManager.getConnection(ConnURL);...
I tested it on Android Emulator: it worked well but I tested it on my Android phone: it maybe not worked well. I don't know why? please help me, thanks much..
|
|
|
|
|
Your phone is probably not on your local 192.168.xxx.xxx LAN.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
So..How can i do? I added :
<uses-permission android:name="android.permission.INTERNET">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
in AndroidManifest.xml
So can help me? thanhs a lot!
|
|
|
|
|
Before worrying about permissions, I'd make sure the phone is connected to your LAN through wifi. The phone should show your network name and "Connected" at the top of the wifi list under settings. Until you get that set up, you have no hope of accessing your server.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Member 11900140 wrote: on my Android phone: it maybe not worked well. You need to explain what that means, we cannot guess what failures or errors you see.
|
|
|
|
|
My Real Android phone: can not connect to or get data from my Sql Server database QLNS.
|
|
|
|
|
Why not? Does it have a network connection to the database server?
|
|
|
|
|
Are you checking for errors? Are exceptions being thrown? Have you stepped through the code using the debugger?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Don't be silly. Who does that when CodeProject is here? 
|
|
|
|
|
Twice...because once is never enough.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Short Video Demonstration of the issue(s)
I have developed a recipe search application that obtains data from an API and it allows the user to view and save the data.
My android application uses multiple fragments within one activity. They share one container and when a new fragment is loaded it replaces the old fragment.
My application has the following fragments: Home, Search, Filters, RecipeView and more.
I am experiencing multiple issues with popping the fragment back stack once a search has been carried out or a favourite recipe has been displayed. The search fragment is a grid view that uses a custom adapter, and to perform a search the user uses a toolbar search view which executes code upon pressing the submit (return) button.
The home fragment is displayed first allowing a user to click a quick search button such as breakfast, clicking the button displays the search fragment with results from the API. The user can then click on an item which opens the RecipeView fragment, pressing the back button on these fragments does not cause an issue and a user can navigate back to the previous fragments including the home one that was displayed initially.
Additionally, a user can navigate to the search fragment using the navigation drawer. The search fragment allows the user to perform a search or click a filter via buttons on the toolbar. Clicking the search icon/button allows a user to enter text and once they press enter/return the search is perform and the grid view is populated.
Prior to performing a search or clicking the search button, pressing the filter button displays the filters fragment and from there, pressing the back button will allow a user to navigate back to the search view fragment.
If the user presses the search button which will open the search view menu item (allowing text input on the toolbar) and then presses the filters button, the filters activity is displayed. However, pressing the back button does not navigate to the previous fragment, it removes the focus from the toolbar. Pressing the back button again still does not navigate back and changes the toolbars text back to the search fragments specified title ("Recipe Search"). Pressing the back button again will then navigate back to the search fragment, removing the filters fragment from sight.
I have tried removing the focus from the toolbar so that pressing back is not removing toolbars focus and the app still requires three back button presses.
Furthermore, I am having another issue with fragments overlaying each other. From the home fragment that is loaded on create, if a user navigates using the side menu to the favourites fragment, a list of the saved favourites in a grid view are shown using the search fragment. Pressing the back button from the search fragment does not cause any issues and the app will navigate back to the home fragment; additionally, clicking a recipe will open the RecipeView fragment displaying a recipes information.
The issue arises from here. If the back button is pressed the app will navigate backwards loading the home fragment not the search fragment and the recipe fragment stays on screen causing both fragments to overlap. Pressing the back button again will remove the home fragment and leave the recipe fragment in the container; pressing the back button again will close the application (The search fragment is not shown and the order is incorrect).
Attempts
1. I have tried implementing this ([Avoid fragments overlapping][2])
2. I have tried calling classes using a new instance method rather than creating new ones in the MainActivity
3. I have tried to add fragments rather than replace them
4. I have tried overriding the back button press
5. I have tried addToBackStack(null) & addToBackStack(FragmentTag)
6. I have tried to remove all views from the frame layout within my fragment handler method
Thank you for taking the time to read my post
java - (Short Video Demo) Fragment back navigation issue and overlapping fragments using a frame layout - Stack Overflow[^]
Daniel Ali
|
|
|
|
|
delete.Thanks
modified 17-May-17 4:55am.
|
|
|
|
|
Please don't post links to questions elsewhere; that is as bad as posting the same question again.
|
|
|
|
|
I have created android application to stream online radio stations but when I click start button to play radio it won't start.In service I read ip address of file from url and add it to string.When user selects radio station I add port to string with ip address.
public class BackgroundService extends Service implements OnCompletionListener
{
MediaPlayer mediaPlayer;
private String STREAM_URL;
final String textSource = "http://audiophileradio.stream/Ip.txt";
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate()
{
}
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
new MyTask().execute();
return START_STICKY;
}
public void onDestroy() {
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
mediaPlayer.release();
}
public void onCompletion(MediaPlayer _mediaPlayer) {
stopSelf();
}
@Override
public boolean onUnbind(Intent intent)
{
return super.onUnbind(intent);
}
private class MyTask extends AsyncTask<Void, Void, String>
{
String textResult;
@Override
protected String doInBackground(Void... params) {
URL textUrl;
try {
textUrl = new URL(textSource);
BufferedReader bufferReader
= new BufferedReader(new InputStreamReader(textUrl.openStream()));
String StringBuffer;
String stringText = "";
while ((StringBuffer = bufferReader.readLine()) != null) {
stringText += StringBuffer;
}
bufferReader.close();
textResult = stringText;
return textResult;
} catch (MalformedURLException e) {
e.printStackTrace();
textResult = e.toString();
} catch (IOException e) {
e.printStackTrace();
textResult = e.toString();
}
return null;
}
@Override
protected void onPostExecute(String result) {
Log.d("DebugTag", "Value: " + textResult);
super.onPostExecute(result);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(BackgroundService.this);
String radio = sharedPreferences.getString("station", "8000");
if (radio != null)
{
STREAM_URL += ":" + radio;
}
mediaPlayer = new MediaPlayer();
if (!mediaPlayer.isPlaying())
{
try
{
mediaPlayer.reset();
mediaPlayer.setDataSource(STREAM_URL);
mediaPlayer.prepareAsync();
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
{
@Override
public void onPrepared(MediaPlayer mp)
{
mediaPlayer.start();
}
});
} catch (IOException e)
{
e.printStackTrace();
}
}
mediaPlayer.setOnCompletionListener(BackgroundService.this);
}
}
}
Main.java
public class Main extends Fragment
{
private ImageButton buttonPlay;
private MediaPlayer mPlayer;
Intent playbackServiceIntent;
private SeekBar volumeSeekbar = null;
private AudioManager audioManager = null;
View view;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
{
view = inflater.inflate(R.layout.fragment_main,container,false);
buttonPlay = (ImageButton) view.findViewById(R.id.buttonPlay);
mPlayer = new MediaPlayer();
initControls();
buttonPlay.setTag(1);
buttonPlay.setImageResource(R.drawable.play);
buttonPlay.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
if (Integer.parseInt(buttonPlay.getTag().toString()) == 1)
{
buttonPlay.setImageResource(R.drawable.stop);
view.setTag(0);
getActivity().startService(playbackServiceIntent);
Log.e("Play", "onStop");
Toast.makeText(getActivity(), "Play", Toast.LENGTH_SHORT).show();
} else
{
buttonPlay.setImageResource(R.drawable.play);
view.setTag(1);
mPlayer.stop();
getActivity().stopService(playbackServiceIntent);
Log.e("Stop", "onPlay");
Toast.makeText(getActivity(), "Stop", Toast.LENGTH_SHORT).show();
}
}
});
playbackServiceIntent = new Intent(getActivity(), BackgroundService.class);
return view;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
getActivity().setTitle("Audiophileradio");
}
private void startService()
{
getActivity().startService(new Intent(getActivity(),BackgroundService.class));
}
private void stopService()
{
getActivity().stopService(new Intent(getActivity(),BackgroundService.class));
}
private void initControls()
{
try
{
volumeSeekbar = (SeekBar) view.findViewById(R.id.seekBar);
audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);
volumeSeekbar.setMax(audioManager
.getStreamMaxVolume(AudioManager.STREAM_MUSIC));
volumeSeekbar.setProgress(audioManager
.getStreamVolume(AudioManager.STREAM_MUSIC));
volumeSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener()
{
@Override
public void onStopTrackingTouch(SeekBar arg0)
{
}
@Override
public void onStartTrackingTouch(SeekBar arg0)
{
}
@Override
public void onProgressChanged(SeekBar arg0, int progress, boolean arg2)
{
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC,
progress, 0);
}
});
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
modified 13-May-17 9:54am.
|
|
|
|
|
I have fixed the problem! Radio didn't work because I forgot to add http:// in ip address after reading it from url !!!
|
|
|
|
|
I created android application to stream online radio stations but it doesn't work.I want to read ip address from url and assign it to string and when user selects radio to listen I should add port to that string!!!
public class BackgroundService extends Service implements OnCompletionListener
{
MediaPlayer mediaPlayer;
private String STREAM_URL;
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate()
{
final StringBuilder text = new StringBuilder();
new Thread(new Runnable()
{
public void run()
{
try
{
URL url = new URL("http://audiophileradio.stream/Ip.txt");
HttpURLConnection conn=(HttpURLConnection) url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String str;
while ((str = in.readLine()) != null)
{
text.append(str);
}
in.close();
text.insert(text.length(), ":8000");
}
catch (Exception e)
{
Log.d("MyTag",e.toString());
}
}
}).start();
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(this);
String radio = sharedPreferences.getString("station", "8000");
if (radio != null && radio.equals("8000"))
{
text.append(":8000");
STREAM_URL = text.toString();
Toast.makeText(this,STREAM_URL,Toast.LENGTH_SHORT).show();
}
if (radio != null && radio.equals("8010"))
{
text.append(":8010");
STREAM_URL = text.toString();
}
if (radio != null && radio.equals("8020"))
{
text.append(":8020");
STREAM_URL = text.toString();
}
if (radio != null && radio.equals("8030"))
{
text.append(":8030");
STREAM_URL = text.toString();
}
mediaPlayer = new MediaPlayer();
try
{
mediaPlayer.setDataSource(STREAM_URL);
} catch (IOException e)
{
e.printStackTrace();
}
mediaPlayer.setOnCompletionListener(this);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
if (!mediaPlayer.isPlaying())
{
try
{
mediaPlayer.reset();
mediaPlayer.setDataSource(STREAM_URL);
mediaPlayer.prepareAsync();
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
{
@Override
public void onPrepared(MediaPlayer mp)
{
mediaPlayer.start();
}
});
} catch (IOException e)
{
e.printStackTrace();
}
}
return START_STICKY;
}
public void onDestroy() {
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
mediaPlayer.release();
}
public void onCompletion(MediaPlayer _mediaPlayer) {
stopSelf();
}
@Override
public boolean onUnbind(Intent intent)
{
return super.onUnbind(intent);
}
}
05-12 10:35:48.625 17340-17340/? I/SELinux: Function: selinux_android_load_priority [0], There is no sepolicy file.
05-12 10:35:48.625 17340-17340/? I/SELinux: Function: selinux_android_load_priority [1], There is no sepolicy version file.
05-12 10:35:48.625 17340-17340/? I/SELinux: Function: selinux_android_load_priority , priority version is VE=SEPF_GT-I9301I_4.4.2_0055
05-12 10:35:48.625 17340-17340/? I/SELinux: selinux_android_seapp_context_reload: seapp_contexts file is loaded from /seapp_contexts
05-12 10:35:48.625 17340-17340/? D/dalvikvm: Late-enabling CheckJNI
05-12 10:35:48.835 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.view.Window.setStatusBarColor, referenced from method audiophileradio.example.com.audiophileradio.MainActivity.onCreate
05-12 10:35:48.835 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 21917: Landroid/view/Window;.setStatusBarColor (I)V
05-12 10:35:48.835 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0081
05-12 10:35:48.865 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
05-12 10:35:48.865 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve interface method 21896: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
05-12 10:35:48.865 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve interface method 21898: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve interface method 21902: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 505: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 527: Landroid/content/res/TypedArray;.getType (I)I
05-12 10:35:48.875 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
05-12 10:35:48.965 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
05-12 10:35:48.965 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 316: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
05-12 10:35:48.965 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 468: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 470: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
05-12 10:35:49.175 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
05-12 10:35:49.185 17340-17340/audiophileradio.example.com.audiophileradio E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
05-12 10:35:49.185 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve instanceof 150 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
05-12 10:35:49.185 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
05-12 10:35:49.315 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: setProgressDrawable drawableHeight = 24
05-12 10:35:49.335 17340-17340/audiophileradio.example.com.audiophileradio D/AbsSeekBar: AbsSeekBar Constructor: misSeebarAnimationAvailable = false
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: setProgressDrawable drawableHeight = 24
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: setProgressDrawable getHeight() = 0
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: left = 0
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: top = 0
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: right = -64
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: bottom = 0
05-12 10:35:49.345 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: mProgressDrawable.setBounds()
05-12 10:35:49.365 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer-JNI: native_setup
05-12 10:35:49.365 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: constructor
05-12 10:35:49.365 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: setListener
05-12 10:35:49.365 17340-17340/audiophileradio.example.com.audiophileradio E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
05-12 10:35:49.405 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer-JNI: native_setup
05-12 10:35:49.405 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: constructor
05-12 10:35:49.405 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: setListener
05-12 10:35:49.405 17340-17340/audiophileradio.example.com.audiophileradio E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve instance field 14
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x5b at 0x005d
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve instance field 14
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x5b at 0x004c
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: DexOpt: unable to optimize instance field ref 0x000e at 0x54 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: DexOpt: couldn't find field Landroid/app/Notification;.headsUpContentView
05-12 10:35:49.415 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: DexOpt: unable to optimize instance field ref 0x000e at 0x61 in Landroid/support/v7/app/NotificationCompat;.addHeadsUpToBuilderLollipop
05-12 10:35:49.485 17340-17340/audiophileradio.example.com.audiophileradio I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.24.00.07
Build Date: 01/27/14 Mon
Local Branch: base_au149_adreno_au169_patches
Remote Branch:
Local Patches:
Reconstruct Branch:
05-12 10:35:49.605 17340-17340/audiophileradio.example.com.audiophileradio D/OpenGLRenderer: Enabling debug mode 0
05-12 10:35:49.615 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: left = 0
05-12 10:35:49.615 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: top = 0
05-12 10:35:49.615 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: right = 568
05-12 10:35:49.615 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: bottom = 68
05-12 10:35:49.615 17340-17340/audiophileradio.example.com.audiophileradio D/ProgressBar: updateDrawableBounds: mProgressDrawable.setBounds()
05-12 10:35:49.625 17340-17340/audiophileradio.example.com.audiophileradio I/dalvikvm: Could not find method android.support.v7.widget.LinearLayoutCompat.drawableHotspotChanged, referenced from method android.support.design.internal.ForegroundLinearLayout.drawableHotspotChanged
05-12 10:35:49.625 17340-17340/audiophileradio.example.com.audiophileradio W/dalvikvm: VFY: unable to resolve virtual method 18400: Landroid/support/v7/widget/LinearLayoutCompat;.drawableHotspotChanged (FF)V
05-12 10:35:49.625 17340-17340/audiophileradio.example.com.audiophileradio D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
05-12 10:36:19.895 17340-17340/audiophileradio.example.com.audiophileradio E/Play: onPlay
05-12 10:36:19.955 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer-JNI: native_setup
05-12 10:36:19.955 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: constructor
05-12 10:36:19.965 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: setListener
05-12 10:36:19.965 17340-17340/audiophileradio.example.com.audiophileradio E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
05-12 10:36:20.005 17340-17340/audiophileradio.example.com.audiophileradio E/MediaPlayer: Unable to create media player
05-12 10:36:20.005 17340-17352/audiophileradio.example.com.audiophileradio V/MediaPlayer: message received msg=8, ext1=0, ext2=0
05-12 10:36:20.005 17340-17352/audiophileradio.example.com.audiophileradio V/MediaPlayer: notify(8, 0, 0) callback on disconnected mediaplayer
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: java.io.IOException: setDataSource failed.: status=0x80000000
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer._setDataSource(Native Method)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1317)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1240)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at audiophileradio.example.com.audiophileradio.BackgroundService.onCreate(BackgroundService.java:107)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.handleCreateService(ActivityThread.java:2736)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.access$1900(ActivityThread.java:169)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.os.Looper.loop(Looper.java:136)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5476)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at dalvik.system.NativeStart.main(Native Method)
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: isPlaying: no active player
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer-JNI: isPlaying: 0
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer-JNI: reset
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio V/MediaPlayer: reset
05-12 10:36:20.015 17340-17352/audiophileradio.example.com.audiophileradio V/MediaPlayer: message received msg=8, ext1=0, ext2=0
05-12 10:36:20.015 17340-17352/audiophileradio.example.com.audiophileradio V/MediaPlayer: notify(8, 0, 0) callback on disconnected mediaplayer
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio E/MediaPlayer: Unable to create media player
05-12 10:36:20.015 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: java.io.IOException: setDataSource failed.: status=0x80000000
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer._setDataSource(Native Method)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1317)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1240)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at audiophileradio.example.com.audiophileradio.BackgroundService.onStartCommand(BackgroundService.java:124)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2883)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.access$2200(ActivityThread.java:169)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1374)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.os.Looper.loop(Looper.java:136)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5476)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
05-12 10:36:20.025 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
05-12 10:36:20.035 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
05-12 10:36:20.035 17340-17340/audiophileradio.example.com.audiophileradio W/System.err: at dalvik.system.NativeStart.main(Native Method)
05-12 10:36:20.195 17340-19228/audiophileradio.example.com.audiophileradio I/System.out: Thread-66912(HTTPLog):isShipBuild true
05-12 10:36:20.195 17340-19228/audiophileradio.example.com.audiophileradio I/System.out: Thread-66912(HTTPLog):SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
05-12 10:36:20.425 17340-19228/audiophileradio.example.com.audiophileradio D/MyTag: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
|
|
|
|
|
Depending on how long it takes your thread code to finish parsing http://audiophileradio.stream/Ip.txt, your preferences/append code is also accessing the text variable. What's the possibility of that happening out of order?
Pavlex4 wrote: mediaPlayer.setDataSource(STREAM_URL); Have you tried hard-coding the value passed to setDataSource() to see if the reset of your player-related code is correct?
This is unrelated to the problem you are having, but the four if() tests are not as efficient as they could be. You are checking radio 's value four more times than is necessary. Consider:
if (radio != null)
{
text.append(':').append(radio);
STREAM_URL = text.toString();
Toast.makeText(this, STREAM_URL, Toast.LENGTH_SHORT).show();
}
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello Regards,
How to Develop Shopping cart in Android,With PHP MYSQL Database Connectivity,and After that it will redirect to the payment module.
As i am doing Payment with Instamojo the Payment app is ready as well as static Shopping Cart is ready...But How to Connect with Database...
Kindly Help Me,I am Working On this Project Since last two weeks but nothing is fruitful.
Help me.
Thanking You,
Bhrugesh Shah
Bhrugesh Shah
|
|
|
|
|
|