|
i need a full documentation on android speech to text.
as it is very urgent. Any reliable assistance will be highly appreciated.
Thanks in anticipation
|
|
|
|
|
Oluawayemi wrote: i need Then you should make an effort to do some research; Google is a good place to start.
Oluawayemi wrote: it is very urgent Not to anyone here.
|
|
|
|
|
i have done that... but i guess if anyone has a clue better than that of google its gonna be an additional adva ntage.
thanks for your info anyways
|
|
|
|
|
I Use Android Studio to write my application using telephonymanager .
The manifest is here.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I have remember to add permission.
And The Main Activity Java code is here
package com.example.myapplication;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv=(TextView)findViewById(R.id.tv);
TelephonyManager TM =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String IMEI= TM.getDeviceId();
String SubcriberNumber = TM.getLine1Number();
String ISO = TM.getSimCountryIso();
String Operator = TM.getNetworkOperator();
String SimoperatorName = TM.getSimOperatorName();
int Phone=TM.getPhoneType();
String StrPhoneType;
switch (Phone)
{
case (TelephonyManager.PHONE_TYPE_CDMA):
StrPhoneType ="CDMA Phone";
break;
case (TelephonyManager.PHONE_TYPE_GSM):
StrPhoneType ="GSM Phone";
break;
case (TelephonyManager.PHONE_TYPE_NONE):
StrPhoneType ="NONE";
break;
}
boolean isRoaming =TM.isNetworkRoaming();
String info = "Phone Detail";
info+= "\n IMEI Number"+ IMEI;
info+= "\n Sub Number"+ SubcriberNumber;
info+= "\n ISO Number"+ ISO;
info+= "\n Operator "+ Operator;
info+= "\n SIM Operator Name " + SimoperatorName;
//info+= "\n Phone type " + StrPhoneType;
info+= "\n Is Roamming " + isRoaming;
tv.setText(info);
}
}
But the App can't run.
Please help
|
|
|
|
|
hmanhha wrote:
But the App can't run.
Please help Sorry, no can do. We do not understand what "can't run" means.
If you took your car to a mechanic, do you really think he'd be able to fix your car if you simply said "it can't run?" If you called your HVAC technician and said "my heater can't run," do you really think he'd be able to fix it? You're going to need to offer a detailed explanation of what is happening.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 23-Oct-17 10:03am.
|
|
|
|
|
Johnny Bayne wrote: I had some problems with it - in the script I have errors but I don`t know what I need to do to fix them. I had read a lot of information about it but I so far don`t understand what I need to do. Maybe somebody can help? Or at least give advise where I can read about it. Try here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi, here is my code:
package com.example.work.try1;
import android.widget.Button;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.EditText;
import android.net.Uri;
import android.content.Intent;
import android.view.View;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class Launch extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_launch);
final View buttonS = findViewById(R.id.button);
buttonS.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Uri uri = Uri.parse("https://www.navanithiastrolife.com");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
Button b = (Button) findViewById(R.id.button2);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EditText e1 = (EditText) findViewById(R.id.editText);
String username = e1.getText().toString();
EditText e2 = (EditText) findViewById(R.id.editText3);
String password = e2.getText().toString();
OutputStream out = null;
try {
URL url = new URL("http://iconinfo.tech/mob_app/");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.connect();
urlConnection.setRequestMethod("POST");
urlConnection.setRequestProperty("username",username);
urlConnection.setRequestProperty("password",password);
urlConnection.setDoOutput(true);
urlConnection.disconnect();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
});
}
}
|
|
|
|
|
Member 13449286 wrote: Hi, here is my code: And where is your question?
|
|
|
|
|
In my topic. "How to write POST method to PHP."
|
|
|
|
|
|
POST server request to PHP server from Android java program. Post means you send a request to server and get response, like a password username login.
|
|
|
|
|
Sorry, but I have no idea what you are talking about. Please edit your original post and explain in proper detail what your problem is.
|
|
|
|
|
Member 13449286 wrote: Hi, here is my code: And what is it doing (besides not working)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Good Day Everyone
I have a Code that saves data and send an email after that. want to show Progress Dialog when this is happening. This code is in a Fragment that is shown in a Tab. below is my code
in my Activity this works nicely. i have a challenge in making this to work in a Fragment
btn_contact_save.Click += (sender, e) =>
{
var progressDialog = new ProgressDialog(Context);
progressDialog.SetTitle("Saving...");
progressDialog.Indeterminate = true;
progressDialog.Show();
progressDialog.SetCancelable(false);
<pre>
btn_details_save_Click(view);
progressDialog.Dismiss();
};</pre>
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
Vimalsoft(Pty) Ltd wrote: i have a challenge in making this to work in a Fragment And that challenge would be what exactly?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
The Dialog does not show
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
Where is the context coming from? Is an exception being thrown?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
hi
There is no Exception , the Context is the Application Context (Context.Android.Support.V4.App.Fragment.Context) , i also tried to declare the context at a fragment level and initialize it on OnCreateView (Android.Content.Context) but still it does not show the dialog.
Please note this dialog shows nicely in an Activity not a Fragment.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
Vimalsoft(Pty) Ltd wrote:
There is no Exception... You know this, even without a try/catch block?
Vimalsoft(Pty) Ltd wrote: , the Context is the Application Context (Context.Android.Support.V4.App.Fragment.Context) , i also tried to declare the context at a fragment level and initialize it on OnCreateView (Android.Content.Context) but still it does not show the dialog. Have you tried using getActivity() when constructing the ProgressDialog ?
Vimalsoft(Pty) Ltd wrote:
Please note this dialog shows nicely in an Activity not a Fragment. Which means nothing. While a fragment runs within an activity, that does not mean they are interchangeable.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
You know this, even without a try/catch block?
<b>i stepped through and no exception was raised.</b>
Have you tried using getActivity() when constructing the ProgressDialog?
let me try that and i will get back to you.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
I created a small app based on a "Tabbed Activity." It has two tabs. The content of both tabs will be a ListView filled from the Contacts database. Because of the new Permissions requirements that came out with Android 6, I need permission from the user at runtime to access that datastore. As such, I am calling checkSelfPermission() and requestPermissions() as prescribed in the docs.
If I put those calls in the activity, I get one request dialog asking for permission, and because requestPermissions() runs synchronously in a separate thread, the two fragments are allowed to finish their creation in the main thread. Once permission is granted, the activity sends both fragments a message indicating they can now populate their ListView s. This works fine, until I restart the app. Since permission has now been granted, requestPermissions() does not run, and the message that the activity sends to the fragments gets there before the fragments have been fully created. Just to see what would happen, I preceded the message with a 1-second sleep and that gave the fragments enough time to finish their creation. This works fine for both a first-time and restarted app. I did not like this approach because of the delay, so I kept looking.
If I put those calls in each fragment, I get two requests asking for permission. I can grant permission to neither, one or the other, or both, and the fragments will respond accordingly. The obvious problem is the two request dialogs. I could not find the proper way of having one fragment communicate to the other that it has already sought permission and that a second request is not necessary.
Another thing I tried was to put a call to checkSelfPermission() in each fragment's onActivityCreated() method to continuously poll the desired permission. The call to requestPermission() was still done once in the activity. Once the permission was granted, each fragment would then go about populating its ListView . This worked, but it still felt wrong given the pausing and polling each fragment was having to do.
I feel my first approach is the proper way to go, but cannot find a suitable solution to the timing issue. I found out a long time ago when doing Windows development that inserting code to slow down or speed up your program's execution is a major recipe for disaster. Better to signal events instead. So far I'm unable to find a comparable solution in either Java or Android.
Any helpful suggestions?
Thanks.
- DC
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
modified 29-Sep-17 15:37pm.
|
|
|
|
|
Good Day Everyone
From my AppCompatActivity class i am trying to open an activity as an intent like this
<pre>Intent homemap = new Intent(this, typeof(HomeMap));
var fintent = new Intent(this, homemap.Class);
StartActivity(fintent);</pre>
and my manifest i have declared my Activity like this
<pre><activity
android:name=".Toletsa.HomeMap"
android:label="@string/title_activity_maps" /></pre>
and my package name in the manifest is package="com.vimalsoft.toletsa" . My assembly name is Toletsa and my namespace is Toletsa
The layout file for my Activity that i want to open as an intent is
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_privacy_policy"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.vimalsoft.toletsa.Toletsa.HomeMap">
<fragment
android:id="@+id/map"
android:layout_width="200dp"
android:layout_height="200dp"
class="com.google.android.gms.maps.MapFragment" />
</RelativeLayout>
when i run the project i get an error when starting the activity
Unhandled Exception:
Android.Content.ActivityNotFoundException: Unable to find explicit activity class {com.vimalsoft.toletsa/android.content.Intent}; have you declared this activity in your AndroidManifest.xml?
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
I'm not certain about this but I have something similar, but does it this way:
Intent homemap = new Intent(this, HomeMap.class);
|
|
|
|
|
Good Day
i was able to resolve the issue i just changed this
android:name=".Toletsa.HomeMap"
in my Manifest to
android:name=".HomeMap"
and this solved my problem , the code was ok
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
technology stack for Android chat application. Anyone explain it clearly.
|
|
|
|