Hi I need to play music from my android wear app.
I use this code to open my default music player
if(android.os.Build.VERSION.SDK_INT>=15){
Intent intent=Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
Intent.CATEGORY_APP_MUSIC);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//Min SDK 15
intent.setAction(Intent.ACTION_RUN);
startActivity(intent);
}
But i need to implement onplay,next, previ, stop..
Searched some services too its not working..
Is any other way to play songs from android wear
can anyone help me to finish this.
Related
I am making a standalone wear app and have uploaded the wear apk in beta testing
and have also added account in tester list but still the app won't appear in
wear play store
Can someone help me with this? i m new to android wear
I assume you are tring to use a closed beta distribution mode.
If you want your app to be found by simple search on the Play Store use an openBeta instead (everybody can search your app).
However, if you still have difficulties finding your app on the watch store you can use the following method starting directly at point (3).
If you need to stick with closed beta, you need to install the app trough the browser of your PC/MAC.
Use the test link of your app:
https://play.google.com/apps/testing/{YOUR_PACKAGE_NAME}
(Make sure you are logged in to the Google Play in your browser with the Google Account you authorized as a beta tester)
Accept to become a beta tester, and click on "Download the {YOUR_APP_NAME} app on Google Play" or Search it directly in the store.
Once you are in the Google Play listing page of your app, install it by clicking on the install button and
selecting your device:
I am using eddystone beacons to transmit my business url. How can I make the url notification received to alert thru sound on the users device? Any idea?
Understand that Eddystone-URL beacon advertisements don't automatically do anything on a user's phone unless they have an app installed to detect them.
Chrome for iOS and Android (installed on many newer Android devices, but very few iOS devices) will automatically detect Eddystone-URL advertisements and display a notification from Chrome if the user has opted-in. However, no sound is played. Bottom line: on a phone without a custom app, detecting an Eddystone-URL will not cause a sound to play.
If you build a custom app and get it installed on users' devices, you can certainly make it play a sound on Android devices when the beacon is detected. On iOS devices, you could also display a local notification on the device that will play a sound, but only if the user has the volume turned up on the device, does not have do not disturb on, and has opted-in to receiving notifications from the app.
I have a big issue with BackgroundMediaPlayer on Windows 10 mobile but I think that is very similar as API on Windows Phone 8.1. My app works similar as windows 10 sample. But I decided to add small user interface on mainpage where user can easily stop actual music. Problem is that when I am trying access BackgroundMediaPlayer.Current with events my music player don't play any music but when I delete events from main page It start works again. I manage my music player from other page. Is some way how to find out if my BackgroundMediaPlayer actualy playing some music with name of music ? Because I do not know how to continue with my project... Thanks for help
In Android Wear it shows the notification and we can reply back through wearable device. But how to start any app from the Wearable device like voice input("Ok Google") or tap on the icon. Action should start from the wearable device not from mobile.
For Example to start my mobile's camera through Android Wear Device i will give voice input as "start Camera" and camera should start.
With the current preview-version of the SDK, this is not possible yet.
But looking at http://developer.android.com/wear/design/user-interface.html tells you, that this will possible using the "Cue Cards".
You can do this now! :)
With the release of the Wear SDK (API Level 20, Android 4.4W), you can now develop Wear applications with very much the same stack as standard Android apps (i.e. Activities, Services, Layouts, Views, &c).
There is also an API for communication, which for example Google Play Music uses to control media playback from the watch.Therefore, you could develop an application, installed both in the Wear device and in the handheld, to launch the phone's camera when started (by sending the command from the Wear activity).
I want to display the list of songs in current playing lists, If users play music in my app, I could know what playlist is playing but if they were playing in zune app then switch to my app, my song list will be empty, even though the playlists is still running.
For example: if users's playing a playlists in windows phone 7 by Zune app, then they navigate to my App, how do I get that current play lists?
The current Windows Phone 7 APIs only integrate with phone media via the MediaPlayerLauncher, which allows you to launch media from your application.
The Mango (7.1) APIs allow you to integrate with the media + video hub, however, the APIs are still pretty simple. You can determine the currently playing media via MediaHistory.NowPlaying.
MediaHistory.NowPlaying is of Type MediaHistoryItem which has the Properties Title and ImageStream. You could add the Title and Image to your collection.
You can use MediaPlayer.Queue property of static class MediaPlayer from Microsoft.Xna.Framework library