2014年1月5日星期日

[Android] Through the Intent to open weixin, reported the wrong signature . Is not to advance a signature ?

        Intent localIntent2 = new Intent();
        localIntent2.setAction("android.intent.action.MAIN");
        localIntent2.addCategory("android.intent.category.LAUNCHER");
        localIntent2.addFlags(268435456);
        localIntent2.setClassName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");


is not the first signature ? Who did ? ?
------ Solution ---------------------------------------- ----
do not know have not tried
------ Solution -------------------------- ------------------
not done Android
------ Solution --------------- -----------------------------

------ Solution ------------------- -------------------------
not done , I do not know
------ Solution ------ --------------------------------------

------ Solution ---------- ----------------------------------
do not know will not ah. Just come Replies
------ Solution ------------------------------------ --------
no correct answer , you are sharing the rhythm to do ?
------ Solution ---------------------------------------- ----
I do not ah !
------ eference --------------------------------------- < br>
  The reply was deleted administrator at 2013-12-23 10:35:59

------ eference ------------------------------------ ---
  The reply was deleted administrator at 2013-12-23 10:36:23

------ eference ------------------------------------ ---

- ---- eference ---------------------------------------

------ eference ---- -----------------------------------
understand Bangding
------ eference - --------------------------------------

------ eference ---------- -----------------------------
http://blog.csdn.net/abin_gha/article/details/6274303
refer this

[Android] Share based on Qt and I made a small program

GLSL This is my first contribution to the times ......
Regardless , this time to tell you about is that I made ​​based on Qt and GLSL shader applet. We all know that if they produce a shader editor, time-consuming , but fortunately for OpenGL Qt provides a good package, so you can use Qt -based entry-level write powerful applications. Do not believe look:

can write shaders GLSL produced by my editor ( supports syntax highlighting ) .

Here is what I use to complete the gray shader effects :

This is the shader code :

we can try .
Here is what I wrote the blog , you can stroll around more than a look .
based on Qt and GLSL shader examples < / span>
written in Qt-based programs need to pay attention GLSL points
The following is a demo program and source code :
demo
source code
If you have git, you can also try to look into the local clone . I created a code repository on gitorious.
based on Qt and GLSL shader examples of
Finally we have any comments and suggestions you can post on the blog even a demo program that comes with feedback function of the guestbook ah.
------ Solution ---------------------------------------- ----
good top praise , words too
------ Solution ------------------------ --------------------
praise , more recently, learning OpenGL
------ Solution ----------- ---------------------------------
Oh , the top one . Ha ha.
------ eference --------------------------------------- < br>
international practice , grab the sofa by a big reward !
------ eference --------------------------------------- < br> are needed to learn this knowledge , thank you for sharing

[Android] QSound problems playing sounds

I created a Qt quick project , which use QSound play a sound,
Now the sound files into the resources qrc file.
calling the following code

QSound sound(":sound/testsound.mp3");
        sound.play();

only beep once , did not play a sound file .
I checked the path is not wrong , how to modify how it can play a sound ? ?
------ Solution ---------------------------------------- ----
QSound does not support resource files

only play files on disk .
------ Solution ---------------------------------------- ----


should support it.

problem here is QSound does not support mp3 format file playback .
document is described:
Microsoft Windows The underlying multimedia system is used; only WAVE format sound files are supported.
X11 The Network Audio System is used if available, otherwise all operations work silently. NAS supports WAVE and AU files.
Mac OS X NSSound is used. All formats that NSSound supports, including QuickTime formats, are supported by Qt for Mac OS ; X.
Qt for Embedded Linux A built-in mixing sound server is used, accessing / dev / dsp directly. Only the WAVE format is supported.
Symbian CMdaAudioPlayerUtility is used. All formats that Symbian OS or devices support are supported also by Qt.

landlord can try to sound resource converted to wav format to use. If you must use the mp3 on the use of other types of bars , QSound not do
------ eference -------------------------- -------------

Before
I can not play with the absolute path , issued only beep is heard .
If you want to play the voice of the resources
, what to use it?
------ eference --------------------------------------- < br> Qt version there are many online mp3 player , you can download point look .
before seen others use Phonon decode mp3
------ eference ---------------------------- -----------


I found sound.isAvailable pass the test ( ) returns false, the help system is no corresponding device , which should how to solve ah ?
Whether mp3 or WAV can not put ah.
------ eference --------------------------------------- < br> online search , or use the phonon solve it
------ eference -------------------------- -------------


wav format I have tested successfully .
------ eference --------------------------------------- < br> code which will not be a problem
------ eference ------------------------------ ---------


Thank you for your reply , I still use the phonon do it.
------ eference --------------------------------------- < br> QSound can not play much of a wav, small files did not ask

[Android] Little doubt

android interface Such an interface is how do is listview listview do not have to do with the adapter bindings I think this is not necessary ah. Because only turn on the controls from javaweb not understand thank you
------ Solution ---------------------- ----------------------
look preferenceActivity it
------ Solution ----------- ---------------------------------
with SettingsPreferenceFragment achieve, you look at this class will understand. . . . . . . android source code has
------ eference ------------------------------------- -
people do not come ah thank you ,
------ eference ---------------------- -----------------
Thank you . .
------ eference --------------------------------------- < br> Thank you, thank you very much is such
------ eference ------------------------------- --------
very grateful that this is to use a checkbox inside listview good trouble traversing Thank you great help

[Android] visual studio 2012 deployment errors occur

When I installed win 8 Professional Edition , the compiler is visual studio 2012, windows phone sdk 8.0 , the latter does not create a project simulator with real test , compile direct deployment errors occur ,
1> to deploy the application to the device failed.
1> Error: Exception from HRESULT: 0x89721800
get one in the afternoon , reloading several versions will not work, check the Baidu , etc. can not be resolved , I hope someone help , tell me what the problem is , how to solve , thank you ~ ~ < br> ------ Solution ----------------------------------------- ---
by removing % LOCALAPPDATA% \ Microsoft \ Phone Tools \ CoreCon \ 10.0 to resolve
Please backup before deleting


------ eference ------------------------------------ ---

this thing where , ah, I have seen this time to solve the problem , but could not find , I hope to inform , thank you.
------ eference --------------------------------------- < br> % LOCALAPPDATA% \ Microsoft \ Phone Tools \ CoreCon \ 10.0

stick to the Explorer address bar
------ eference ----------------------------- ----------

I deleted this , but still useless eh , how do ?
------ eference --------------------------------------- < br>
I deleted this , but still useless eh , how do ?  
simulator not loaded ? You is not never open virtualization and two address translation .

then reinstall the next SDK try again.

never met this problem , you can only try.
------ eference --------------------------------------- < br>
I deleted this , but still useless eh , how do ?          
simulator not loaded ? You is not never open virtualization and    two address translation .   
  
then reinstall the next SDK try again.   
  
never met this problem , you can only try.  
I have to reinstall 2 times , or useless, the simulator is not installed , and that there is no option but to start , at least there is someone else Devices' .
------ eference --------------------------------------- < br> your CPU is Which ? estimated that it does not support two address translation ,
------ eference ---------------------- -----------------

CPU is I3 , and did not understand why, thank you so much to answer . .
------ eference --------------------------------------- < br>
like deleting the wrong place , and now the line, thank you ~ ~
------ eference --------------------- ------------------

like deleting the wrong place , and now the line, thank you ~ ~  
quick solution under ah , ah buddy said
------ eference ---------------------- -----------------
quick solution , said the next ah.

[Android] OpenGL ES2.0 in onDrawFrame drawing with thread you?

RT, I want to set a thread after each call Thread.sleep unfinished (20 ) to allow the thread to sleep
then continue painting until it is fully completed matrix transformations , to enlarge the animation effect .
but the program has been a crash , so my idea of code impress , seeking Great God Guidelines

public void onDrawFrame(GL10 gl){
    GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT|GLES20.COLOR_BUFFER_BIT)
    Thread Trans_Thread = new Thread(){
          //zMove用来判定z轴位移量
          float zMove = 0f;
          public void run(){
               boolean flag = true;
               while(flag){
                   画四个图标
                   for(int i=0;i<4;i++){
                       //所有矩阵的定义和操作都放在了MatrixState.java里,纯方法实现
                       //矩阵平移,以便图标一字铺开。
                       MatrixState.translate(i*2f,0,0)
                       //被聚焦的图标会有动画放大的效果
                       if(FocusPosition == i){
                              //进行矩阵缩放,即图标缩放
                             MatrixState.scale(1.3f/50,1.3f/50,1.3f/50);
                       }
                       //Square类的绘制函数
                       Square.drawSelf();   
                   }
                   //判定是否已经缩放完成
                   zMove = zMove + 1.3f/50;
                   //运行标志设为false
                   if(zMove>=1.3f) flag = false;
                   try(Thread.sleep(20);)catch(Exception e){System.out.println(e);}
               }
          }
    }
    Trans_Thread.start();
}


In the absence of additional threads can be stable drawing , but did not focus on the enlarged icon animation .
Great God seek advice
------ Solution --------------------------------- -----------
I think the thread should be placed outside onDrawFrame, then postInvalidate () to inform the system update
------ eference -------- -------------------------------

thanks, buddy, this problem has been solved. Because onDrawFrame function itself is constantly refreshed, as long as the appropriate control parameters can be in it . Your reply this point be rewarded .

android shortcut for the application to set

android how to implement procedures for the application to add shortcuts, for example, I would like to turn the camera on this application , you can simply press ctrl + A shortcut to open without having to create a shortcut , and then click on the shortcut ?
------ Solution ---------------------------------------- ----
you use the soft keyboard, press ctrl it?
program inside their own monitor key events of their own to start the corresponding activity bar
------ Solution ---------------------- ----------------------
@ Override
public boolean onKeyDown (int keyCode, KeyEvent event) {
}
This can listen button
android inside KeyEvent.KEYCODE_CAMERA, KeyEvent.KEYCODE_CALL and other events, if it is to write their own programs , you can also define your own key events .
can listen to the key event, start the corresponding activity or service.
------ eference --------------------------------------- < br> how Meirenhuida ah ? Hard?
------ eference --------------------------------------- < br> onkeydown background when no service in this method ,