|
This is the error because you have not added the class in your Android Manifest file. Try adding the class name i.e activity to your Manifest.xml and run it. It must work..
|
|
|
|
|
I thick you changed manifest.xml
in that see wheather the <activity android:name=".MainActivity">
is there
|
|
|
|
|
Hi All,
I am just developing one Android app, in which we have to capture the video. Now user will capture the video in portrait view but while it will play, it will automatically play in landscape.
i.e. video is capture in portrait view, though it will play in landscape view. when i will check in memory card, video is still captured in portrait view and also while playing video from memory card, it will play in portrait view.
I have checked, manifest file and seems all files are fine.
Please let me know if any one have any idea.
Regards
Keyur Satyadev
|
|
|
|
|
Actually i have same problem so when you find please share with me.Thanks
|
|
|
|
|
Which Device you are using? Its working fine with my HTC but having issue with Samsung.
Regards
Keyur Satyadev
|
|
|
|
|
Hello,
I've been trying to make my first Android app.
I created a library project that cointain an activity called 'Reader':
public class Reader extends Activity {
private String ID;
public void setID(String id) {
ID = id;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reader);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_reader, menu);
return true;
}
}
also i created a (test) project that contain another activity called 'MainActivity':
public class MainActivity extends Reader {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setID("bla_bla_bla");
}
}
when it comes to the GUI the inheritance is working well, i can see everything I placed in 'Reader' on 'MainActivity', but when it comes to using inherited methods such as 'setID(String)' i get a compilation error Eclipse Quote: The method setID(String) is undefined for the type MainActivity
How can it be?
thank you very much!!!
|
|
|
|
|
Have you tried using
super.setID("bla_bla_bla");
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
Hello,
I've been trying to make my first Android app.
I created a library project that cointain an activity called 'Reader':
|
|
|
|
|
hi all,
how can I execute adb command for android mobile phone from my dialog based application and get return value of these command in application and show.
please help me for this.
thanks in advance.
|
|
|
|
|
How do I add method for last_insert_rowid
I added a record to the table. As soon as it is entered I want to get the rowed that SQLite gave to it. How can I accomplish this?
|
|
|
|
|
You should be able to use last_insert_rowid for the last row id that was inserted for that connection. Basically, inside the same connection, issue a separate select command:
SELECT last_insert_rowid
|
|
|
|
|
Hi Pete,
I tried this and it wont let me compile. I don't know the correct syntax. There is not much out there for WP8 SQLite
string query = "select last_insert_rowid() as id from myTable";
using (var db = new SQLite.SQLiteConnection(System.IO.Path.Combine(ApplicationData.Current.LocalFolder.Path, "SM.db"), true))
{
SQLite.SQLiteCommand cmd = new SQLite.SQLiteCommand(db);
var result = cmd.ExecuteNonQuery();
}
|
|
|
|
|
No. Only select last_insert_rowid();. You don't need the rest. There's a reaaon I didn't include it in my answer there.
|
|
|
|
|
I tried that and I get this error
SQLite.SQLiteException: Misuse
|
|
|
|
|
I tried this also and the error is "Row"
SQLite.SQLiteCommand cmd = new SQLite.SQLiteCommand(db);
cmd.CommandText = query.ToString();
var result2 = cmd.ExecuteNonQuery();
|
|
|
|
|
If you're trying to retrieve the record, use ExecuteScalar , not ExecuteNonQuery .
|
|
|
|
|
Ok,
So what is the syntax for that?
cmd.ExecuteScalar< ? >;
Sorry, I just don't know SQLite
|
|
|
|
|
It should just be something like:
private int GetLastRowId(SQLLite.SQLLiteConnection connection)
{
SQLLite.SQLLiteCommand cmd = new (connection);
cmd.CommandText = "SELECT last_insert_rowid";
object rowId = cmd.ExecuteScalar();
return Convert.ToInt32(rowId);
}
|
|
|
|
|
|
|
Cursor cursor = getReadableDatabase().
rawQuery("select * from todo where _id = ?", new String[] { id });
|
|
|
|
|
Hello
I need your help ...
How can I invoke an HTTPS web service from J2ME??
Suppose there is a HTTPS site contains a web service , and I want to invoke this web service from a J2ME Application exists in my mobile phone , How I can do that ???
Please Any helpful Article or project or Video send me...
Thank you all..
I am waiting your reply.....
|
|
|
|
|
Hello,
Here[^] is a good tutorial available on IBM Developerworks.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
Thank you Prasad P. Khandekar
I ll read chapters ...
|
|
|
|
|
I have a Windows Phone 8 App using SQLite (C#, XAML) I want to create records in my table in code. I tried an experiment by just placing a button on my window that executes a counter to create 10 records in my database. When I execute it, I get no errors, but the records are not in the database. Could you tell me what I am doing wrong?
For instance, with my DataModel:
class Test
{
[SQLite.AutoIncrement, SQLite.PrimaryKey]
public int TestID { get; set; }
public int MyCounter { get; set; }
}
And my View Model
public class TestViewModel : ViewModelBase
{
#region Properties
private int testid = 0;
public int testid
{
get
{ return testid; }
set
{
if (testid == value)
{ return; }
testid = value;
RaisePropertyChanged("TestID");
}
}
private int mycounter = 0;
public int MyCounter
{
get
{ return mycounter ; }
set
{
if (mycounter == value)
{ return; }
mycounter = value;
RaisePropertyChanged("MyCounter");
}
}
#endregion
public string SaveRecord(TestViewModel _vm)
{ string result = string.Empty;
using(var db = new SQLite.SQLiteConnection(app.DBPath))
{
string change = string.Empty;
try
{
var er = (db.Table().Where(
c => c.TestID == _vm.TestID)).SingleOrDefault();
if (er != null)
{
er.MyCounter = _vm.MyCounter;
int success = db.Update(er);
}
else
{
int success = db.Insert(new Test()
{
TestID = _vm.TestID,
MyCounter = _vm.MyCounter,
});
}
result = "Success";
}
catch (Exception ex)
{
StringBuilder erMessage = new StringBuilder();
erMessage.Append("This record was not saved.");
erMessage.AppendLine();
erMessage.Append(ex);
result = "This record was not saved.";
}
}
return result;
}
}
So in my Window I just tried a test
public partial class MyWindow : PhoneApplicationPage
{
RoundShotTest mytest = null;
…..
….
}
private void buttonTryMe_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
For(int x = 0; x < 10; x++)
{
mytest = new TestViewModel();
mytest.MyCounter = x;
string result = mytest.SaveRecord(mytest);
}
What am I doing wrong here. I get no error, but when I take a look in the database, the records have not been written?
|
|
|
|