我使用Android Lollipop SDK(21)构建我的应用程序.打开一些活动并关闭它们后,一个活动就会出现这个损坏的屏幕.它看起来像是内存错误,但这只发生在Android Lollipop设备上.在Logcat中我看不到错误.
有什么想法是什么?
照片旋转90度,同时从三星移动其他手机(HTC)的相机捕捉其工作正常.请帮帮我.
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, IMAGE_CAPTURE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
try
{
if (requestCode == IMAGE_CAPTURE) {
if (resultCode == RESULT_OK){
Uri contentUri = data.getData();
if(contentUri!=null)
{
String[] proj = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(contentUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
imageUri = Uri.parse(cursor.getString(column_index));
}
tempBitmap = (Bitmap) data.getExtras().get("data");
mainImageView.setImageBitmap(tempBitmap);
isCaptureFromCamera = true;
}
}
Run Code Online (Sandbox Code Playgroud) 我是新来的JSP
.我使用登录系统在Web应用程序中创建了一组页面.
我想做退出选项,它应该出现在每一页上.
我需要完整的源代码.
你好我正在研究一个很好的Android应用程序,我需要将大位图适合小尺寸imageview
.我使用imageview
的尺寸为300dp X 300dp来显示1024 x 780的大图像
如何将大图像制作成与原始图像一样好的小图像?
嗨,我正在Facebook Instant Verification
我的应用程序中实现.在我的应用程序中,我正在验证移动号码的客户,我正在发送OTP以获得此验证.
我想改变方法,因为最近Facebook推出了一个概念Facebook Instant Verification
,根据您在Facebook
帐户中配置的任何数字来验证手机号码.
https://developers.facebook.com/blog/post/2016/12/20/introducing-instant-verification/
https://developers.facebook.com/docs/accountkit/android
https://developers.facebook.com/docs/accountkit/overview
我已经完成了文章中所说的任何内容但是因为它写的是每当你输入在你的facebook应用程序中配置的相同号码时,facebook帐户工具包将根据你的facebook帐户上的任何内容验证你的手机号码,否则它会发送OTP然后执行验证.
在我的情况下,我输入相同的手机号码,在我的Facebook帐户上配置并使用最新的Facebook应用程序,但它仍然不会根据Facebook应用程序上配置的手机号码验证手机号码,它总是发送OTP.
因为它应该在没有OTP的情况下进行验证 我不确定我的代码和配置中缺少什么,因为它始终使用OTP进行验证.
请支持.提前致谢.
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
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>
<meta-data android:name="com.facebook.accountkit.ApplicationName"
android:value="@string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/FACEBOOK_APP_ID" />
<meta-data android:name="com.facebook.accountkit.ClientToken"
android:value="@string/ACCOUNT_KIT_CLIENT_TOKEN" />
<activity
android:name="com.facebook.accountkit.ui.AccountKitActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/ak_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
Run Code Online (Sandbox Code Playgroud)
apply …
Run Code Online (Sandbox Code Playgroud) android facebook facebook-android-sdk facebook-login account-kit
我在我的Android应用程序中使用dagger2.即使没有错误,它也不会生成匕首组件类.
我在设置中启用了注释处理器并重新启动我的android工作室,但这对我不起作用.我读了这个线程Dagger2没有生成Daggercomponent类并读取一个apt
不推荐使用的线程所以我正在使用annotationProcessor
基本模块build.gradle
apply plugin: 'com.android.feature'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
baseFeature true
defaultConfig {
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "0.0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
application project(':app')
feature project(":main")
feature project(":tv")
api 'com.android.support:appcompat-v7:26.0.2'
api 'com.android.support.constraint:constraint-layout:1.0.2'
api 'com.android.support:design:26.0.2'
api "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
api "org.jetbrains.anko:anko-commons:$anko_version"
api "android.arch.lifecycle:runtime:1.0.0-alpha9"
api "android.arch.lifecycle:extensions:1.0.0-alpha9"
kapt "android.arch.lifecycle:compiler:1.0.0-alpha9"
api 'com.squareup.retrofit2:retrofit:2.3.0'
api "com.squareup.retrofit2:converter-moshi:2.0.0"
api 'com.google.dagger:dagger:2.11'
kapt 'com.google.dagger:dagger-compiler:2.11' …
Run Code Online (Sandbox Code Playgroud) 我正在实施Action Bar
.我想要Action Bar SearchView
像Flipkart应用程序的搜索字段区域中的2个按钮.
像上面的截图一样,我想要2个按钮,第一个用于语音搜索,另一个用于条形码扫描器,当点击搜索图标SearchView
时Actionbar
出现.我可以actionbar serahcview
用搜索图标实现.但我有点困惑为什么语音搜索没有出现在我的应用程序中.看看我的源代码.
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
setSearchTextColour(searchView);
setCloseSearchIcon(searchView);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
return super.onPrepareOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.action_search:
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private …
Run Code Online (Sandbox Code Playgroud) 有没有办法GSM
用无线电接口层守护进程和它AT
在Android中的命令启动呼叫?我的真实意图是加密语音数据并从gsm网络发送.
RILD能够通过GSM发送加密的语音数据吗?
照片旋转90度,同时从三星移动其他手机的相机捕捉其工作正常.请帮帮我.
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, IMAGE_CAPTURE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
try
{
if (requestCode == IMAGE_CAPTURE) {
if (resultCode == RESULT_OK){
Uri contentUri = data.getData();
if(contentUri!=null)
{
String[] proj = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(contentUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
imageUri = Uri.parse(cursor.getString(column_index));
}
tempBitmap = (Bitmap) data.getExtras().get("data");
mainImageView.setImageBitmap(tempBitmap);
isCaptureFromCamera = true;
}
}
Run Code Online (Sandbox Code Playgroud) 我有这个字符串:
String code="abc";
Run Code Online (Sandbox Code Playgroud)
我想通过substring
方法从这个字符串中提取"c" 但它不起作用:
String code="abc";
String getsmscode=code.substring(2,1);
Run Code Online (Sandbox Code Playgroud)
此代码返回错误
java.lang.StringIndexOutOfBoundsException: length=3; regionStart=2; regionLength=-1
Run Code Online (Sandbox Code Playgroud)
但我不知道为什么?
android ×9
java ×2
account-kit ×1
cryptography ×1
dagger-2 ×1
encryption ×1
facebook ×1
gsm ×1
jsp ×1
kapt ×1
logout ×1
netbeans ×1
ril ×1
searchview ×1
string ×1
substring ×1