标签: push

XMPP如何将数据推送到客户端?

任何人都可以解释XMPP服务器如何将数据推送到XMPP客户端?此客户端很可能是在防火墙后面,并且在Internet上没有自己的IP,因此如何通知客户端?客户端是否始终保持与服务器的连接?

networking xmpp push

1
推荐指数
1
解决办法
989
查看次数

当我点击iPhone中的导航栏时,如何弹出所需的视图控制器

在我的应用程序中我有6个不同的视图控制器 1.主页2.表视图3.表视图元素的详细信息,这也是一个包含4行的表视图4. 4,5,6编辑/修改视图的详细信息(详细信息表中的每一行都可以修改和重新加载)

在4,5,6视图中编辑详细信息视图的数据时,导航将被推送到第2视图详细信息视图.

当我点击后面的导航细节时,它会弹出到最近修改的上一个视图.但是我需要弹出(推到左/后侧而不是推到右侧)到tableview1,所以我为这个按钮创建了一个leftnavigation项目实现的动作.

UIBarButtonItem *backButton = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:self action:@selector(backclick:)] autorelease];
    self.navigationItem.leftBarButtonItem = backButton;
Run Code Online (Sandbox Code Playgroud)

在click acitio中,我使用了三种不同的方法

1.popToRootViewcontroller : it takes back to the home page. so ,didn't need it (X)
2.[self.navigationController pushViewController:abc animated:YES]; it pushes right/front (X)
3.present model view controller
Run Code Online (Sandbox Code Playgroud)

一切正在工作,并采取到表视图,但没有在正确的方向,即不弹出到后面只是pusshes到前面.所以,我使用了popto viewcontoller.

4.popViewController(这是我猜的正确的过程)但它崩溃并显示错误视图soesnot exixst

-(IBAction)backclick:(id)sender
{
    ChronologyViewController *temp = [[ChronologyViewController alloc]initWithNibName:@"ChronologyViewController" bundle:nil];
        [self.navigationController popToViewController:temp animated:YES];
}
Run Code Online (Sandbox Code Playgroud)

iphone push objective-c uitableview uinavigationcontroller

1
推荐指数
1
解决办法
3142
查看次数

应用程序关闭时如何通过推送更改应用程序徽章

我正在尝试更改我正在开发的应用程序的徽章.关闭时,遗憾的是我只是在没有更改徽章的情况下通知了一条消息.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge];

NSDictionary* userInfo = [launchOptions valueForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"];
NSDictionary *apsInfo = [userInfo objectForKey:@"aps"];

NSInteger badge = [[apsInfo objectForKey:@"badge"] integerValue];
if( [apsInfo objectForKey:@"alert"] != NULL)
{
    application.applicationIconBadgeNumber = badge;
}
Run Code Online (Sandbox Code Playgroud)

但这并没有改变任何事情.我没有找到任何解决方案.在推送通知到达时调用了什么方法并且应用程序已关闭?我还补充说:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {

#if !TARGET_IPHONE_SIMULATOR

NSLog(@"remote notification: %@",[userInfo description]);
NSDictionary *apsInfo = [userInfo objectForKey:@"aps"];

NSString *alert = [apsInfo objectForKey:@"alert"];
NSLog(@"Received Push Alert: %@", alert);

NSString *badge = [apsInfo objectForKey:@"badge"];
NSLog(@"Received Push Badge: %@", badge);
application.applicationIconBadgeNumber = [[apsInfo …
Run Code Online (Sandbox Code Playgroud)

iphone xcode push push-notification badge

1
推荐指数
1
解决办法
8254
查看次数

什么是使用Rails和Flex的首选方式?

我想创建一个类似于聊天应用程序(实时应用程序)的服务.

从我的研究中可以看出,BlazeDS它是首选方式,但它涉及Java和Java EE.此外,最新的Ruby结果似乎是从2009年到2010年,所以它们可能已经过时了.

是否有积极维护的Ruby/Rails解决方案用于将推送通知与Flex集成?

ruby apache-flex push ruby-on-rails

1
推荐指数
1
解决办法
454
查看次数

克隆一个github应用程序到heroku

我是新手,我想从github克隆一个应用程序到heroku.我试过这个命令

heroku git:clone git@github.com:[Creator]/[APPname].git [HerokuappDirectory]
Run Code Online (Sandbox Code Playgroud)

但我明白了 Resource Not Found.

push github heroku git-clone

1
推荐指数
1
解决办法
2476
查看次数

使用PushSharp为ios和android处理多个通知

我已经实现了一个每3分钟运行一次的Windows服务,并轮询数据库以获取准备发送的通知.我将它们收集到一个列表中,确定它是ios还是android通知,然后调用PushBroker(PushSharp解决方案作为我的解决方案项目中的编译解决方案包含在内)然后迭代列表中的项目进行如下处理:

    static void ProcessIOS(List<Client> IOS)
   {
       PushBroker push = new PushBroker();
       push.OnNotificationSent += NotificationSent;
       push.OnChannelException += ChannelException;
       push.OnServiceException += ServiceException;
       push.OnNotificationFailed += NotificationFailed;
       push.OnDeviceSubscriptionExpired += DeviceSubscriptionExpired;
       push.OnDeviceSubscriptionChanged += DeviceSubscriptionChanged;
       push.OnChannelCreated += ChannelCreated;
       push.OnChannelDestroyed += ChannelDestroyed;
       foreach (var entry in IOS)
           {
               string dev = entry.Device_Id.ToString();
               string load = entry.Push_Payload.ToString();
               int count = entry.Unread_Count;
              var appleCert = File.ReadAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../productionfile.p12"));
               push.RegisterAppleService(new ApplePushChannelSettings(true, appleCert, "password")); //Extension method
                     push.QueueNotification(new AppleNotification()
                                          .ForDeviceToken(dev)
                                          .WithAlert(load)
                                          .WithBadge(count));
                  }

   }
Run Code Online (Sandbox Code Playgroud)

消息发送成功,但是,我遇到的问题是1.尝试在消息发送成功或失败时检索响应,失败原因等...这些是pushsharp代码中的委托,以便我可以记录回复我们的数据库.为了澄清......我需要知道错误响应来自哪个条目尝试(deviceID).由于数据未链接到任何特定的deviceid传递尝试,因此我无法通知来自通知发布的代理的生成的消息.2.我还希望能够保持pushsharp代码不受修改并从我的代码中调用方法,以便在将来对pushsharp代码进行任何更新时减少合并问题.有什么建议?如果有人可以给我任何关于如何使用响应事件和代理来检索每个通知发送尝试的信息的示例,我将不胜感激.谢谢.

notifications push pushsharp

1
推荐指数
1
解决办法
4078
查看次数

git push on branch src refspec与any不匹配

我想克隆一个分支,进行更改并推入同一个分支.

我这样做:

mkdir myfolder
cd myfolder
git init
git clone "myurl" -b "mybranch"
git remote add origin "myurl"
edit "myfile.txt"
git add "myfile.txt"
git commit -m "my comment"
git push origin "mybranch"
Run Code Online (Sandbox Code Playgroud)

但是我收到了这个错误:

error: src refspec "mybranch" does not match any 
error: failed to push some refs to "myurl"
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

git branch push

1
推荐指数
1
解决办法
8171
查看次数

如何自定义解析推送通知在Android应用程序中发送uri?

我想在我的Android应用程序中使用解析推送通知功能.我把我的解析推送通知代码放在我的第一个活动(启动活动)中.

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import com.parse.ParseAnalytics;
import com.parse.ParseInstallation;
import com.parse.PushService;

public class SplashActivity extends Activity {

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
    ParseAnalytics.trackAppOpened(getIntent());

    // inform the Parse Cloud that it is ready for notifications
    PushService.setDefaultPushCallback(this, HomeActivity.class);
    ParseInstallation.getCurrentInstallation().saveInBackground();
    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            Intent intent = new Intent(SplashActivity.this, HomeActivity.class);
            startActivity(intent);
            SplashActivity.this.finish();
        }
    }, 1000);
}
public void onBackPressed() {

}
}
Run Code Online (Sandbox Code Playgroud)

这是我的ParseApplication:

import com.parse.Parse;
import com.parse.ParseACL;

import com.parse.ParseUser;

import android.app.Application;

public …
Run Code Online (Sandbox Code Playgroud)

java notifications android push

1
推荐指数
1
解决办法
2097
查看次数

Javascript - 为什么从函数返回array.push(x)并不会将元素x推入数组?

我想知道为什么以下功能有效:

function foo(list){
    var array = [];
    array.push(list);
    return array;
}

> foo([1,2,3])
[[1,2,3]]
Run Code Online (Sandbox Code Playgroud)

虽然这个没有:

function foo(list){
    var  array = [];
    return array.push(list);
}

> foo([1,2,3])
1 
Run Code Online (Sandbox Code Playgroud)

他们之间有什么区别?

javascript arrays push return function

1
推荐指数
1
解决办法
2728
查看次数

我无法在Android Studio的"提交更改"屏幕上看到更改的文件

当我去的时候VCS>Commit changes,我看到以下屏幕:

我目前在Android Studio中的

我可能错误地按下某个按钮或某些东西,从那以后我就不能提交整个项目,只提供一个文件(.iml文件).
为什么我看不到项目中的任何其他文件?

git push commit android-studio

1
推荐指数
1
解决办法
2070
查看次数