Wednesday 30 January 2013

Q) Hi, I am facing the problem with camera and gallery images displaying using MOBIONE,Please help me?

Ans.  MOBIONE does not provide any Camera API like other cross plat form up to now,they may be provide later i think.The solution for this problem is using the PhoneGap library i.e cordova-x.js by including as a library in your project,you can solve the problem.
 

Tuesday 29 January 2013

Hi Guys,

     Here is the solution for the O Linker problem in iOS

http://stackoverflow.com/questions/10119239/adding-reachability-class-fails-when-i-am-trying-to-build

Wednesday 23 January 2013

Google Maps in Android


Hi All,
              
                    Map services are provided by an external library that includes the com.google.android.maps package. This library is not provided as part of the standard SDK. It is provided as a Google APIs add-on to the android SDK. For the convenience of developers, this add-on is provided as part of the SDK on the emulator.
Step 1:  create an android project in Eclipse, instead of choosing the target name as Android 2.0, you need to select the target as Google APIs.
Step2: The Activity class you create this time should not extend the standard “Activity” class but should extend the MapActivity class.
Step3: u need to add the following tag in the AndroidManifext.xml in order to use the external library and permissions:
<uses-library android:name="com.google.android.maps" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>

Step 4: Now let us declare the map view in main.xml in layout folder. To do so, add this element in order to display the map using MapView.
<com.google.android.maps.MapView
android:id="@+id/myGMap"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:enabled="true"
      android:clickable="true"
      android:apiKey="0YaGLMeMFKXrhzHL-uSYZSnqXqbGwE6kxF4VwFQ"
    />

This is for sample java code here :
public class SampleMapActivity extends MapActivity {      
          MapView    myMapView        = null;
          MapController     myMC        = null;
          GeoPoint    geoPoint = null;
          double        latitude       = 17.3667, longitude = 78.4667;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    myMapView = (MapView) findViewById(R.id.myGMap);
   geoPoint = new GeoPoint((int) (latitude * 1000000), (int) (longitude * 1000000));
          myMapView.setSatellite(false);
          myMC = myMapView.getController();
          myMC.setCenter(geoPoint);
          myMC.setZoom(15);
          myMapView.setBuiltInZoomControls(true);
       myMapView.displayZoomControls(true);
    }
@Override
protected boolean isRouteDisplayed() {
          return false;
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_I) {
myMapView.getController().setZoom(myMapView.getZoomLevel() + 1);
          return true;
          } else if (keyCode == KeyEvent.KEYCODE_O) {
          myMapView.getController().setZoom(myMapView.getZoomLevel() - 1);
          return true;
          } else if (keyCode == KeyEvent.KEYCODE_S) {
          myMapView.setSatellite(true);
          return true;
          } else if (keyCode == KeyEvent.KEYCODE_M) {
          myMapView.setSatellite(false);
          return true;
          }
          return false;
          }
}

Obtaining a Google Maps Android v1 API Key:

Step1: Locate debug.keystore on your system. It is usually in theC:\Users\Sreeni\.android\debug.keystore”.

Step2: Use the keytool utility to generate certificate fingerprint (MD5). keytool utility that comes with the default JDK installation.
Simply go to the command prompt:
C:\Users\Sreeni>cd C:\Program Files\Java\jdk1.7.0\bin
Then press enter…….
C:\Program Files\Java\jdk1.7.0\bin>
After  adding like this….
C:\Program Files\Java\jdk1.7.0\bin>keytool -v -list -alias androiddebugkey -keys
tore C:\key\debug.keystore -storepass android -keypass android
You get the MD5 ..Certificate fingerprints:
         MD5:  46:78:01:3F:8E:B0:C0:71:EF:04:A6:85:C9:70:75:3E
         SHA1: 25:68:CE:BD:6E:C4:04:DA:87:67:CF:9F:B3:D9:A0:99:5A:89:FD:DC
         SHA256: 6B:8F:FD:73:B6:62:33:68:D3:83:23:90:75:6D:40:C8:2A:3E:29:4A:FE:
44:CA:45:01:B6:F7:29:CE:5B:0A:86


Step3 : Go to the “ https://developers.google.com/maps/documentation/android/v1/maps-api-signup “. Put your Certificate fingerprint (MD5) And get your API key for android Google Map application. On this page, paste the certificate fingerprint in the appropriate form field, and click the “Generate API Key” button. This will return a Maps API key string.

This key needs to be used along with the MapView element declared in the XML layout file as mentioned in the above
      android:apiKey="0YaGLMeMFKXrhzHL-uSYZSnqXqbGwE6kxF4VwFQ".



Convert APK to source code in android.



Step 1:
First take the .apk file (which you want to decode) and then create a new folder and copy that .apk file in to the new folder. Now rename this .apk file in the new folder with extension .zip (e.g.: rename from filename.apk to filename.apk.zip), if you are unable to rename the apk file in this way, then go to “Organize” option on the top of your window. Select “Folder and search options” select “view” then unselect the checkbox of “Hide extensions for known file types”.  So now the .apk file has become a .Zip file. Now extract that zip file. You can see the classes.dex files, drawable files etc..  in the extracted folder.
Step 2:
Now download dex2jar from this link http://code.google.com/p/dex2jar/ and extract it. Copy the entire content inside the dex2jar software (lib folder, d2j files etc….) and paste it in the previously extracted folder of .apk file (near classes.dex, assets folder). Now go back and press “Shift+Rightclick” on the extracted .apk folder. Select “Open command window here” or you can also open command prompt and move to this folder. Type dex2jar classes.dex and press enter. Now you get classes_dex2jar.jar in .apk extracted folder under classes.dex file. Close the command window. Now download java decompiler from http://java.decompiler.free.fr/?q=jdgui and now double click on jd-gui and click on File->Open File then open classes_dex2jar.jar  file from that folder. Now you get class file. Save all these class file (click on file then click "save all sources" in jd-gui) at your working area. Extract the classes_dex2jar.src.zip. At this stage you get source. But xml files are still unreadable.
Step 3:
Now open another new folder and put these files
1.       Put .apk file which you want to decode.
2.       Download apktool 2.1 for windows from this link http://code.google.com/p/android-apktool/downloads/detail?name=apktool-install-windows-2.1_r01-1.zip&can=2&q= and put in the same folder.
3.       Download framework-res.apk file from this link http://www.2shared.com/file/MIFn5Cuo/framework-res.html  and put in the same folder.
4.       Now copy the framework-res.apk file to apktool folder.
5.       Now press “Shift+Rightclick” on apktool folder and select “Open command window here”.
6.       Type apktool if framework-res.apk in command window and press enter.
7.       Now go back and copy the .apk file in to apktool folder.
8.       Type apktool d fname.apk ("fname" denotes filename which you want to decode) in command window.For e.g.:- apktool d “c:\newfolder\APKTool\sample.apk”(here sample is the apk file name) and press enter.
9.       You can see a folder created with the file name in the apktool folder (i.e source code).
10.   Delete the smali named folder inside source.
11.   Just copy contents of both folders (in this case both new folder) to the single one and now enjoy with source code.


For better understanding,you can go to the following youtube link:



-Seshu.

ADB problem


 Hi friends..

 Yesterday when i was running my application in eclipse,i got the following error..

 ------------------------------------------------------------------------------------------------------------

  [2013-01-23 16:35:40 - adb] ADB server didn't Ack.
  [2013-01-23 16:35:40 - adb] * failed to start daemon *

  The connection to adb is down,and a server error has occured.

  you must restart adb and Eclipse.

  Please ensure that adb is correctly located at D:\android-sdk-windows\platform-tools\adb.exel and can be executed.

 ------------------------------------------------------------------------------------------------------------

 I found solution for this problem.

 -> Press CTRL+SHIFT+ESC to open task manager,stop adb.exe process in processes tab.

 ->Restart Eclipse.

 In this way you can get rid of this problem.

-Laxmi.p

Tuesday 22 January 2013

Flag Animation in android



Hi all,
Everyone wants  application to be beautiful and attractive for an eye of a user. I'm searching for different type of animations in android after I found small animation  look like a flag.
Now we’ll make it fade-in and fade-out. Create in appfolder /res folder new folder "anim" and add to it two Android XML files – appear.xml and disappear.xml. They will be alpha animations.

appear.xml:
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <alpha
        android:interpolator="@android:anim/accelerate_interpolator"
        android:fromAlpha="0.0" android:toAlpha="1.0"
        android:duration="800"
    />
</set>

disappear.xml:
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <alpha
        android:interpolator="@android:anim/decelerate_interpolator"
        android:fromAlpha="1.0" android:toAlpha="0.0"
        android:duration="800"
    />
</set>

Here is a set of frames and “oneshot” attribute says to loop them. To run animation. Create flag.xml in drawable folder.

flag.xml:
<?xml version="1.0" encoding="utf-8"?>
<animation-list     
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/flaganim"
    android:oneshot="false"
    >
    <item android:drawable="@drawable/f03" android:duration="100" />
    <item android:drawable="@drawable/f04" android:duration="100" />
    <item android:drawable="@drawable/f05" android:duration="100" />
    <item android:drawable="@drawable/f06" android:duration="100" />
    <item android:drawable="@drawable/f07" android:duration="100" />
    <item android:drawable="@drawable/f08" android:duration="100" />
    <item android:drawable="@drawable/f09" android:duration="100" />
    <item android:drawable="@drawable/f10" android:duration="100" />    
</animation-list> 

Here the java code....

  // Start animating the image
 final ImageView ImageView = (ImageView) findViewById    (R.id.ImageView);
ImageView.setBackgroundResource(R.drawable.flag);
final AnimationDrawable frameAnimation = (AnimationDrawable)ImageView.getBackground();
   ImageView.post(new Runnable(){
@Override
public void run() {
frameAnimation.start();
}    
   });

  Finally, 
         Image look like a flag:



Thursday 10 January 2013

Voice Conversion ........

Hi Guys......
i am implementing an Application, it is similar to Talking Tom Application, in My application i have to Place a Character Like A Alien  Voice for this i have to convert the Human Voice to Alien Voice ....
for this voice modulation i did't get the any solution....!!!!!
  Suggest me if any one.......

Tuesday 8 January 2013

Adding Bitmap Image into Canvas in Android


Hi,
                    I’m developing  a Maze Game in Android.    I  faced a problem with adding the image into Canvas. Actually I draw the circle by using canvas is working but I need to add the image from drawable.This is for Sample code for draw circle by using canvas….
Paint ball = new Paint();
ball.setTextSize(cellHeight*0.75f);
canvas.drawCircle((currentX * totalCellWidth)+(cellWidth/2),   //x of center
                  (currentY * totalCellHeight)+(cellWidth/2),  //y of center
                  (cellWidth*0.45f), ball);

                   Here  In this place I want add the image into canvas from drawable..
I use the below code for adding image into canvas.but it is not working touch Listener to drawable image.
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.green);
canvas.drawBitmap(bmp,current,currentY ,null);   
                          
            Finally   I got the solution to this touch event functionality for drawable image. Following code I used its working if any other way is their please let me know.

Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.green);
       Bitmap img = Bitmap.createScaledBitmap( bmp,25,25, true );
canvas.drawBitmap(img,(currentX * totalCellWidth)+(cellWidth/6) ,(currentY * totalCellHeight)+(cellWidth/6),null);

And In the onTouchEvent method. I use the below code:

public boolean onTouchEvent(MotionEvent event) {
float touchX = event.getX();
float touchY = event.getY();
int currentX = maze.getCurrentX();
int currentY = maze.getCurrentY();
switch (event.getAction() & MotionEvent.ACTION_MASK) {
   case MotionEvent.ACTION_DOWN:
                //touch gesture started
                if(Math.floor(touchX/totalCellWidth) == currentX &&
                Math.floor(touchY/totalCellHeight) == currentY) {
                //touch gesture in the cell where the ball is
                dragging = true;
                return true;
                }
                break;
   case MotionEvent.ACTION_UP:
                //touch gesture completed
                dragging = false;
                return true;
                case MotionEvent.ACTION_MOVE:
                if(dragging) {
                int cellX = (int)Math.floor(touchX/totalCellWidth);
                int cellY = (int)Math.floor(touchY/totalCellHeight);                                                          
                if((cellX != currentX && cellY == currentY) ||
                (cellY != currentY && cellX == currentX)) {
                //either X or Y changed
                boolean moved = false;
                //check horizontal ball movement
        switch(cellX-currentX) {
                case 1:
                moved = maze.move(Maze.RIGHT);
                break;
                case -1:
                moved = maze.move(Maze.LEFT);
                }
                //check vertical ball movement
                switch(cellY-currentY) {
                case 1:
                moved = maze.move(Maze.DOWN);
                break;
                case -1:
                moved = maze.move(Maze.UP);
                }
                if(moved) {
                //the ball was moved so we'll redraw the view
                invalidate();
                if(maze.isGameComplete()) {
                                //game is finished
                                showFinishDialog();
                }
                  }
                          }
                return true;
                      }
                           }
                 return false;
                }

Monday 7 January 2013



MS Project software downloadable links

I am looking for MS project software download version. I came to know that the specifications for downloading the software are

X86 platforms

Windows 7
Windows Vista SP1
Windows XP SP3
Windows Server 2003 SP2

X64 platform

Windows 7
Windows Vista SP1
Windows Server 2008

After searching I found the download version of the software for Windows XP SP2
This is the link to download the MS Project version 2007 for Windows XP SP2

After downloading it will ask for the Product key. Sometimes product key that comes with software doesn’t work. So these are the updated product keys to enter

G2XT7-K47QK-BFVXC-83T9M-8Y63Q
Or
T7CBB-KW6DD-VTHB9-6V4D4-K3393

If anyone wants to work with MS Visio this is the link for downloading the latest version


For MAC

Go through this link for complete tutorial and latest download version of the software