Search Results

Search found 24263 results on 971 pages for 'android video player'.

Page 15/971 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Using backport-android-bluetooth on Android 1.6

    - by newth
    Hi, I'm trying to write an application using Bluetooth on Android 1.6. Since it's not officially supported, I found the backport of android.bluetooth API ( http://code.google.com/p/backport-android-bluetooth ). But when I deploy the sample chat application (modified for backport) LogCat gives me the error below: My question is, how I can use backport-android-bluetooth on 1.6 and is there any working samples? Thanks! 11-30 14:03:19.890: ERROR/AndroidRuntime(1927): Uncaught handler: thread main exiting due to uncaught exception 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): java.lang.ExceptionInInitializerError 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at backport.android.bluetooth.BluetoothSocket.<init>(BluetoothSocket.java:69) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at backport.android.bluetooth.BluetoothServerSocket.<init>(BluetoothServerSocket.java:16) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at backport.android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord(BluetoothAdapter.java:513) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at com.example.bluetooth.BluetoothChatService$AcceptThread.<init>(BluetoothChatService.java:237) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at com.example.bluetooth.BluetoothChatService.start(BluetoothChatService.java:109) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at com.example.bluetooth.BluetoothChat.onResume(BluetoothChat.java:138) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1225) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.Activity.performResume(Activity.java:3559) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2838) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2866) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.os.Handler.dispatchMessage(Handler.java:99) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.os.Looper.loop(Looper.java:123) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.app.ActivityThread.main(ActivityThread.java:4203) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at java.lang.reflect.Method.invokeNative(Native Method) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at java.lang.reflect.Method.invoke(Method.java:521) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at dalvik.system.NativeStart.main(Native Method) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): Caused by: java.lang.UnsatisfiedLinkError: classInitNative 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.bluetooth.RfcommSocket.classInitNative(Native Method) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): at android.bluetooth.RfcommSocket.<clinit>(RfcommSocket.java:152) 11-30 14:03:19.906: ERROR/AndroidRuntime(1927): ... 21 more

    Read the article

  • How does Android decide which background resource to draw on the foreground?

    - by Sebi
    I defined two ImageButton which are contained in a LinearLayout in my XML layout file: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:minHeight="40px" android:background="@drawable/library_tabs_background"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button_library" android:layout_width="160px" android:paddingTop="7px" android:layout_height="40px" android:paddingLeft="30px" android:orientation="horizontal"> <ImageButton android:id="@+id/list" android:layout_width="110px" android:layout_height="30px" android:src="@drawable/library_tab1_button_active"> </ImageButton> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button_search" android:layout_width="160px" android:paddingTop="7px" android:layout_height="40px" android:orientation="horizontal"> <ImageButton android:id="@+id/search" android:layout_width="110px" android:layout_height="30px" android:src="@drawable/library_tab2_button_deactive"> </ImageButton> </LinearLayout> </LinearLayout> As one can see in the XML file, also the LinearLayout in which the buttons are contained, a background image is set. This two images (the button background and the linearlayout background) are overlapping. So in some views, the button background is in front of the layout background and in other views (im using a view flipper), the background of the layer is in the foreground. How can i set a clear rule? How does Android decide which BackgroundResource to draw first?

    Read the article

  • HTML5 <video> element on Android does not play

    - by T1000
    Video tags like below plays fine with iPhone, but not Android: <video id="video" width="320" height="240" poster="video/placeholder.jpg" autobuffer controls> <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'> </video> With the above code, Android can't even click the clip. It would just see the poster image. Video tag like below however works with Android: <video src="vpr6.mp4" poster="video/placeholder.jpg" onclick="this.play();"/> However, I still need to multiple sources capability (for Firefox ogv support…). Below code does not work (nor do they work if I stick the javascript into the source tags): <video id="video" width="320" height="240" autobuffer controls onclick="this.play();"> <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'> </video> With above code, the clip is clickable in Android, but still does nothing. Can anyone help?

    Read the article

  • Video playback on VideoView disappears after going back from another Activity

    - by pixel
    I have two Activities: one with VideoView and the second one. I start watching a video in the first Activity, then during playback I start second Activity. After going back to first Activity I can hear sound but see no picture. My Video Layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <VideoView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/videoView" android:layout_gravity="center" /> <ListView android:layout_width="fill_parent" android:layout_height="125dp" android:id="@+id/ListView" /> </LinearLayout> Do you have any ideas why video doesn't appear?

    Read the article

  • Hey, Google: It’s Time to Add Multi-Window Multitasking To Android

    - by Chris Hoffman
    In 2012, Google’s Dianne Hackborn threatened to revoke CyanogenMod’s access to the Android Market if they moved forward with adding “Cornerstone” multitasking to their custom ROM. Samsung has since created their own multi-window multitasking feature. Dianne Hackborn said this “is something that needs to be done at the mainline platform level” so apps wouldn’t break. She was right — Android needs this as a standard feature and it’s time for Google to provide it. Doesn’t Android Have Multitasking? Android originally stood out from Apple’s iOS with its powerful multitasking. Applications can continue running in the background while you’re using another application. This makes Android powerful — you can even have BitTorrent clients downloading files in the background while using another app. Android still kept the design of a single app on screen at a time. This made a lot of sense when Android only ran on smartphones with small screens. Today, Android runs on everything from smaller smartphones all the way up to huge “phablets” like the Galaxy Note. Android has gone beyond phones and runs on 12-inch tablets, convertibles with keyboard docks, laptops, and even Android desktops. Android isn’t just a phone operating system. Samsung’s Multi-Window Isn’t Good Enough Samsung has tried to add value to Android by adding a multi-window feature. When you’re using a high-end phone like the Galaxy Note or Galaxy S, or a Galaxy tablet, you have the ability to run certain apps side-by-side with each other. There are big problems here. This only works on Samsung devices, and only on specific Samsung devices. To add support for this feature in a way that doesn’t break other apps, Samsung’s multi-window feature also only works with specific apps. You can’t just run any app in multi-window view, only the apps on the Multi Window bar Samsung provides. This prevents third-party apps from breaking, which is what Google was worried about with CyanogenMod’s Cornerstone feature. A feature that only works with a handful of apps on specific devices from a single manufacturer isn’t good enough. This feature needs to work on every Android device — or at least ones with suitably large screens and powerful enough internals. It needs to be an Android platform feature so application developers can ensure their apps will work properly with it on every device. Android developers shouldn’t have to add support for each manufacturer’s own multi-window feature if other manufacturers decide to copy Samsung. Floating Apps Are a Dirty Hack Floating apps also enable real multitasking. Remember that Android allows apps to run in the background while you’re using an app in the foreground. These apps can present interfaces that appear floating above the current app — think of it like using “always on top” to make a window always appear over every other app on a desktop operating system. You can install floating apps to browse the web, take notes, chat, and watch videos while using any app. Only apps specifically designed to run as floating apps will work, so you have to seek them out. Floating apps are also awkward to use because they float over the app you’re using, blocking parts of its interface. Microsoft added floating-window support to Skype for Android. You can have a video conversation and the other person’s face will always appear on your screen, even when you leave the Skype app. Microsoft is using more of Android’s multi-window multitasking power than Google is. Custom ROMs and Root-Only Tweaks Aren’t Acceptable Some custom ROMs are adding this feature to Android. Google threatened to revoke CyanogenMod’s access to the Android Market (now known as Google Play) if they added this feature because it could potentially break third-party apps. Today, other custom ROMs are working on split-screen multitasking. Samsung added their own version to their own devices. You can also get this feature by using a root-only Xposed Framework tweak known as XMultiWindow. If you have root access, you can get multi-window multitasking or any app on your device. This shouldn’t require rooting your device or installing a custom ROM. These third-party solutions often have awkward interfaces and bugs. We need an integrated, supported solution that works the same on every device. Why Multi-Window is Important Microsoft’s Windows 8.1 stands out among tablet operating systems for its powerful multitasking support, allowing you to view several apps side-by-side at the same time. Apple is also reported to be working on adding side-by-side apps to the iPad with iOS 8. On every competitor’s operating system, you’ll be able to view a web page while you write an email, watch a video while you browse the web, or chat with someone while you do anything else. But Android’s still remained frozen in time. Despite all Android’s underlying power — and despite the way Android allows apps to adapt to different screen sizes — Google is resisting adding this feature. Large-screen Android tablets like the Nexus 10 (remember that tablet Google hasn’t updated in over 18 months?) need this feature. So do huge phones, convertibles, laptops, and Android desktops. If tablets are the future of personal computing, we should be able to do more than one thing at a time on our tablets’ big screens. Microsoft, Samsung, and even Apple are realizing this — now it’s Google’s turn. Image Credit: Sergey Galyonkin on Flickr, Karlis Dambrans on Flickr

    Read the article

  • How do I get a Java to call data from the Internet? Where to even start??

    - by cdg
    Hello oh great wizards of all things android. I really need your help. Mostly because my little brain just doesn't know were to start. I am trying to pull data from the internet to make a widget for the home screen. I have the layout built: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/widget_bg_normal" android:clipChildren="false" > <TextView android:id="@+id/text_view" android:layout_width="100px" android:layout_height="wrap_content" android:paddingTop="18px" android:layout_centerHorizontal="true" android:textSize="8px" android:text="158x154 Image downloaded from the internet goes here. Needs to be updated every evening at midnight or unless the button below is pressed. Now if I could only figure out exactly how to do this, life would be good." /> <Button android:id="@+id/new_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Get New" android:layout_below="@+id/scroll_image" android:layout_centerHorizontal="true" android:padding="0px" android:textSize="10px" android:height="8px" android:includeFontPadding="false" /> </RelativeLayout> Got the provider xml bulit: <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="150dip" android:minHeight="150dip" android:updatePeriodMillis="10000" android:initialLayout="@layout/widget" /> The Manifest works great. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dge.myandroid" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".myactivty" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <!-- Widget --> <receiver android:name=".mywidget" android:label="@string/app_name" > <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.widgetprovider" android:resource="@xml/widgetprovider" /> </receiver> <!-- Widget End --> </application> <uses-permission android:name="android.permission.INTERNET" /> <uses-sdk android:minSdkVersion="7" /> </manifest> The data it is calling looks something like this when it is called. It basically goes to a website that uses php to random the image: <html><body bgcolor="#000000">center> <a href="http://www.website.com" target="_blank"> <img border="0" src="http://www.webiste.com//0.gif"></a> <img src="http://www.webiste.com" style="border:none;" /> </center></body></html> But here is were I am stuck. I just don't know where to start at all. The java is so far beyond my little head that I don't know what to do. package com.dge.myandroid; import android.appwidget.AppWidgetProvider; public class mywidget extends AppWidgetProvider { } The wiki example just confused me more. I just don't know where to begin. Please help.

    Read the article

  • FFmpeg convert video w/ dropped frames, out of sync

    - by preahkumpii
    I recorded a video using Bandicam with the MJPEG encoder to get the least amount of lag. Now, I am trying to convert that massive file to a h264 avi using ffmpeg. I know there are dropped frames in the video stream...more than 100 in the first two minutes, which I assume is simply because Bandicam dropped some when it couldn't keep up. So, when I convert the file to h264, the video and audio are out of sync, and appear to be more and more out of sync as output video progresses. Here is my basic command in ffmpeg: ffmpeg -i "C:\...\input.avi" -vcodec libx264 -q 5 -acodec libmp3lame -ar 44100 -ac 2 -b:a 128k "C:\...\output.avi" I have tried EVERYTHING I can think of including: -itsoffset [-]00:00:01 Tried this before and after input file. This doesn't work because as the video progresses it becomes more and more out of sync. -async 1 Doesn't work. -vsync 1 Doesn't work, but it does show dropped frames being duplicated. Two inputs of same file with mapping using -map 0:0 -map 1:1. Doesn't work. The source plays just fine. Any ideas how to convert it with ffmpeg and keep the audio and video synced? Thanks.

    Read the article

  • focusable row inside table android

    - by Nikitas
    Hello guys, i have in xml a ScrollView which includes one TableLayout. My question is if it's possible to have a focusable row every time i click on it. Here is my xml code: <ScrollView android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableLayout android:id="@+id/table2" android:layout_width="wrap_content" android:layout_height="wrap_content" > <TableRow> <RelativeLayout android:id="@+id/rowlayout" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="@drawable/rowbackground2" > <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon_code_contact" android:padding="7dip" android:layout_alignParentLeft="true" /> <TextView android:id="@+id/contacts" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:text="Contacts" android:textColor="#000" android:textSize="18dip" android:layout_toRightOf="@id/icon" android:paddingTop="10dip" /> </RelativeLayout> </TableRow> <TableRow> <Button android:id="@+id/contacts_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/contact_button" /> </TableRow> I have already tried the "focusable="true"" and "focusableInTouchMode="true"" but nothing happened.. thanks in advance

    Read the article

  • Android Home Screen Widget Failing with EditText

    - by Chris
    Whenever I add an EditText widget to the layout of my home screen widget (confusing how the term "widget" is being used twice in the Android lexicon :-/ ), I receive the "Problem Loading Widget" error box. Here is the layout I'm attempting; if you remove the EditText, it works... < RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" <Button android:id="@+id/button_generate" android:layout_width="54px" android:layout_height="54px" android:text="Generate" android:textSize="10sp" android:gravity="center" android:layout_alignParentTop="true" android:layout_toRightOf="@+id/edittext_key"> </Button> <TextView android:id="@+id/textview_hash" android:layout_width="75px" android:layout_height="45px" android:text="Password" android:textSize="11sp" android:gravity="left" android:layout_alignParentTop="true" android:layout_toLeftOf="@+id/edittext_key"> </TextView> <EditText android:id="@+id/edittext_data2" android:layout_width="200px" android:layout_height="50px" android:textSize="12sp" android:layout_marginTop="20px" android:layout_alignParentTop="true" android:layout_centerHorizontal="true"> </EditText> </RelativeLayout> Now, the Google Search home screen widget has an EditText, so it's obviously legal to implement. Any thoughts on why this is not working?

    Read the article

  • Mobile: Wrox Cross Platform Mobile Development - iPhone, iPad, Android, and everything with .NET & C#

    - by Wallym
    Wrox has produced a bundle of their 3 best selling mobile development books and it is available as of Today (March 16). A bundle of 3 best-selling and respected mobile development e-books from Wrox form a complete library on the key tools and techniques for developing apps across the hottest platforms including Android and iOS. This collection includes the full content of these three books, at a special price: Professional Android Programming with Mono for Android and .NET/C#, ISBN: 9781118026434, by Wallace B. McClure, Nathan Blevins, John J. Croft, IV, Jonathan Dick, and Chris Hardy Professional iPhone Programming with MonoTouch and .NET/C#, ISBN: 9780470637821, by Wallace B. McClure, Rory Blyth, Craig Dunn, Chris Hardy, and Martin Bowling Professional Cross-Platform Mobile Development in C#, ISBN: 9781118157701, by Scott Olson, John Hunter, Ben Horgen, and Kenny Goers Remember, go buy 8-10 copies of the 3 book set for the ones you love. They will make great and romantic gifts!!

    Read the article

  • Is there alternative way to sell android app?

    - by user34412
    I am a developer of android apps from Macedonia. So my country is not on the list of countries that one can sell paid app from (on the Android Market). I have a few apps ready for several months now and I am really struggling to find a way, alternative to sell my apps and have it licensed. I know that there are several markets that sell android app, but I want my apps to be licensed as well, and that is very important to me. I know that there are many countries that are not on that list, so if there are developers that had similar experience and solved their problems, please share your experience with me. I am eager to know if there is something I can do? Thank u for your answers in advance.

    Read the article

  • how to get adobe flash fullscreen video fluid with an atom processor?

    - by Antoine Rodriguez
    My system has an atom N270 + intel i915 graphic card. Under Windows I can enjoy 720p bigbuckbunny youtube video fullscreen without any trouble. Under Ubuntu 12.04 I have laggy and choppy fullscreen video and choppy video when not fullscreen. I've seen that under ubuntu the cpu is almost always at 100% use. What I must do in order to have videos playing well under ubuntu ? I've already tried the following : Force flash gpu detection : (no result) : mkdir /etc/adobe echo "OverrideGPUValidation = 1" | sudo tee -a /etc/adobe/mms.cfg grub options (had results but not enough) : i915_enable_rc6=1 i915_enable_fbc=1 i915_lvds_downclock=1 pcie_aspm=force updated intel drivers (glasen ppa) Using chrome instead of firefox (had impact but not enough)

    Read the article

  • png image store in database and retrieve in android 1.5

    - by hany
    hai, I am new to android. I have problem. This is my code but it will not work, the problem is in view binder. Please correct it. // this is my activity package com.android.Fruits2; import java.util.ArrayList; import java.util.HashMap; import android.app.ListActivity; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.widget.SimpleAdapter; import android.widget.SimpleCursorAdapter; import android.widget.SimpleAdapter.ViewBinder; public class Fruits2 extends ListActivity { private DBhelper mDB; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); mDB = new DBhelper(this); mDB.Reset(); Bitmap img = BitmapFactory.decodeResource(getResources(), R.drawable.icon); mDB.createPersonEntry(new PersonData(img, "Harsha", 24,"mca")); String[] columns = {mDB.KEY_ID, mDB.KEY_IMG, mDB.KEY_NAME, mDB.KEY_AGE, mDB.KEY_STUDY}; String table = mDB.PERSON_TABLE; Cursor c = mDB.getHandle().query(table, columns, null, null, null, null, null); startManagingCursor(c); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.data, c, new String[] {mDB.KEY_IMG, mDB.KEY_NAME, mDB.KEY_AGE, mDB.KEY_STUDY}, new int[] {R.id.img, R.id.name, R.id.age,R.id.study}); adapter.setViewBinder( new MyViewBinder()); setListAdapter(adapter); } } //my viewbinder package com.android.Fruits2; import android.database.Cursor; import android.graphics.BitmapFactory; import android.view.View; import android.widget.ImageView; import android.widget.SimpleCursorAdapter; public class MyViewBinder implements SimpleCursorAdapter.ViewBinder { public boolean setViewValue(View view, Cursor cursor, int columnIndex) { if( (view instanceof ImageView) ) { ImageView iv = (ImageView) view; byte[] img = cursor.getBlob(columnIndex); iv.setImageBitmap(BitmapFactory.decodeByteArray(img, 0, img.length)); return true; } return false; } } // data package com.android.Fruits2; import android.graphics.Bitmap; public class PersonData { private Bitmap bmp; private String name; private int age; private String study; public PersonData(Bitmap b, String n, int k, String v) { bmp = b; name = n; age = k; study = v; } public Bitmap getBitmap() { return bmp; } public String getName() { return name; } public int getAge() { return age; } public String getStudy() { return study; } } //dbhelper package com.android.Fruits2; import java.io.ByteArrayOutputStream; import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.graphics.Bitmap; import android.provider.BaseColumns; public class DBhelper { public static final String KEY_ID = BaseColumns._ID; public static final String KEY_NAME = "name"; public static final String KEY_AGE = "age"; public static final String KEY_STUDY = "study"; public static final String KEY_IMG = "image"; private DatabaseHelper mDbHelper; private SQLiteDatabase mDb; private static final String DATABASE_NAME = "PersonalDB"; private static final int DATABASE_VERSION = 1; public static final String PERSON_TABLE = "Person"; private static final String CREATE_PERSON_TABLE = "create table "+PERSON_TABLE+" (" +KEY_ID+" integer primary key autoincrement, " +KEY_IMG+" blob not null, " +KEY_NAME+" text not null , " +KEY_AGE+" integer not null, " +KEY_STUDY+" text not null);"; private final Context mCtx; private boolean opened = false; private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_PERSON_TABLE); } public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS "+PERSON_TABLE); onCreate(db); } } public void Reset() { openDB(); mDbHelper.onUpgrade(this.mDb, 1, 1); closeDB(); } public DBhelper(Context ctx) { mCtx = ctx; mDbHelper = new DatabaseHelper(mCtx); } private SQLiteDatabase openDB() { if(!opened) mDb = mDbHelper.getWritableDatabase(); opened = true; return mDb; } public SQLiteDatabase getHandle() { return openDB(); } private void closeDB() { if(opened) mDbHelper.close(); opened = false; } public void createPersonEntry(PersonData about) { openDB(); ByteArrayOutputStream out = new ByteArrayOutputStream(); about.getBitmap().compress(Bitmap.CompressFormat.PNG, 100, out); ContentValues cv = new ContentValues(); cv.put(KEY_IMG, out.toByteArray()); cv.put(KEY_NAME, about.getName()); cv.put(KEY_AGE, about.getAge()); cv.put(KEY_STUDY, about.getStudy()); mDb.insert(PERSON_TABLE, null, cv); closeDB(); } } //data.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id = "@+id/img" android:layout_width = "wrap_content" android:layout_height = "wrap_content" > </ImageView> <TextView android:id = "@+id/name" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:textSize="15dp" android:textColor="#ff0000" > </TextView> <TextView android:id = "@+id/age" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:textSize="15dp" android:textColor="#ff0000" /> <TextView android:id = "@+id/study" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:textSize="15dp" android:textColor="#ff0000" /> </LinearLayout> When I run this in android 1.6 and 2.1, it works. But when I run in android 1.5, not work. My application is android 1.5. Please correct and send code to me. Thank you.

    Read the article

  • Proper 16:9 video size for non-HD 4:3 video (for youtube/vimeo)

    - by Xeoncross
    Since High Definition video came out on all the online sites it has changed the default aspect ratio of the player from 4:3 to 16:9. This means that for people posting SD video you have to resize some of your videos to get them to fit right. For example, NTSC DVD quality (aka 480i/p) is 720x480 pixels (width x height). However, low-end High Definition (720i/p) is 1280x720. Resolution Chart Anyway, now that the video players are built for HD you will find that uploading standard quality videos will result in videos that are "letter boxed" which means they have extra black bars on the top and bottom (or sides). Correct me if I'm wrong, but in order to get a 720x480 video to fit a box that is designed for HD the best practice would be to crop some of it off so that it fits as 720x404 since: 16/9 = 1.78 (1.7777777777778) 720/405 = 1.78 405x1.78 = 720.9 The same would stand for 640x480 (old TV quality) video that would need to be 640x360 correct? I'm asking because I'm not sure about all this and whether this is the proper way to fix these letter-boxing/display problems.

    Read the article

  • Save a view in Windows Media Player

    - by Charles Roper
    I like to view my library in various ways in WMP. For example, I usually search for Podcast and order the result by date added. This gives me a list of my podcasts by date order, newest to oldest. Is there a way of saving this view so that I don't have recreate it each time I open WMP? If it's not possible to do this, can anyone suggest an app that does do it, and that handles syncing as well as WMP.

    Read the article

  • Trancoding a video with vlc and the MPEG-4 codec with a video bit rate

    - by Nicolas
    When I try to trancode a video with vlc using the MPEG-4 codec and a video bit rate, I get the following error : Either both buffer size and max rate or neither must be specified Here is the command line I used : vlc -vvv myvideo.m2ts --sout-ffmpeg-strict=-2 --sout '#transcode{vcodec=mp4v,vb=2000,acodec=mp4a,ab=96}:standard{access=file,mux=mp4,dst=/path/file.mp4}' It seems that I can't specify a video bit rate with the MPEG-4 codec. (If I remove the vb option, it works). So how can I specify a video bit rate with the MPEG-4 codec ?

    Read the article

  • How to convert a video to 4:3 or 16:9 aspect ratio without loss of video quality

    - by Linux Jedi
    I uploaded my video to youtube and the highest resolution it appears as is 360p. This is much lower than what I uploaded. I believe that youtube isn't making higher resolutions available for my video because of its aspect ratio. The video is 720x400. How can I convert this to a different aspect ratio without losing any of the picture or picture quality? I don't care if blank space appears around the video so long as the picture doesn't get stretched horizontally or vertically.

    Read the article

  • custom video icon for a single video file in windows 7 file explorer

    - by MrBrody
    recently I found a video on the net ( a .mp4 file), and when I had it on my computer with Windows7, I noticed its thumbnail was not the average windows 7 video thumbnail (which looks like a piece of video film with a random picture from the movie), but a custom thumbnail! Looking in the file properties did not help find the correct button to change the thumbnail...so I just wonder how he did it! Here is a picture: left: the custom thumbnail, right: the average thumbnail...

    Read the article

  • insert an image in a tablelayout without streching it android

    - by Sephy
    Hi, I'm having some trouble getting pictures inside a tablelayout...actually, each I have 2 columns and when i put a picture in a cell of the table, it's completely streched and disproportionnated...I can't find how to make it stay it's original inside the cell and let the rest of the space filled by white background for instance.... XML is like that : <TableLayout android:layout_width="fill_parent" android:stretchColumns="*" android:layout_marginLeft="3dip" android:layout_marginRight="10dip" android:layout_height="wrap_content"> <TableRow android:layout_marginBottom="10dip"> <TextView android:id="@+id/tv01" android:text="text1" android:textSize="14sp" android:layout_margin="1dip" android:layout_height="wrap_content" android:textColor="@color/bleuLink" android:layout_width="wrap_content" android:layout_weight="1" android:background="@color/background"></TextView> <Button android:id="@+id/add" android:background="@drawable/addressbook" android:layout_height="wrap_content" android:layout_width="wrap_content"></Button> <Button android:id="@+id/call" android:background="@drawable/greenphone" android:layout_height="wrap_content" android:layout_width="wrap_content"></Button> help plz, thx

    Read the article

  • How to place a Linearlayout at bottom inside a Relativelayout in android

    - by SANDHYA
    I need to place a linear layout at bottom inside a relativelayout which is the top most parent in xml. How can i do this? Please help me. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background" android:orientation="vertical" > <RelativeLayout ....... <<--- this should occupy total available space </Relativelayout <Linearlayout ....... <<-- this should place at bottom always with height 50dp </LineaLayout> </ReltiveLayout>

    Read the article

  • Can't build and run an android test project created using "ant create test-project" when tested proj

    - by Mike
    I have a module that builds an app called MyApp. I have another that builds some testcases for that app, called MyAppTests. They both build their own APKs, and they both work fine from within my IDE. I'd like to build them using ant so that I can take advantage of continuous integration. Building the app module works fine. I'm having difficulty getting the Test module to compile and run. Using Christopher's tip from a previous question, I used android create test-project -p MyAppTests -m ../MyApp -n MyAppTests to create the necessary build files to build and run my test project. This seems to work great (once I remove an unnecessary test case that it constructed for me and revert my AndroidManifest.xml to the one I was using before it got replaced by android create), but I have two problems. The first problem: The project doesn't compile because it's missing libraries. $ ant run-tests Buildfile: build.xml [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 1.6 [setup] API level: 4 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. -install-tested-project: [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 1.6 [setup] API level: 4 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. -compile-tested-if-test: -dirs: [echo] Creating output directories if needed... -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 1 source file to /Users/mike/Projects/myapp/android/MyApp/bin/classes -dex: [echo] Converting compiled files and external libraries into /Users/mike/Projects/myapp/android/MyApp/bin/classes.dex... [echo] -package-resources: [echo] Packaging resources [aaptexec] Creating full resource package... -package-debug-sign: [apkbuilder] Creating MyApp-debug-unaligned.apk and signing it with a debug key... [apkbuilder] Using keystore: /Users/mike/.android/debug.keystore debug: [echo] Running zip align on final apk... [echo] Debug Package: /Users/mike/Projects/myapp/android/MyApp/bin/MyApp-debug.apk install: [echo] Installing /Users/mike/Projects/myapp/android/MyApp/bin/MyApp-debug.apk onto default emulator or device... [exec] 1567 KB/s (288354 bytes in 0.179s) [exec] pkg: /data/local/tmp/MyApp-debug.apk [exec] Success -compile-tested-if-test: -dirs: [echo] Creating output directories if needed... [mkdir] Created dir: /Users/mike/Projects/myapp/android/MyAppTests/gen [mkdir] Created dir: /Users/mike/Projects/myapp/android/MyAppTests/bin [mkdir] Created dir: /Users/mike/Projects/myapp/android/MyAppTests/bin/classes -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 5 source files to /Users/mike/Projects/myapp/android/MyAppTests/bin/classes [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:4: package roboguice.test does not exist [javac] import roboguice.test.RoboUnitTestCase; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:8: package com.google.gson does not exist [javac] import com.google.gson.JsonElement; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:9: package com.google.gson does not exist [javac] import com.google.gson.JsonParser; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:11: cannot find symbol [javac] symbol: class RoboUnitTestCase [javac] public class GsonTest extends RoboUnitTestCase<MyApplication> { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:6: package roboguice.test does not exist [javac] import roboguice.test.RoboUnitTestCase; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:7: package roboguice.util does not exist [javac] import roboguice.util.RoboLooperThread; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:11: package com.google.gson does not exist [javac] import com.google.gson.JsonObject; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:15: cannot find symbol [javac] symbol: class RoboUnitTestCase [javac] public class HttpTest extends RoboUnitTestCase<MyApplication> { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/LinksTest.java:4: package roboguice.test does not exist [javac] import roboguice.test.RoboUnitTestCase; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/LinksTest.java:12: cannot find symbol [javac] symbol: class RoboUnitTestCase [javac] public class LinksTest extends RoboUnitTestCase<MyApplication> { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:4: package roboguice.test does not exist [javac] import roboguice.test.RoboUnitTestCase; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:5: package roboguice.util does not exist [javac] import roboguice.util.RoboAsyncTask; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:6: package roboguice.util does not exist [javac] import roboguice.util.RoboLooperThread; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:12: cannot find symbol [javac] symbol: class RoboUnitTestCase [javac] public class SafeAsyncTest extends RoboUnitTestCase<MyApplication> { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectResource': class file for roboguice.inject.InjectResource not found [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectResource' [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectView': class file for roboguice.inject.InjectView not found [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectView' [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectView' [javac] /Users/mike/Projects/myapp/android/MyApp/bin/classes/com/myapp/activity/Stories.class: warning: Cannot find annotation method 'value()' in type 'roboguice.inject.InjectView' [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:15: cannot find symbol [javac] symbol : class JsonParser [javac] location: class com.myapp.test.GsonTest [javac] final JsonParser parser = new JsonParser(); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:15: cannot find symbol [javac] symbol : class JsonParser [javac] location: class com.myapp.test.GsonTest [javac] final JsonParser parser = new JsonParser(); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:18: cannot find symbol [javac] symbol : class JsonElement [javac] location: class com.myapp.test.GsonTest [javac] final JsonElement e = parser.parse(s); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/GsonTest.java:20: cannot find symbol [javac] symbol : class JsonElement [javac] location: class com.myapp.test.GsonTest [javac] final JsonElement e2 = parser.parse(s2); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:19: cannot find symbol [javac] symbol : method getInstrumentation() [javac] location: class com.myapp.test.HttpTest [javac] assertEquals("MyApp", getInstrumentation().getTargetContext().getResources().getString(com.myapp.R.string.app_name)); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:62: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.HttpTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:82: cannot find symbol [javac] symbol : method assertTrue(java.lang.String,boolean) [javac] location: class com.myapp.test.HttpTest [javac] assertTrue(result[0], result[0].contains("Search")); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:87: cannot find symbol [javac] symbol : class JsonObject [javac] location: class com.myapp.test.HttpTest [javac] final JsonObject[] result = {null}; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:90: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.HttpTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:117: cannot find symbol [javac] symbol : class JsonObject [javac] location: class com.myapp.test.HttpTest [javac] final JsonObject[] result = {null}; [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/HttpTest.java:120: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.HttpTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/LinksTest.java:27: cannot find symbol [javac] symbol : method assertTrue(boolean) [javac] location: class com.myapp.test.LinksTest [javac] assertTrue(m.matches()); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/LinksTest.java:28: cannot find symbol [javac] symbol : method assertEquals(java.lang.String,java.lang.String) [javac] location: class com.myapp.test.LinksTest [javac] assertEquals( map.get(url), m.group(1) ); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:19: cannot find symbol [javac] symbol : method getInstrumentation() [javac] location: class com.myapp.test.SafeAsyncTest [javac] assertEquals("MyApp", getInstrumentation().getTargetContext().getString(com.myapp.R.string.app_name)); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:27: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.SafeAsyncTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:65: cannot find symbol [javac] symbol : method assertEquals(com.myapp.test.SafeAsyncTest.State,com.myapp.test.SafeAsyncTest.State) [javac] location: class com.myapp.test.SafeAsyncTest [javac] assertEquals(State.TEST_SUCCESS,state[0]); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:74: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.SafeAsyncTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:105: cannot find symbol [javac] symbol : method assertEquals(com.myapp.test.SafeAsyncTest.State,com.myapp.test.SafeAsyncTest.State) [javac] location: class com.myapp.test.SafeAsyncTest [javac] assertEquals(State.TEST_SUCCESS,state[0]); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:113: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.SafeAsyncTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:144: cannot find symbol [javac] symbol : method assertEquals(com.myapp.test.SafeAsyncTest.State,com.myapp.test.SafeAsyncTest.State) [javac] location: class com.myapp.test.SafeAsyncTest [javac] assertEquals(State.TEST_SUCCESS,state[0]); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:154: cannot find symbol [javac] symbol : class RoboLooperThread [javac] location: class com.myapp.test.SafeAsyncTest [javac] new RoboLooperThread() { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java:187: cannot find symbol [javac] symbol : method assertEquals(com.myapp.test.SafeAsyncTest.State,com.myapp.test.SafeAsyncTest.State) [javac] location: class com.myapp.test.SafeAsyncTest [javac] assertEquals(State.TEST_SUCCESS,state[0]); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/StoriesTest.java:11: cannot access roboguice.activity.GuiceListActivity [javac] class file for roboguice.activity.GuiceListActivity not found [javac] public class StoriesTest extends ActivityUnitTestCase<Stories> { [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/StoriesTest.java:21: cannot access roboguice.application.GuiceApplication [javac] class file for roboguice.application.GuiceApplication not found [javac] setApplication( new MyApplication( getInstrumentation().getTargetContext() ) ); [javac] ^ [javac] /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/StoriesTest.java:22: incompatible types [javac] found : com.myapp.activity.Stories [javac] required: android.app.Activity [javac] final Activity activity = startActivity(intent, null, null); [javac] ^ [javac] 39 errors [javac] 6 warnings BUILD FAILED /opt/local/android-sdk-mac/platforms/android-1.6/templates/android_rules.xml:248: Compile failed; see the compiler error output for details. Total time: 24 seconds That's not a hard problem to solve. I'm not sure it's the right thing to do, but I copied the missing libraries (roboguice and gson) from the MyApp/libs directory to the MyAppTests/libs directory and everything seems to compile fine. But that leads to the second problem, which I'm currently stuck on. The tests compile fine but they won't run: $ cp ../MyApp/libs/gson-r538.jar libs/ $ cp ../MyApp/libs/roboguice-1.1-SNAPSHOT.jar libs/ 0 10:23 /Users/mike/Projects/myapp/android/MyAppTests $ ant run-testsBuildfile: build.xml [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 1.6 [setup] API level: 4 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. -install-tested-project: [setup] Project Target: Google APIs [setup] Vendor: Google Inc. [setup] Platform Version: 1.6 [setup] API level: 4 [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. -compile-tested-if-test: -dirs: [echo] Creating output directories if needed... -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 1 source file to /Users/mike/Projects/myapp/android/MyApp/bin/classes -dex: [echo] Converting compiled files and external libraries into /Users/mike/Projects/myapp/android/MyApp/bin/classes.dex... [echo] -package-resources: [echo] Packaging resources [aaptexec] Creating full resource package... -package-debug-sign: [apkbuilder] Creating MyApp-debug-unaligned.apk and signing it with a debug key... [apkbuilder] Using keystore: /Users/mike/.android/debug.keystore debug: [echo] Running zip align on final apk... [echo] Debug Package: /Users/mike/Projects/myapp/android/MyApp/bin/MyApp-debug.apk install: [echo] Installing /Users/mike/Projects/myapp/android/MyApp/bin/MyApp-debug.apk onto default emulator or device... [exec] 1396 KB/s (288354 bytes in 0.201s) [exec] pkg: /data/local/tmp/MyApp-debug.apk [exec] Success -compile-tested-if-test: -dirs: [echo] Creating output directories if needed... -resource-src: [echo] Generating R.java / Manifest.java from the resources... -aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 5 source files to /Users/mike/Projects/myapp/android/MyAppTests/bin/classes [javac] Note: /Users/mike/Projects/myapp/android/MyAppTests/src/com/myapp/test/SafeAsyncTest.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. -dex: [echo] Converting compiled files and external libraries into /Users/mike/Projects/myapp/android/MyAppTests/bin/classes.dex... [echo] -package-resources: [echo] Packaging resources [aaptexec] Creating full resource package... -package-debug-sign: [apkbuilder] Creating MyAppTests-debug-unaligned.apk and signing it with a debug key... [apkbuilder] Using keystore: /Users/mike/.android/debug.keystore debug: [echo] Running zip align on final apk... [echo] Debug Package: /Users/mike/Projects/myapp/android/MyAppTests/bin/MyAppTests-debug.apk install: [echo] Installing /Users/mike/Projects/myapp/android/MyAppTests/bin/MyAppTests-debug.apk onto default emulator or device... [exec] 1227 KB/s (94595 bytes in 0.075s) [exec] pkg: /data/local/tmp/MyAppTests-debug.apk [exec] Success run-tests: [echo] Running tests ... [exec] [exec] android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests:INSTRUMENTATION_RESULT: shortMsg=Class ref in pre-verified class resolved to unexpected implementation [exec] INSTRUMENTATION_RESULT: longMsg=java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation [exec] INSTRUMENTATION_CODE: 0 BUILD SUCCESSFUL Total time: 38 seconds Any idea what's causing the "Class ref in pre-verified class resolved to unexpected implementation" error?

    Read the article

  • Audio Recording with Appcelerator on Android

    - by user951793
    I would like to record audio and then send the file to a webserver. I am using Titanium 1.8.2 on Win7. The application I am woring on is both for Android and iphone and I do realise that Titanium.Media.AudioRecorder and Titanium.Media.AudioPlayer are for these purpose. Let's concentrate on android for a while. On that platform you can achieve audio recording by creating an intent and then you handle the file in your application. See more here. This implementation has a couple of drawbacks: You cannot stay in your application (as a native audio recorder will start up) You only get back an uri from the recorder and not the actual file. Another implementation is done by Codeboxed. This module is for recording an audio without using intents. The only problem that I could not get this working (along with other people) and the codeboxed team does not respond to anyone since last year. So my question is: Do you know how to record audio on android without using an intent? Thanks in advance. Edit: My problem with codeboxed's module: I downloaded the module from here. I copied the zip file into my project directory. I edited my manifest file with: <modules> <module platform="android" version="0.1">com.codeboxed.audiorecorder</module> </modules> When I try and compile I receive the following error: [DEBUG] appending module: com.mwaysolutions.barcode.TitaniumBarcodeModule [DEBUG] module_id = com.codeboxed.audiorecorder [ERROR] The 'apiversion' for 'com.codeboxed.audiorecorder' in the module manifest is not a valid value. Please use a version of the module that has an 'apiversion' value of 2 or greater set in it's manifest file [DEBUG] touching tiapp.xml to force rebuild next time: E:\TitaniumProjects\MyProject\tiapp.xml I can manage to recognise the module by editing the module's manifest file to this: ` version: 0.1 description: My module author: Your Name license: Specify your license copyright: Copyright (c) 2011 by Your Company apiversion: 2 name: audiorecorder moduleid: com.codeboxed.audiorecorder guid: 747dce68-7d2d-426a-a527-7c67f4e9dfad platform: android minsdk: 1.7.0` But Then again I receive error on compiling: [DEBUG] "C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe" -encoding utf8 -classpath "C:\Program Files (x86)\Android\android-sdk\platforms\android-8\android.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-media.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-platform.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\titanium.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\thirdparty.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\jaxen-1.1.1.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-locale.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-app.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-gesture.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-analytics.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\kroll-common.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-network.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\ti-commons-codec-1.3.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-ui.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-database.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\kroll-v8.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-xml.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\android-support-v4.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-filesystem.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\modules\titanium-android.jar;E:\TitaniumProjects\MyProject\modules\android\com.mwaysolutions.barcode\0.3\barcode.jar;E:\TitaniumProjects\MyProject\modules\android\com.mwaysolutions.barcode\0.3\lib\zxing.jar;E:\TitaniumProjects\MyProject\modules\android\com.codeboxed.audiorecorder\0.1\audiorecorder.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\kroll-apt.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\lib\titanium-verify.jar;C:\Users\Gabor\AppData\Roaming\Titanium\mobilesdk\win32\1.8.2\android\lib\titanium-debug.jar" -d E:\TitaniumProjects\MyProject\build\android\bin\classes -proc:none -sourcepath E:\TitaniumProjects\MyProject\build\android\src -sourcepath E:\TitaniumProjects\MyProject\build\android\gen @c:\users\gabor\appdata\local\temp\tmpbqmjuy [ERROR] Error(s) compiling generated Java code [ERROR] E:\TitaniumProjects\MyProject\build\android\gen\com\petosoft\myproject\MyProjectApplication.java:44: cannot find symbol symbol : class AudiorecorderBootstrap location: package com.codeboxed.audiorecorder runtime.addExternalModule("com.codeboxed.audiorecorder", com.codeboxed.audiorecorder.AudiorecorderBootstrap.class); ^ 1 error

    Read the article

  • using Unity Android In a sub view and add style and actionbar

    - by aeroxr1
    I exported a simple animation from Unity3D (version 4.5) in android project. With eclipse I modified the manifest and added another activity. In this activity I put a button that it makes start the animation,and this is the result. The action bar appear in the main activity but it doesn't in the unity's activity :( This is the unity's activity's code : package com.rabidgremlin.tut.redcube; import android.app.NativeActivity; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.os.Bundle; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import com.unity3d.player.UnityPlayer; public class UnityPlayerNativeActivity extends NativeActivity { protected UnityPlayer mUnityPlayer; // don't change the name of this variable; referenced from native code // Setup activity layout @Override protected void onCreate (Bundle savedInstanceState) { //requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); getWindow().takeSurface(null); //setTheme(android.R.style.Theme_NoTitleBar_Fullscreen); getWindow().setFormat(PixelFormat.RGB_565); mUnityPlayer = new UnityPlayer(this); /*if (mUnityPlayer.getSettings ().getBoolean ("hide_status_bar", true)) getWindow ().setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); */ setContentView(mUnityPlayer); mUnityPlayer.requestFocus(); } // Quit Unity @Override protected void onDestroy () { mUnityPlayer.quit(); super.onDestroy(); } // Pause Unity @Override protected void onPause() { super.onPause(); mUnityPlayer.pause(); } // eliminiamo questa onResume() e proviamo a modificare la onResume() // Resume Unity @Override protected void onResume() { super.onResume(); mUnityPlayer.resume(); } // inseriamo qualche modifica qui // This ensures the layout will be correct. @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); mUnityPlayer.configurationChanged(newConfig); } // Notify Unity of the focus change. @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); mUnityPlayer.windowFocusChanged(hasFocus); } // For some reason the multiple keyevent type is not supported by the ndk. // Force event injection by overriding dispatchKeyEvent(). @Override public boolean dispatchKeyEvent(KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_MULTIPLE) return mUnityPlayer.injectEvent(event); return super.dispatchKeyEvent(event); } // Pass any events not handled by (unfocused) views straight to UnityPlayer @Override public boolean onKeyUp(int keyCode, KeyEvent event) { return mUnityPlayer.injectEvent(event); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { return mUnityPlayer.injectEvent(event); } @Override public boolean onTouchEvent(MotionEvent event) { return mUnityPlayer.injectEvent(event); } /*API12*/ public boolean onGenericMotionEvent(MotionEvent event) { return mUnityPlayer.injectEvent(event); } } How can I add the action bar and the style of the first activity to unity's animation activity ?

    Read the article

  • How to play 24 fps video smoothly on a 60Hz display?

    - by netvope
    I use mpc-hc to play videos on Win7 x64. With the default settings (#1), video playback is great most of the time. But for panning shots, playback is not smooth. I stepped through the video frame by frame and found that the panning movement is smooth (e.g. each frame shifts horizontally by 10 pixels), so the problem is how the 23.976 fps video is interpolated to 60Hz. The judder looks like what would be caused by a "2:3 pulldown", where the frames are played unevenly like: frame 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, etc (#2) Using "optimal renderer settings" (#3) instead of the default disables the Aero theme and causes tearing. Setting my LCD display to 50Hz may have improved the judder slightly (but I can't really tell). My display does not support 24Hz or 48Hz, and forcing them in the Nvidia control panel gives blurry screen. I've tried other video players (VLC and KMPlayer), the ReClock Directshow Filter, video files from different sources (#4), turning on/off DXVA, and a computer with a different GPU, but the judder in the playback is similar. None of them solved the problem. So, how can I play 23.976 or 24 fps video smoothly on a 60Hz display? I think a video player could make the video smoother by doing linear interpolation, such as: 1. 100% frame 1 2. 60% frame 1 + 40% frame 2 3. 20% frame 1 + 80% frame 2 4. 80% frame 2 + 20% frame 3 5. 40% frame 2 + 60% frame 3 6. 100% frame 3 7. 60% frame 3 + 40% frame 4 .. etc Can any existing video player do this? Footnotes: (#1) Video renderer: EVR Custom Pres. (#2) This example converts a 24 fps video into 30 fps (#3) View Renderer settings Reset Reset to optimal renderer settings (#4) The files I have are all H.264 mkv files, but I don't think the file format/encoding matters.

    Read the article

  • Android: Download the Android SDK components for offline install

    - by Tawani
    Is it possible to download the Android SDK components for offline install without using the SDK Manager? The problem is I am behind a firewall which I have no control over and both sites download URLs seem to be blocked (throws a connection refused exception) https://dl-ssl.google.com/android/repository/repository.xml http://dl-ssl.google.com/android/repository/repository.xml Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml, reason: Connection refused: connect

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >