Tuesday, January 31, 2012

Issues do not playback in the latest version

In my test environment has not been confirmed, we received reports that some users can not play.

Please tell me if that situation occurs if the same symptoms.

Describes the changes to For reference:
The latest version now supports OwnCloud.

How do was respond in that? It does not contain OwnCloud file extension in the URL of the song.

Example ampache:
/play/index.php?ssid=7195d26dc6dea2766d8fa85168ff81a9&oid=26372&uid=2&name=/AC%2FDC%20-%20Hold%20Me%20Back.mp3

Example owncloud:
/play/index.php?ssid=7195d26dc6dea2766d8fa85168ff81a9&oid=26372

The OwnCloud are no parameters in the Name.
I was to determine the types of files based on the previous parameter. And a MP3 or Ogg or that is?
But because the extension to OwnCloud are lost without it.

This is a cause may not play on some devices.
Please share your experience any information about something else.


Friday, January 27, 2012

JustPlayer of 2.39 has been released

The main modification is in writing the previous entry.

Bug fixes:
+ Optimized the process of updating the widget
+ Optimized the display of playing time
+ Optimized the delay of the image reading
+ Fixed Handling session timeouts
+ Fixed Footer processing

Wednesday, January 25, 2012

Scheduled for release this week

This week is a little update. The reason so busy at work.


The main modification is compatible OwnCloud.

1 Can now play music OwnCloud.
2 Indexes can now be generated even if special characters are used.
3 Fix the delay loading process
4 Music can now be synchronized with the synchronization process

Publish the application for testing.

*** The link has been deleted ***
http://dl.dropbox.com/u/8050603/JustPlayer.apk
(This is JustPlayer)
http://dl.dropbox.com/u/8050603/Just%20Player%20ft.%20Ampache.apk
(This is Ampache Plugin ver1)
http://dl.dropbox.com/u/8050603/AmpacheProvider_fix.apk
(This is Ampache Plugin ver2)

There are two plug-in Ampache.
AndroidSDK2.1 ver1 is less so is not available using the API will not work.
Instead, the full string conversion.
***


Monday, January 23, 2012

HTML escaping in the XML processing


The entry because there was a problem parsing the XML. HTML escape characters were included in the data obtained from OwnCloud. Therefore, it is the error occurred in retrieving the data.

<artist id='2'>
  <name>Die &Auml;rzte</name>
  <albums>1</albums>
  <songs>13</songs>
  <rating>0</rating>
  <preciserating>0</preciserating>
</artist>

&Auml; :This is an escaped string

There was an error reading this XML

  
01-23 17:40:16.515: E/AmpacheProvider(13269): XMLHandler.XmlPullParserException
01-23 17:40:16.515: E/AmpacheProvider(13269): org.xmlpull.v1.XmlPullParserException: unresolved: Ä (position:TEXT @147:28 in java.io.StringReader@413dfa78) 
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.checkRelaxed(KXmlParser.java:302)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.readEntity(KXmlParser.java:1268)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.readValue(KXmlParser.java:1385)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.next(KXmlParser.java:390)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at org.kxml2.io.KXmlParser.nextText(KXmlParser.java:2056)
01-23 17:40:16.515: E/AmpacheProvider(13269):  at jp.co.kayo.android.localplayer.ds.ampache.util.XMLUtils.getTextValue(XMLUtils.java:26)

Reading resulted in an error because it was determined that the data is stored in the form of ENTITY_REF type instead of TEXT type.
Actual processing are as follows.

public String getTextValue(XmlPullParser parser){
        try {
            return parser.nextText();
        } catch (XmlPullParserException e) {
            Logger.e("XMLHandler.XmlPullParserException", e);
        } catch (IOException e) {
            Logger.e("XMLHandler.IOException", e);
        }
        return "";
}

Therefore, I tried replacing the nextToken nextText to the exact process.

        StringBuilder buf = new StringBuilder();
        do{
                int type = parser.nextToken();
                
                if(type == XmlPullParser.TEXT || type == XmlPullParser.CDSECT){
                    buf.append(parser.getText());
                }
                else if(type == XmlPullParser.ENTITY_REF){
                    //empty
                }
                else{
                    break;
                }
        }while(true);
        return buf.toString();


I used the nextToken to avoid the checking process.
And the process has been divided into multiple combining text

This process is now as follows:


Die &Auml;rzte  ->  Die rzte


But this is not enough.
Added the following code to restore the escaped string.

        StringBuilder buf = new StringBuilder();
        do{
                int type = parser.nextToken();
                
                if(type == XmlPullParser.TEXT || type == XmlPullParser.CDSECT){
                    buf.append(parser.getText());
                }
                else if(type == XmlPullParser.ENTITY_REF){
                    buf.append(Html.fromHtml("&"+parser.getName()+";").toString());
                }
                else{
                    break;
                }
        }while(true);
        return buf.toString();


Die &Auml;rzte  ->  Die Ärzte


This is not smart. Works as intended But.
If there is a correct implementation for ENTITY_REF. I want to know

This code is not going to release

Sunday, January 22, 2012

E.g: Next Feature


Hi there

The following items feature development:

1. Cache can be generated in Playlist and Artist and Album.
2. Cache can be delete in Playlist and Artist and Album.
3. Show only those with Cache(For offline use)
4. Change the file Cache (alternative download)
5. Delete the cache automatically counts up the Plays. However, recent registration date and time to be excluded

Therefore need to be implement:
Change Database -
* Flags of the existence of Cached
* Field of Plays
Control mechanism of the download process -


Saturday, January 21, 2012

About URLConnection

Today is Chinese New Year.
The market is so concerned about the comments after the release, so I can not support.

Yes, just released a new version.

The main modification is related to changes in layout and menu display album. Once, several bug fixes.


We also fixed with respect to the subject and then also the URL connection.
Changed the way I say the right one before rather than fixed.


URL connection handling has been changed about two weeks ago.
This is a fix for concurrent communication with SSL, the scope of my testing was working well.
However, commenting on reports that the market is gets stuck out.

Specifically, the following has been changed.

Two weeks ago between :
                connection = (HttpURLConnection) url.openConnection();
                connection.setRequestMethod("GET");
                connection.setConnectTimeout(CONNECTION_TIMEOUT);
                connection.setReadTimeout(CONNECTION_TIMEOUT);
                int responseCode = connection.getResponseCode();

                if (responseCode == 200) {
                    in = connection.getInputStream();
                }

After the change:
synchronized SchemeRegistry getRegistry(){
        if(mSchemeRegistry == null){
            mSchemeRegistry = new SchemeRegistry();
            // http scheme
            mSchemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
            // https scheme
            mSchemeRegistry.register(new Scheme("https", new EasySSLSocketFactory(), 443));
        }
        return mSchemeRegistry;
    }
    
    synchronized BasicHttpParams getHttpParams(){
        if(mParams == null){
            mParams = new BasicHttpParams();
            mParams.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30);
            //mParams.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new ConnPerRouteBean(30));
            mParams.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);
            HttpConnectionParams.setSocketBufferSize(mParams, SOCK_BUFSIZE); 
            HttpConnectionParams.setSoTimeout(mParams, SOCKET_TIMEOUT);
            HttpConnectionParams.setConnectionTimeout(mParams, SOCKET_TIMEOUT); 
            HttpProtocolParams.setContentCharset(mParams, "UTF-8"); 
            HttpProtocolParams.setVersion(mParams, HttpVersion.HTTP_1_1);
            
            CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
            BasicScheme basicAuth = new BasicScheme();
            mHttpContext = new BasicHttpContext();
            mHttpContext.setAttribute("http.auth.credentials-provider", credentialsProvider);
            mHttpContext.setAttribute("preemptive-auth", basicAuth);
        }
        return mParams;
    }

//implement here.
                m = new ThreadSafeClientConnManager(getHttpParams(), getRegistry());
                DefaultHttpClient client = new DefaultHttpClient(cm, getHttpParams());
                
                HttpGet get = new HttpGet(url.toString());
                get.setHeader("Host", url.getHost());
                get.setHeader("User-Agent", "Android-JustPlayer");
                HttpResponse httpResponse = client.execute(get,mHttpContext);
                if (httpResponse != null
                        && httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                    HttpEntity httpEntity = httpResponse.getEntity();
                    in = httpEntity.getContent();
                }

first approach is generic, it is very easy to connect was just passing the URL. However, some users can not Basic authentication, it was reported that an SSL connection or not. And now the more unstable the connection request.

So, we changed the usage of HttpClient. This is to work look, may not be able to connect port 8080, and in case the connection itself fails.
These are must be supported patient.

But for those in need now, first aid anyway
Has been changed as follows.

if(url.toString().startsWith("https")){
//new code
}
else{
//old code
}

Try to look at it for a while.




Wednesday, January 18, 2012

Modify the screen of album art

Now that complete the first stage of the main screen Fix, The next screen album art.

I wanted to make the app has changed the layout of the screen, the convenience of landscape and portrait screens.
Currently it is not so.

Portrait is preferred that can be operated with one hand.

portrait1
portrait2


By swiping the screen to switch to this.
But the screen also has many pieces are stacked like so confusing now, and album art, song only.

The landscape screen intended to be used, so calm, and most amount of information.

landscape
This process is switched smoothly by using a fragment.
The other screen, change the song list or artist list can be called directly.
quick action dialog
Will change in the next release.

Monday, January 16, 2012

Added support for AndroidOS1.6

Now possible be could in the previous entry!
JustPlayer now works in the IS01.

What was the cause? It is ProGuard.
VerifyError had occurred for that the JustPlyaer use the CompatiblityAPI.

The error is caused by obfuscation using external classes and classes that are included in the layout of the external Jar.


So, as the technique should be added to the configuration file as exempt from Proguard obfuscation.
For example,

-keepclasseswithmembers  class android.support.** {
    *;
}

But this is not enough.

-dontwarn **CompatHoneycomb
-keep class android.support.v4.** { *; }


There is also need to add these two lines.
Incidentally, when testing the APK after creating a Proguard applied once, and I have to install and do not check this.

adb install <apk file>

So enjoy your music life of IS01/HTC-03A users.


Thursday, January 12, 2012

Do you know the IS01?

I have an IS01. This device is the first Android phone made ​​by Sharp. IS01 are loved and widely known as known as eyeglasses case.

But this device is AndroidOS1.6. And that was not updated to 2.1.
http://japanese.engadget.com/2010/03/29/au-android-is01-5/

Changing the subject, I am made an app that JustPlayer. Of course people look at this blog will know.


Although JustPlayer made ​​last year. Support more than was originally SDK1.6.
But when the corresponding Gingerbread, 1.6 lost its support.
The reason I wanted to use AudioEffect.

After a while, we implemented the process of switching to match in the OS using the AudioEffect. Could correspond to 2.1 and 2.2 because of this.

Unfortunately at this time, 1.6 are excluded. The reason the test was cumbersome.

So, today is not compatible decided to challenge the IS01.


Friday, January 6, 2012

about WIFI Lock

WIFI lock is required to keep a handle to turn off the WIFI connection in sleep.
Specifically, the code will look like this:

void freeWifi() {
    if (mWifiLock.isHeld()){
        mWifiLock.release();
    }
}

void lockWifi(final MediaData track){
    File cacheFile = StreamCacherServer.getCacheFile(this, track.data);
    if ((cacheFile == null && track.data.startsWith("http")) || (streamcacheserv!=null && streamcacheserv.isRunning())){
        mWifiLock.acquire();
    }
    else if (mWifiLock.isHeld()){
        mWifiLock.release();
    }
}

Lock before to play songs using this code, you may be stopped during playback Release.
However, it seems there is a problem that does this JustPlayer.
The JustPlayer, has a prefetch process of reading music.
Play the song and that which must be applied for the Lock at another location.
I think it was so seemingly went well, the following error occurred.

java.lang.UnsupportedOperationException: Exceeded maximum number of wifi locks
at android.net.wifi.WifiManager$WifiLock.acquire(WifiManager.java:968)
at jp.co.kayo.android.localplayer.service.MediaPlayerService.g(Unknown Source)
at jp.co.kayo.android.localplayer.service.MediaPlayerService.onPrepared(Unknown Source)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1442)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)

I'm sorry. It is an error to obtain multiple locks too. I'll fix in the next release.

Wednesday, January 4, 2012

ICS Support


I have other work I should, But I escaped.
That has implimented a JustPlayer today.


The current implementation has been changed playlist.
We know you want. But I am worried if I do I implement it. The program is a simple, GUI. How difficult do you propose that is usability.

For example, adding a playlist, add a new playlist, replacing the playlist, added to the current playlist. Replace the current playlist. Add to context menu of all these measures and the best idea.


What to do then? There is one answer to QuickActionDialog. Is it easy to understand icons can be increased even if this action.
But I'm not good at design icons.
Would be unnecessary and confusing to use the quad icon.

The icons are not a problem to be solved soon, I decided to do something else.


I want to support the implementation of ICS had before.
The following screen shot will work with only ICS / HonyComb.

Notification control

LockScrenn control



If the user of the ICS, please forward to the next release.

Tuesday, January 3, 2012

The next release

Maybe version 2.32 is scheduled for


Hidden by the automatic control features.
But I thought it was personally difficult to use.
So I was prepared to release a version of the appearance time.
Has been extended to 5 seconds before the interval was 0.8 seconds.


But to release a fix so bad about this, and with another features.
It is the ability to change the color of the widget.
Please try to use a bonus I believe.

color setting

display sample


Monday, January 2, 2012

problems caused by hardware Accelerated

The following image shows a broken screen.
VideoTab
I do not know why this happen.
What is clear is that this happens only because of a hardwareconfiguration accessor.
Now possible to speed up the rendering by using the hardware configuration in accessors Honycomb / IceCreamSandwich.
Is the result on screen when scrolling occurs many times when the ListView accessor configured to On.
It does not work well with the hardware configuration is the ListView accessor was heard, It is terrible.
For now, leave the flag is turned OFF to care.


android:hardwareAccelerated="false"



Sunday, January 1, 2012

2.31 [179] released

a Happy New Year! Have you tried using the latest JustPlayer?
This upgrade is primarily fixes for Ampache.
So, then please use the latest Ampache ft JustPlayer.
Have to use the full cache of Ampache.
It should be easy to use tabs for their music.
 In addition, you should have also improved the response of artists and genres.